private void buttonDeploy_Click(object sender, EventArgs e) { if (backgroundWorkerRepository.IsBusy != true) { // create a new instance of the alert form _alertRepository = new FormAlert(); // event handler for the Cancel button in AlertForm _alertRepository.Canceled += buttonCancel_Click; _alertRepository.Show(); // Start the asynchronous operation. backgroundWorkerRepository.RunWorkerAsync(); } }
private void button1_Click_1(object sender, EventArgs e) { if (backgroundWorkerSampleData.IsBusy != true) { // create a new instance of the alert form _alertSampleData = new FormAlert(); // event handler for the Cancel button in AlertForm _alertSampleData.Canceled += buttonCancel_Click; _alertSampleData.Show(); // Start the asynchronous operation. SetStandardConfigurationSettings(); backgroundWorkerSampleData.RunWorkerAsync(); } }