mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
Fixed bug when closing window and saving file
This commit is contained in:
parent
88863ac8a9
commit
a44fb626d7
1 changed files with 3 additions and 6 deletions
|
|
@ -282,14 +282,14 @@ private void MainWindow_FormClosing(object sender, FormClosingEventArgs e)
|
||||||
{
|
{
|
||||||
SaveFile.FileName = noname;
|
SaveFile.FileName = noname;
|
||||||
saveAsToolStripMenuItem_Click(this, new EventArgs());
|
saveAsToolStripMenuItem_Click(this, new EventArgs());
|
||||||
|
e.Cancel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filename != noname)
|
if (filename != noname)
|
||||||
{
|
{
|
||||||
saveToolStripMenuItem1_Click_1(this, new EventArgs());
|
saveToolStripMenuItem1_Click_1(this, new EventArgs());
|
||||||
|
Environment.Exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
e.Cancel = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res == DialogResult.No)
|
if (res == DialogResult.No)
|
||||||
|
|
@ -690,9 +690,7 @@ private void MainWindow_Activated(object sender, EventArgs e)
|
||||||
|
|
||||||
if (keyChanged == true)
|
if (keyChanged == true)
|
||||||
{
|
{
|
||||||
//toolStripStatusLabel1.Text = "Key was changed";
|
customRTB.Modified = true;
|
||||||
//await Task.Delay(4000);
|
|
||||||
//toolStripStatusLabel1.Text = "Ready";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key == "")
|
if (key == "")
|
||||||
|
|
@ -1023,6 +1021,5 @@ private void customRTB_KeyDown(object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
caretPos = customRTB.SelectionStart;
|
caretPos = customRTB.SelectionStart;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue