private void LongRunningProgress() { if (LongRunningProcessBackgroundWorker.IsBusy != true) { // Start the asynchronous operation. LongRunningProcessBackgroundWorker.RunWorkerAsync(); } }
private void LongRunningOperationCancelButton_Click(object sender, EventArgs e) { if (LongRunningProcessBackgroundWorker.WorkerSupportsCancellation == true) { // Cancel the asynchronous operation. LongRunningProcessBackgroundWorker.CancelAsync(); } }