private void bw4_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e) { if (e.Error != null) { ResultBox4.AppendText("BW stopped. Errors occured." + Environment.NewLine); ResultBox4.AppendText(e.Result.ToString() + "" + Environment.NewLine); totalErrors4++; } else { if (e.Cancelled) { ResultBox4.AppendText("Cancelled by user." + Environment.NewLine); totalErrors4++; } else { WorkResult result = e.Result as WorkResult; ResultBox4.AppendText(result.ToString() + Environment.NewLine); totalErrors4 += result.errors(); } } Start4.Enabled = true; }
private void bw4_ProgressChanged(object sender, ProgressChangedEventArgs e) { this.progressBar4.Value = e.ProgressPercentage; string reportmsg = e.UserState as String; ResultBox4.AppendText(reportmsg + Environment.NewLine); }
private void Start4_Click(object sender, EventArgs e) { Start4.Enabled = false; totalErrors4 = 0; if (bw4.IsBusy != true) { bw4.RunWorkerAsync(); ResultBox4.AppendText("Running..." + Environment.NewLine); } }