private void ButtonGenerateDatabaseSamples(object sender, EventArgs e) { if (backgroundWorkerSampleData.IsBusy != true) { // create a new instance of the alert form _alertSampleDataCreationInDatabase = new Form_Alert(); // event handler for the Cancel button in AlertForm _alertSampleDataCreationInDatabase.Show(); _alertSampleDataCreationInDatabase.ShowLogButton(false); backgroundWorkerSampleData.RunWorkerAsync(); } }
private void buttonClick_GenerateMetadata(object sender, EventArgs e) { if (backgroundWorkerMetadata.IsBusy != true) { // Create a new instance of the alert form, disabling most stuff. _alertSampleJsonMetadata = new Form_Alert(); _alertSampleJsonMetadata.ShowLogButton(false); _alertSampleJsonMetadata.ShowCancelButton(false); _alertSampleJsonMetadata.ShowProgressBar(false); _alertSampleJsonMetadata.ShowProgressLabel(false); _alertSampleJsonMetadata.Show(); // Start the asynchronous operation to create / move the sample Json files. backgroundWorkerMetadata.RunWorkerAsync(); } }
private void displayEventLogToolStripMenuItem_Click(object sender, EventArgs e) { if (backgroundWorkerEventLog.IsBusy != true) { // create a new instance of the alert form _alertEventLog = new Form_Alert(); _alertEventLog.Text = "Event Log"; _alertEventLog.ShowLogButton(false); _alertEventLog.ShowCancelButton(false); _alertEventLog.ShowProgressBar(false); _alertEventLog.ShowProgressLabel(false); _alertEventLog.Show(); // Start the asynchronous operation. backgroundWorkerEventLog.RunWorkerAsync(); } }