private void bw5_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e) { if (e.Error != null) { ResultBox5.AppendText("BW stopped. Errors occured." + Environment.NewLine); ResultBox5.AppendText(e.Result.ToString() + "" + Environment.NewLine); totalErrors5++; } else { if (e.Cancelled) { ResultBox5.AppendText("Cancelled by user." + Environment.NewLine); totalErrors5++; } else { WorkResult result = e.Result as WorkResult; ResultBox5.AppendText(result.ToString() + Environment.NewLine); totalErrors5 += result.errors(); } } Start5.Enabled = true; }
private void bw5_ProgressChanged(object sender, ProgressChangedEventArgs e) { this.progressBar5.Value = e.ProgressPercentage; string reportmsg = e.UserState as String; ResultBox5.AppendText(reportmsg + Environment.NewLine); }
private void Start5_Click(object sender, EventArgs e) { Start5.Enabled = false; totalErrors5 = 0; if (bw5.IsBusy != true) { bw5.RunWorkerAsync(); ResultBox5.AppendText("Running..." + Environment.NewLine); } }