/// <summary> /// Called when a file has been extracted from a source archive. /// </summary> /// <remarks> /// This notifies listeners that a read-only initialization step has finished. /// </remarks> /// <param name="sender">The object that raised the event.</param> /// <param name="e">An <see cref="EventArgs"/> describing the event arguments.</param> private void FileExtractionFinished(object sender, FileInfoEventArgs e) { CancelProgressEventArgs ceaArgs = new CancelProgressEventArgs((float)e.PercentDone / 100f); ReadOnlyInitProgressUpdated(this, ceaArgs); e.Cancel = ceaArgs.Cancel; }
/// <summary> /// Handles the <see cref="IMod.ReadOnlyInitProgressUpdated"/> event of the Mod. /// </summary> /// <remarks> /// This steps the progress in the progress dialog. /// </remarks> /// <param name="sender">The object that raised the event.</param> /// <param name="e">A <see cref="CancelEventArgs"/> describing the event arguments.</param> private void Mod_ReadOnlyInitProgressUpdated(object sender, CancelProgressEventArgs e) { e.Cancel = (Status == TaskStatus.Cancelling); OverallProgress = (Int32)(e.PercentComplete * 100); }
/// <summary> /// Handles the <see cref="Archive.ReadOnlyInitProgressUpdated"/> event of the mod's archive file. /// </summary> /// <remarks> /// This raises the mod's <see cref="ReadOnlyInitProgressUpdated"/> event. /// </remarks> /// <param name="sender">The object that raised the event.</param> /// <param name="e">A <see cref="CancelProgressEventArgs"/> describing the event arguments.</param> private void ArchiveFile_ReadOnlyInitProgressUpdated(object sender, CancelProgressEventArgs e) { ReadOnlyInitProgressUpdated(this, e); }