The event ReadProgressEvent is not executed, WHY ?

Feb 5, 2014 at 5:17 PM
Edited Feb 5, 2014 at 6:48 PM
Hello,

First of all, sorry for my bad english :-(
I have a problem. Why after having implemented a management ReadProgress, the event does not not pass through the associated method ? :-(

Could someone explain to me why?
       using (ZipFile zip = ZipFile.Read(_ZipFileName, readOptions))
       {
             zip.ReadProgress += zip_ReadProgress;
             
             foreach (ZipEntry e in zip.Entries)
             {
               ...
             }
            
         ...
        }

        private void zip_ReadProgress(object sender, ReadProgressEventArgs e)
        {
            MessageBox.Show("hello");  // Not very elegant but effective...

            switch (e.EventType)
            {
                case ZipProgressEventType.Reading_Started:
                    ...
                    break;

                case ZipProgressEventType.Reading_BeforeReadEntry:
                    ...
                    break;

                case ZipProgressEventType.Reading_ArchiveBytesRead:
                    ...
                    break;

                case ZipProgressEventType.Reading_Completed:
                    ...
                    break;
            }
        }
Thank you for your answers

Chris.