Esempio n. 1
0
 void ReadProgress1(object sender, ReadProgressEventArgs e)
 {
     switch (e.EventType)
     {
         case ZipProgressEventType.Reading_Started:
             TestContext.WriteLine("Reading_Started");
             break;
         case ZipProgressEventType.Reading_Completed:
             TestContext.WriteLine("Reading_Completed");
             break;
         case ZipProgressEventType.Reading_BeforeReadEntry:
             TestContext.WriteLine("Reading_BeforeReadEntry");
             break;
         case ZipProgressEventType.Reading_AfterReadEntry:
             TestContext.WriteLine("Reading_AfterReadEntry: {0}",
                                   e.CurrentEntry.FileName);
             break;
         case ZipProgressEventType.Reading_ArchiveBytesRead:
             break;
     }
 }
Esempio n. 2
0
        void zip_ReadProgress(object sender, ReadProgressEventArgs e)
        {
            // Do we want to cancel?
            if (ProgressForm.WantCancel)
            {
                e.Cancel = true;
                return;
            }

            // Occurs when a file is being read from the zip
            if (e.EventType == ZipProgressEventType.Saving_BeforeWriteEntry)
                appWorker.ReportProgress(-1, "Reading " + e.CurrentEntry.FileName);
        }
Esempio n. 3
0
 internal static ReadProgressEventArgs Started(string archiveName)
 {
     var x = new ReadProgressEventArgs(archiveName, ZipProgressEventType.Reading_Started);
     return x;
 }
Esempio n. 4
0
 internal static ReadProgressEventArgs ByteUpdate(string archiveName, ZipEntry entry, Int64 bytesXferred, Int64 totalBytes)
 {
     var x = new ReadProgressEventArgs(archiveName, ZipProgressEventType.Reading_ArchiveBytesRead);
     x.CurrentEntry = entry;
     x.BytesTransferred = bytesXferred;
     x.TotalBytesToTransfer = totalBytes;
     return x;
 }
Esempio n. 5
0
 internal static ReadProgressEventArgs Before(string archiveName, int entriesTotal)
 {
     var x = new ReadProgressEventArgs(archiveName, ZipProgressEventType.Reading_BeforeReadEntry);
     x.EntriesTotal = entriesTotal;
     return x;
 }
Esempio n. 6
0
 internal static ReadProgressEventArgs After(string archiveName, ZipEntry entry, int entriesTotal)
 {
     var x = new ReadProgressEventArgs(archiveName, ZipProgressEventType.Reading_AfterReadEntry);
     x.EntriesTotal = entriesTotal;
     x.CurrentEntry = entry;
     return x;
 }
Esempio n. 7
0
 /// <summary>ReadProgressイベント ハンドラ</summary>
 protected void ReadProgressEventHandler(Object sender, ReadProgressEventArgs e)
 {
     //Debug.WriteLine("ReadProgressEventHandler\r\n"
     //    + "sender:" + sender.ToString() + ", " + "e.ArchiveName:" + e.ArchiveName);
 }
Esempio n. 8
0
 private void zip_ReadProgress(object sender, ReadProgressEventArgs e)
 {
   progressBar.Value = Convert.ToInt32(e.BytesTransferred);
   Application.DoEvents();
 }
Esempio n. 9
0
        internal static ReadProgressEventArgs Completed(string archiveName)
        {
            var x = new ReadProgressEventArgs(archiveName, ZipProgressEventType.Reading_Completed);

            return(x);
        }