Ejemplo n.º 1
0
 private void OnSaveEvent(ZipProgressEventType eventFlavor)
 {
     EventHandler<SaveProgressEventArgs> sp = SaveProgress;
     if (sp != null)
     {
         var e = new SaveProgressEventArgs(ArchiveNameForEvent, eventFlavor);
         sp(this, e);
         if (e.Cancel)
             _saveOperationCanceled = true;
     }
 }
Ejemplo n.º 2
0
 internal static SaveProgressEventArgs Completed(string archiveName)
 {
     var x = new SaveProgressEventArgs(archiveName, ZipProgressEventType.Saving_Completed);
     return x;
 }
Ejemplo n.º 3
0
 private void OnSaveEntry(int current, ZipEntry entry, bool before)
 {
     EventHandler<SaveProgressEventArgs> sp = SaveProgress;
     if (sp != null)
     {
         var e = new SaveProgressEventArgs(ArchiveNameForEvent, before, _entries.Count, current, entry);
         sp(this, e);
         if (e.Cancel)
             _saveOperationCanceled = true;
     }
 }
Ejemplo n.º 4
0
 internal static SaveProgressEventArgs ByteUpdate(string archiveName, ZipEntry entry, Int64 bytesXferred, Int64 totalBytes)
 {
     var x = new SaveProgressEventArgs(archiveName, ZipProgressEventType.Saving_EntryBytesRead);
     x.ArchiveName = archiveName;
     x.CurrentEntry = entry;
     x.BytesTransferred = bytesXferred;
     x.TotalBytesToTransfer = totalBytes;
     return x;
 }