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;
|
||||
saveAsToolStripMenuItem_Click(this, new EventArgs());
|
||||
e.Cancel = true;
|
||||
}
|
||||
|
||||
if (filename != noname)
|
||||
{
|
||||
saveToolStripMenuItem1_Click_1(this, new EventArgs());
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
e.Cancel = true;
|
||||
}
|
||||
|
||||
if (res == DialogResult.No)
|
||||
|
|
@ -690,9 +690,7 @@ private void MainWindow_Activated(object sender, EventArgs e)
|
|||
|
||||
if (keyChanged == true)
|
||||
{
|
||||
//toolStripStatusLabel1.Text = "Key was changed";
|
||||
//await Task.Delay(4000);
|
||||
//toolStripStatusLabel1.Text = "Ready";
|
||||
customRTB.Modified = true;
|
||||
}
|
||||
|
||||
if (key == "")
|
||||
|
|
@ -1023,6 +1021,5 @@ private void customRTB_KeyDown(object sender, KeyEventArgs e)
|
|||
{
|
||||
caretPos = customRTB.SelectionStart;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue