private void LoadFolder() { DisableCheckingItems = true; UseWaitCursor = true; ListViewPictures.Items.Clear(); WorkerLoad.RunWorkerAsync(FolderDialog.SelectedPath); }
/// <summary> /// Windows Form Load. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FormSettings_Load(object sender, EventArgs e) { GlobalWindowManager.AddWindow(this); Text = Localization.Strings.Settings + " - " + Localization.Strings.TrayTOTPPlugin; // Set form's name using constants. Working(true, true); // Set controls depending on the state of action. WorkerLoad.RunWorkerAsync(); // Load Settings in form controls. }
/// <summary> /// Windows Form Closing. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FormSettings_FormClosing(object sender, FormClosingEventArgs e) { if (WorkerLoad.IsBusy) { ButtonCancel.Enabled = false; WorkerLoad.CancelAsync(); e.Cancel = true; } if (WorkerSave.IsBusy) { ButtonCancel.Enabled = false; WorkerSave.CancelAsync(); e.Cancel = true; } if (WorkerReset.IsBusy) { ButtonCancel.Enabled = false; WorkerReset.CancelAsync(); e.Cancel = true; } }
private void WorkerReset_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { WorkerLoad.RunWorkerAsync("Reset"); }
/// <summary> /// Windows Form Load. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FormSettings_Load(object sender, EventArgs e) { Text = TrayTOTP_Plugin_Localization.strSettings + TrayTOTP_Plugin_Localization.strSpaceDashSpace + TrayTOTP_Plugin_Localization.strTrayTOTPPlugin; // Set form's name using constants. Working(true, true); // Set controls depending on the state of action. WorkerLoad.RunWorkerAsync(); // Load Settings in form controls. }