Пример #1
0
 private void OnExtractEntry(int current, bool before, ZipEntry currentEntry, string path)
 {
     EventHandler<ExtractProgressEventArgs> ep = ExtractProgress;
     if (ep != null)
     {
         var e = new ExtractProgressEventArgs(ArchiveNameForEvent, before, _entries.Count, current, currentEntry, path);
         ep(this, e);
         if (e.Cancel)
             _extractOperationCanceled = true;
     }
 }
Пример #2
0
 internal static ExtractProgressEventArgs ByteUpdate(string archiveName, ZipEntry entry, Int64 bytesWritten, Int64 totalBytes)
 {
     var x = new ExtractProgressEventArgs(archiveName, ZipProgressEventType.Extracting_EntryBytesWritten);
     x.ArchiveName = archiveName;
     x.CurrentEntry = entry;
     x.BytesTransferred = bytesWritten;
     x.TotalBytesToTransfer = totalBytes;
     return x;
 }
Пример #3
0
 internal static ExtractProgressEventArgs AfterExtractEntry(string archiveName, ZipEntry entry, string extractLocation)
 {
     var x = new ExtractProgressEventArgs
         {
             ArchiveName = archiveName,
             EventType = ZipProgressEventType.Extracting_AfterExtractEntry,
             CurrentEntry = entry,
             _target = extractLocation,
         };
     return x;
 }
Пример #4
0
 internal static ExtractProgressEventArgs ExtractAllCompleted(string archiveName, string extractLocation)
 {
     var x = new ExtractProgressEventArgs(archiveName, ZipProgressEventType.Extracting_AfterExtractAll);
     x._target = extractLocation;
     return x;
 }
Пример #5
0
 internal static ExtractProgressEventArgs ExtractExisting(string archiveName, ZipEntry entry, string extractLocation)
 {
     var x = new ExtractProgressEventArgs
         {
             ArchiveName = archiveName,
             EventType = ZipProgressEventType.Extracting_ExtractEntryWouldOverwrite,
             CurrentEntry = entry,
             _target = extractLocation,
         };
     return x;
 }