private void converter_Progress(object sender, BatchProgressEventArgs e) { if (Progress != null) { Progress(100, e.FilePercentComplete, e.FilePercentComplete, Path.GetFileName(e.FilePath)); } }
/// <summary>The runner batch progress.</summary> /// <param name="sender">The sender.</param> /// <param name="e">The e.</param> private void RunnerBatchProgress(object sender, BatchProgressEventArgs e) { // push the progress % through to the background worker decimal i = Math.Max(1, e.Index); decimal count = Math.Max(1, e.Count); queryBackgroundWorker.ReportProgress(Convert.ToInt32(i / count * 100m)); }
private void ConverterProgress(object sender, BatchProgressEventArgs e) { ProgressEvent?.Invoke(this, new ProgressEventArgs { Maximum = e.TotalFiles, Current = e.FileNumber, Percent = e.FilePercentComplete, Message = e.FilePath }); }