private void MainFormNew_FormClosing(object sender, FormClosingEventArgs e) { if (mEditorsController.CheckModified()) { using (PKStudio.Dialogs.SaveChangesDialog SCDlg = new Dialogs.SaveChangesDialog()) { DialogResult res = SCDlg.ShowDialog(this, mEditorsController.ModifiedComponents); switch (res) { case DialogResult.Cancel: e.Cancel = true; break; case DialogResult.No: SaveState(); break; case DialogResult.Yes: mEditorsController.SaveAllModifiedEditors(); SaveState(); break; default: SaveState(); break; } } } else { SaveState(); } }
private void MainFormNew_FormClosing(object sender, FormClosingEventArgs e) { if (mEditorsController.CheckModified()) { using (PKStudio.Dialogs.SaveChangesDialog SCDlg = new Dialogs.SaveChangesDialog()) { DialogResult res = SCDlg.ShowDialog(this, mEditorsController.ModifiedComponents); switch (res) { case DialogResult.Cancel: e.Cancel = true; break; case DialogResult.No: SaveState(); break; case DialogResult.Yes: mEditorsController.SaveAllModifiedEditors(); SaveState(); break; default: SaveState(); break; } } } else SaveState(); }