private void Busy_FormClosing(object sender, FormClosingEventArgs e) { if (BusyBackgroundWorker.IsBusy) { e.Cancel = true; BusyBackgroundWorker.CancelAsync(); } else { DialogResult = Completed ? DialogResult.OK : DialogResult.Cancel; } }
private void Busy_Load(object sender, EventArgs e) { BusyBackgroundWorker.RunWorkerAsync(); }