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