Fired while data is being read from or written into a zip file.

Namespace:  C1.C1Zip
Assembly:  C1.Silverlight.Zip (in C1.Silverlight.Zip.dll)

Syntax

C#
public event ZipProgressEventHandler Progress
Visual Basic
Public Event Progress As ZipProgressEventHandler

Remarks

This event is typically used to update the application UI during lengthy operations. It can also be used to cancel the operations.

Examples

The code below writes messages to the output window while the application compresses files.
Copy CodeC#
void Compress()
{
       // create zip file
       C1Zip zip = new C1Zip();
       zip.Create(zipFileName);

       // connect event handler
       zip.Progress += new ZipProgressEventHandler(zip_Progress);

       // add files
       foreach (string fileName in Directory.GetFiles(path, "*.*"))
           zip.Entries.Add(fileName);
   }

// print messages while files are compressed
void zip_Progress(object sender, ZipProgressEventArgs e)
{
       Console.WriteLine("Compressing {0}, {1:p0} done",
           e.FileName, e.Position/(float)e.FileLength);
   }

See Also