PowerTCP Zip Compression for .NET
Status Enumeration
Example Example 




Enumerates values which describe the current state of the compression operation.
Syntax
<CategoryAttribute("Enumeration")>
<DescriptionAttribute("Enumerate the status that Dart Zip component is in operation. ")>
Public Enum Status 
   Inherits System.Enum
Dim instance As Status
[Category("Enumeration")]
[Description("Enumerate the status that Dart Zip component is in operation. ")]
public enum Status : System.Enum 
[Category("Enumeration")]
[Description("Enumerate the status that Dart Zip component is in operation. ")]
__value public enum Status : public System.Enum 
[Category("Enumeration")]
[Description("Enumerate the status that Dart Zip component is in operation. ")]
public enum class Status : public System.Enum 
Members
MemberDescription
BeginUnzipStarting the decompression operation.
BeginZipStarting the compression operation.
EndUnzipThe end of the decompression operation.
EndZipThe end of the compression operation.
UnzippingDecompressing data.
ZippingCompressing data.
Remarks

This enumeration is used by the Archive.Progress event.

Example
The following example demonstrates using the Progress event.
' Be sure to import the namespace by putting "Imports Dart.PowerTCP.Zip"
' at the top of your class.

Private Sub Archive1_Progress(ByVal sender As Object, ByVal e As Dart.PowerTCP.Zip.ProgressEventArgs) Handles Archive1.Progress
    Try
        ' Set the progress bar and status when fires
        ' prgItem is the progress bar for an individual item and prgTotal is for all the items.
        Select Case (e.Status)

            Case Status.Unzipping
                ' Show item progress
                prgItem.Maximum = e.Item.Size
                prgItem.Value = e.processedItemBytes

                ' Show total progress
                prgTotal.Maximum = e.TotalBytes
                prgTotal.Value = e.ProcessedTotalBytes

                Debug.WriteLine("Unzipping " + e.Item.Name)
            Case Status.EndUnzip
                prgTotal.Value = prgTotal.Maximum
        End Select
    Catch

    End Try
End Sub
// Be sure to import the namespace by putting "using Dart.PowerTCP.Zip;"
// at the top of your class.

private void archive1_Progress(object sender, Dart.PowerTCP.Zip.ProgressEventArgs e)
		{
			try
			{
				// Set the progress bar and status when fires
				// prgItem is the progress bar for an individual item and prgTotal is for all the items.
				switch (e.Status)
				{
					case Status.Unzipping:
						// Show item progress
						prgItem.Maximum = (int)e.Item.Size;
						prgItem.Value = (int)e.ProcessedItemBytes;

						// Show total progress
						prgTotal.Maximum = (int)e.TotalBytes;
						prgTotal.Value = (int)e.ProcessedTotalBytes;

						Debug.WriteLine("Unzipping " + e.Item.Name);
						break;
					case Status.EndUnzip:
						prgTotal.Value = prgTotal.Maximum;
						break;
				}
			}
			catch {}
		}
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         Dart.PowerTCP.Zip.Status

See Also

Reference

Dart.PowerTCP.Zip Namespace


PowerTCP Zip for .NET Documentation Version 2.1.1
© 2018 Dart Communications. All Rights Reserved.
Send comments on this topic