private void DebugModeDialog_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (ignoreClosing)
     {
         return;
     }
     if (MessageBox.Show(Assembly.GetEntryAssembly().GetName().Name + " will now quit.", "Warning", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
     {
         e.Cancel = true;
     }
     Result = DebugModeDialogResult.Quit;
 }
 private void ConfirmButton_Click(object sender, EventArgs e)
 {
     Result        = (DebugModeDialogResult)(ActionComboBox.SelectedIndex + 1);
     ignoreClosing = true;
     Close();
 }
 private void QuitButton_Click(object sender, EventArgs e)
 {
     Result        = DebugModeDialogResult.Quit;
     ignoreClosing = false;
     Close();
 }