示例#1
0
 private void btnCloseWindow_Click(object sender, EventArgs e)
 {
     if (blnTextChanged)
     {
         var response = MessageBox.Show(this, Resources.You_have_unsaved_changes, Resources.Exit_Check, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (response == DialogResult.No)
         {
             return;
         }
     }
     ProgSettings.ShowThisForm(ProgSettings.MainForm);
     Close();
 }
示例#2
0
 private void frmTables_FormClosing(object sender, FormClosingEventArgs e)
 {
     // Has any text changed on the form
     if (blnTextChanged)
     {
         // Ask the user if they which to close without saving
         var response = MessageBox.Show(this, Resources.You_have_unsaved_changes, Resources.Exit_Check,
                                        MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (response == DialogResult.No)
         {
             // Bail out of the form closing
             e.Cancel = true;
             return;
         }
     }
     ProgSettings.ShowThisForm(ProgSettings.MainForm);
 }
示例#3
0
 private void btnQuit_Click(object sender, EventArgs e)
 {
     ProgSettings.ShowThisForm(ProgSettings.MainForm);
     Close();
 }