Ejemplo n.º 1
0
 /// <summary>
 /// Creates a new ArchiveProgressEventArgs object from specified event parameters.
 /// </summary>
 /// <param name="progressType">type of status message</param>
 /// <param name="currentFileName">name of the file being processed</param>
 /// <param name="currentFileNumber">number of the current file being processed</param>
 /// <param name="totalFiles">total number of files to be processed</param>
 /// <param name="currentFileBytesProcessed">number of bytes processed so far when compressing or extracting a file</param>
 /// <param name="currentFileTotalBytes">total number of bytes in the current file</param>
 /// <param name="currentArchiveName">name of the current Archive</param>
 /// <param name="currentArchiveNumber">current Archive number, when processing a chained set of Archives</param>
 /// <param name="totalArchives">total number of Archives in a chained set</param>
 /// <param name="currentArchiveBytesProcessed">number of compressed bytes processed so far during an extraction</param>
 /// <param name="currentArchiveTotalBytes">total number of compressed bytes to be processed during an extraction</param>
 /// <param name="fileBytesProcessed">number of uncompressed file bytes processed so far</param>
 /// <param name="totalFileBytes">total number of uncompressed file bytes to be processed</param>
 internal ArchiveProgressEventArgs(
     ArchiveProgressType progressType,
     string currentFileName,
     int currentFileNumber,
     int totalFiles,
     long currentFileBytesProcessed,
     long currentFileTotalBytes,
     string currentArchiveName,
     int currentArchiveNumber,
     int totalArchives,
     long currentArchiveBytesProcessed,
     long currentArchiveTotalBytes,
     long fileBytesProcessed,
     long totalFileBytes)
 {
     this.progressType = progressType;
     this.currentFileName = currentFileName;
     this.currentFileNumber = currentFileNumber;
     this.totalFiles = totalFiles;
     this.currentFileBytesProcessed = currentFileBytesProcessed;
     this.currentFileTotalBytes = currentFileTotalBytes;
     this.currentArchiveName = currentArchiveName;
     this.currentArchiveNumber = (short) currentArchiveNumber;
     this.totalArchives = (short) totalArchives;
     this.currentArchiveBytesProcessed = currentArchiveBytesProcessed;
     this.currentArchiveTotalBytes = currentArchiveTotalBytes;
     this.fileBytesProcessed = fileBytesProcessed;
     this.totalFileBytes = totalFileBytes;
 }
 /// <summary>
 /// Creates a new ArchiveProgressEventArgs object from specified event parameters.
 /// </summary>
 /// <param name="progressType">type of status message</param>
 /// <param name="currentFileName">name of the file being processed</param>
 /// <param name="currentFileNumber">number of the current file being processed</param>
 /// <param name="totalFiles">total number of files to be processed</param>
 /// <param name="currentFileBytesProcessed">number of bytes processed so far when compressing or extracting a file</param>
 /// <param name="currentFileTotalBytes">total number of bytes in the current file</param>
 /// <param name="currentArchiveName">name of the current Archive</param>
 /// <param name="currentArchiveNumber">current Archive number, when processing a chained set of Archives</param>
 /// <param name="totalArchives">total number of Archives in a chained set</param>
 /// <param name="currentArchiveBytesProcessed">number of compressed bytes processed so far during an extraction</param>
 /// <param name="currentArchiveTotalBytes">total number of compressed bytes to be processed during an extraction</param>
 /// <param name="fileBytesProcessed">number of uncompressed file bytes processed so far</param>
 /// <param name="totalFileBytes">total number of uncompressed file bytes to be processed</param>
 public ArchiveProgressEventArgs(
     ArchiveProgressType progressType,
     string currentFileName,
     int currentFileNumber,
     int totalFiles,
     long currentFileBytesProcessed,
     long currentFileTotalBytes,
     string currentArchiveName,
     int currentArchiveNumber,
     int totalArchives,
     long currentArchiveBytesProcessed,
     long currentArchiveTotalBytes,
     long fileBytesProcessed,
     long totalFileBytes)
 {
     this.progressType                 = progressType;
     this.currentFileName              = currentFileName;
     this.currentFileNumber            = currentFileNumber;
     this.totalFiles                   = totalFiles;
     this.currentFileBytesProcessed    = currentFileBytesProcessed;
     this.currentFileTotalBytes        = currentFileTotalBytes;
     this.currentArchiveName           = currentArchiveName;
     this.currentArchiveNumber         = (short)currentArchiveNumber;
     this.totalArchives                = (short)totalArchives;
     this.currentArchiveBytesProcessed = currentArchiveBytesProcessed;
     this.currentArchiveTotalBytes     = currentArchiveTotalBytes;
     this.fileBytesProcessed           = fileBytesProcessed;
     this.totalFileBytes               = totalFileBytes;
 }
 public ArchiveProgressEventArgs(ArchiveProgressType progressType, string currentFileName, Exception treatmentException, bool cannotCancel = true)
 {
     ProgressType       = progressType;
     CurrentFileName    = currentFileName;
     TreatmentException = treatmentException;
     CannotCancel       = cannotCancel;
 }
Ejemplo n.º 4
0
 protected void OnProgress(ArchiveProgressType progressType)
 {
     if (!suppressProgressEvents)
     {
         ArchiveProgressEventArgs e = new ArchiveProgressEventArgs(progressType, currentFileName, (currentFileNumber >= 0) ? currentFileNumber : 0, totalFiles, currentFileBytesProcessed, currentFileTotalBytes, currentArchiveName, currentArchiveNumber, totalArchives, currentArchiveBytesProcessed, currentArchiveTotalBytes, fileBytesProcessed, totalFileBytes);
         CabEngine.ReportProgress(e);
     }
 }
Ejemplo n.º 5
0
        private void OnProgress(ArchiveProgressType progressType)
        {
            ArchiveProgressEventArgs e = new ArchiveProgressEventArgs(
                progressType,
                this.currentFileName,
                this.currentFileNumber >= 0 ? this.currentFileNumber : 0,
                this.totalFiles,
                this.currentFileBytesProcessed,
                this.currentFileTotalBytes,
                this.currentArchiveName,
                this.currentArchiveNumber,
                this.totalArchives,
                this.currentArchiveBytesProcessed,
                this.currentArchiveTotalBytes,
                this.fileBytesProcessed,
                this.totalFileBytes);

            this.OnProgress(e);
        }
Ejemplo n.º 6
0
 protected void OnProgress(ArchiveProgressType progressType)
 {
     if (!this.suppressProgressEvents)
     {
         ArchiveProgressEventArgs e = new ArchiveProgressEventArgs(
             progressType,
             this.currentFileName,
             this.currentFileNumber >= 0 ? this.currentFileNumber : 0,
             this.totalFiles,
             this.currentFileBytesProcessed,
             this.currentFileTotalBytes,
             this.currentArchiveName,
             this.currentArchiveNumber,
             this.totalArchives,
             this.currentArchiveBytesProcessed,
             this.currentArchiveTotalBytes,
             this.fileBytesProcessed,
             this.totalFileBytes);
         this.CabEngine.ReportProgress(e);
     }
 }
Ejemplo n.º 7
0
 protected void OnProgress(ArchiveProgressType progressType)
 {
     if (!SuppressProgressEvents)
     {
         var e = new ArchiveProgressEventArgs(
             progressType,
             CurrentFileName,
             CurrentFileNumber >= 0 ? CurrentFileNumber : 0,
             TotalFiles,
             CurrentFileBytesProcessed,
             CurrentFileTotalBytes,
             CurrentArchiveName,
             CurrentArchiveNumber,
             TotalArchives,
             CurrentArchiveBytesProcessed,
             CurrentArchiveTotalBytes,
             FileBytesProcessed,
             TotalFileBytes);
         CabEngine.ReportProgress(e);
     }
 }
Ejemplo n.º 8
0
 protected void OnProgress(ArchiveProgressType progressType)
 {
     if (!this.suppressProgressEvents)
     {
         ArchiveProgressEventArgs e = new ArchiveProgressEventArgs(
             progressType,
             this.currentFileName,
             this.currentFileNumber >= 0 ? this.currentFileNumber : 0,
             this.totalFiles,
             this.currentFileBytesProcessed,
             this.currentFileTotalBytes,
             this.currentArchiveName,
             this.currentArchiveNumber,
             this.totalArchives,
             this.currentArchiveBytesProcessed,
             this.currentArchiveTotalBytes,
             this.fileBytesProcessed,
             this.totalFileBytes);
         this.CabEngine.ReportProgress(e);
     }
 }
Ejemplo n.º 9
0
 private void OnProgress(ArchiveProgressType progressType)
 {
     ArchiveProgressEventArgs e = new ArchiveProgressEventArgs(
         progressType,
         this.currentFileName,
         this.currentFileNumber >= 0 ? this.currentFileNumber : 0,
         this.totalFiles,
         this.currentFileBytesProcessed,
         this.currentFileTotalBytes,
         this.currentArchiveName,
         this.currentArchiveNumber,
         this.totalArchives,
         this.currentArchiveBytesProcessed,
         this.currentArchiveTotalBytes,
         this.fileBytesProcessed,
         this.totalFileBytes);
     this.OnProgress(e);
 }