diff --git a/Crypto Notepad/Form1.cs b/Crypto Notepad/Form1.cs index 4ab55b4..9a2404e 100644 --- a/Crypto Notepad/Form1.cs +++ b/Crypto Notepad/Form1.cs @@ -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; } - } } \ No newline at end of file