private void bw7_ProgressChanged(object sender, ProgressChangedEventArgs e) { this.progressBar7.Value = e.ProgressPercentage; string reportmsg = e.UserState as String; ResultBox7.AppendText(reportmsg + Environment.NewLine); }
private void Start7_Click(object sender, EventArgs e) { Start7.Enabled = false; totalErrors7 = 0; if (bw7.IsBusy != true) { bw7.RunWorkerAsync(); ResultBox7.AppendText("Running..." + Environment.NewLine); } }
private void bw7_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e) { if (e.Error != null) { ResultBox7.AppendText("Errors occured. Please see log above." + Environment.NewLine); totalErrors6++; } else { if (e.Cancelled) { ResultBox7.AppendText("Cancelled." + Environment.NewLine); totalErrors6++; } else { WorkResult result = e.Result as WorkResult; ResultBox7.AppendText(result.ToString() + Environment.NewLine); totalErrors7 += result.errors(); } } Start7.Enabled = true; }