mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 21:13:23 -07:00
Merge from branch for Exit problems
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@744 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
f84b227d47
commit
31456fc9dc
1 changed files with 6 additions and 1 deletions
|
@ -568,7 +568,12 @@ namespace Greenshot.Forms {
|
|||
|
||||
void ImageEditorFormFormClosing(object sender, FormClosingEventArgs e) {
|
||||
if (!saved) {
|
||||
DialogResult result = MessageBox.Show(lang.GetString(LangKey.editor_close_on_save), lang.GetString(LangKey.editor_close_on_save_title), MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
|
||||
MessageBoxButtons buttons = MessageBoxButtons.YesNoCancel;
|
||||
// Dissallow "CANCEL" if the application needs to shutdown
|
||||
if (e.CloseReason == CloseReason.ApplicationExitCall || e.CloseReason == CloseReason.WindowsShutDown) {
|
||||
buttons = MessageBoxButtons.YesNo;
|
||||
}
|
||||
DialogResult result = MessageBox.Show(lang.GetString(LangKey.editor_close_on_save), lang.GetString(LangKey.editor_close_on_save_title), buttons, MessageBoxIcon.Question);
|
||||
if (result.Equals(DialogResult.Cancel)) {
|
||||
e.Cancel = true;
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue