mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
Save on closing bugs fixed
This commit is contained in:
parent
5ce38ccfb5
commit
5cecf51ee4
1 changed files with 8 additions and 2 deletions
|
|
@ -257,6 +257,11 @@ private void MainWindow_FormClosing(object sender, FormClosingEventArgs e)
|
||||||
NameWithotPath = Path.GetFileName(OpenFile.FileName);
|
NameWithotPath = Path.GetFileName(OpenFile.FileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (NameWithotPath == "")
|
||||||
|
{
|
||||||
|
NameWithotPath = noname;
|
||||||
|
}
|
||||||
|
|
||||||
if (customRTB.Text != "")
|
if (customRTB.Text != "")
|
||||||
{
|
{
|
||||||
DialogResult res = new DialogResult();
|
DialogResult res = new DialogResult();
|
||||||
|
|
@ -278,12 +283,13 @@ private void MainWindow_FormClosing(object sender, FormClosingEventArgs e)
|
||||||
{
|
{
|
||||||
saveToolStripMenuItem1_Click_1(this, new EventArgs());
|
saveToolStripMenuItem1_Click_1(this, new EventArgs());
|
||||||
}
|
}
|
||||||
Application.Exit();
|
|
||||||
|
e.Cancel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res == DialogResult.No)
|
if (res == DialogResult.No)
|
||||||
{
|
{
|
||||||
Environment.Exit(0);
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res == DialogResult.Cancel)
|
if (res == DialogResult.Cancel)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue