Save on closing bugs fixed

This commit is contained in:
Sigmanor 2016-01-25 12:39:30 +02:00
parent 5ce38ccfb5
commit 5cecf51ee4

View file

@ -257,6 +257,11 @@ private void MainWindow_FormClosing(object sender, FormClosingEventArgs e)
NameWithotPath = Path.GetFileName(OpenFile.FileName);
}
if (NameWithotPath == "")
{
NameWithotPath = noname;
}
if (customRTB.Text != "")
{
DialogResult res = new DialogResult();
@ -278,12 +283,13 @@ private void MainWindow_FormClosing(object sender, FormClosingEventArgs e)
{
saveToolStripMenuItem1_Click_1(this, new EventArgs());
}
Application.Exit();
e.Cancel = true;
}
if (res == DialogResult.No)
{
Environment.Exit(0);
return;
}
if (res == DialogResult.Cancel)