Changed message text on windows closing

This commit is contained in:
Sigmanor 2016-01-24 23:00:03 +02:00
parent 045778aa4d
commit 4381714966

View file

@ -254,12 +254,22 @@ private void MainWindow_FormClosing(object sender, FormClosingEventArgs e)
{
string f = "Unnamed.cnp";
string NameWithotPath;
try
{
NameWithotPath = Path.GetFileName(args[1]);
}
catch (IndexOutOfRangeException)
{
NameWithotPath = Path.GetFileName(OpenFile.FileName);
}
if (customRTB.Text != "")
{
DialogResult res = new DialogResult();
using (new CenterWinDialog(this))
{
res = MessageBox.Show("Save changes in:\n" + filename + " ?",
res = MessageBox.Show("Save file: " + "\"" + NameWithotPath + "\"" + " ? ",
"Crypto Notepad",
MessageBoxButtons.YesNoCancel,
MessageBoxIcon.Question);