private void bw9_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e) { if (e.Error != null) { ResultBox9.AppendText("BW stopped. Errors occured." + Environment.NewLine); ResultBox9.AppendText(e.Result.ToString() + "" + Environment.NewLine); totalErrors9++; } else { if (e.Cancelled) { ResultBox9.AppendText("Cancelled by user." + Environment.NewLine); totalErrors9++; } else { WorkResult result = e.Result as WorkResult; ResultBox9.AppendText(result.ToString() + Environment.NewLine); totalErrors9 += result.errors(); } } Start9.Enabled = true; }
private void bw9_ProgressChanged(object sender, ProgressChangedEventArgs e) { this.progressBar9.Value = e.ProgressPercentage; string reportmsg = e.UserState as String; ResultBox9.AppendText(reportmsg + Environment.NewLine); }
private void Start9_Click(object sender, EventArgs e) { Start9.Enabled = false; totalErrors9 = 0; if (bw9.IsBusy != true) { bw9.RunWorkerAsync(); ResultBox9.AppendText("Running..." + Environment.NewLine); } }