diff --git a/Crypto Notepad/Form1.cs b/Crypto Notepad/Form1.cs index 9a2404e..b674405 100644 --- a/Crypto Notepad/Form1.cs +++ b/Crypto Notepad/Form1.cs @@ -270,12 +270,22 @@ private void MainWindow_FormClosing(object sender, FormClosingEventArgs e) if (customRTB.Text != "") { DialogResult res = new DialogResult(); + string messageBoxText = ""; + + if (keyChanged == false) + { + messageBoxText = "Save file: " + "\"" + NameWithotPath + "\"" + " ? "; + } + if (keyChanged == true) + { + messageBoxText = "Save file: " + "\"" + NameWithotPath + "\"" + " with a new key? "; + } + //Save file with a new key? using (new CenterWinDialog(this)) { - res = MessageBox.Show("Save file: " + "\"" + NameWithotPath + "\"" + " ? ", - "Crypto Notepad", - MessageBoxButtons.YesNoCancel, - MessageBoxIcon.Question); + res = MessageBox.Show(messageBoxText, "Crypto Notepad", + MessageBoxButtons.YesNoCancel, + MessageBoxIcon.Question); if (res == DialogResult.Yes) { if (filename == noname)