Beispiel #1
0
 internal static SaveProgressEventArgs Completed(string archiveName)
 {
     var x = new SaveProgressEventArgs(archiveName, ZipProgressEventType.Saving_Completed);
     return x;
 }
 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;
     }
 }
Beispiel #3
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;
 }
 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;
     }
 }