Added a message when key was changed

This commit is contained in:
Sigmanor 2016-01-25 14:45:31 +02:00
parent a44fb626d7
commit 7efb253534

View file

@ -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)