private void SetCurrentProgress(ProgressEventArgs e) { if (this.lblFileProgress.InvokeRequired) { SetCurrentProgressDelegate d = new SetCurrentProgressDelegate(SetCurrentProgress); this.Invoke(d, new object[] { e }); } else { int numTotal = MP.GetNumFiles(); lblFileProgress.Text = "Processing file " + e.currentFile; pbar2.Value = Convert.ToInt32(e.fileProgress); } }
private void SetCurrentProgress(int currentProgress, string currentFile) { if (this.lblFileProgress.InvokeRequired) { SetCurrentProgressDelegate d = new SetCurrentProgressDelegate(SetCurrentProgress); this.Invoke(d, new object[] { currentProgress, currentFile }); } else { int numTotal = this.fileList.Count; lblFileProgress.Text = "Processing file " + currentFile; pbar2.Value = currentProgress; } }