diff --git a/Crypto Notepad/Form1.cs b/Crypto Notepad/Form1.cs index 84ce28e..fc16320 100644 --- a/Crypto Notepad/Form1.cs +++ b/Crypto Notepad/Form1.cs @@ -20,7 +20,7 @@ public partial class MainWindow : Form string filename = "Unnamed.cnp"; string[] args = Environment.GetCommandLineArgs(); int caretPos = 0; - string appName = Assembly.GetExecutingAssembly().GetName().Name; + string appName = Assembly.GetExecutingAssembly().GetName().Name + " – "; public MainWindow() { @@ -83,7 +83,7 @@ void DecryptAES() string de = AES.Decrypt(opnfile, publicVar.encryptionKey, ps.TheSalt, ps.HashAlgorithm, ps.PasswordIterations, "16CHARSLONG12345", ps.KeySize); customRTB.Text = de; - this.Text = appName + " - " + NameWithotPath; + this.Text = appName + NameWithotPath; filename = OpenFile.FileName; string cc2 = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture); @@ -111,7 +111,7 @@ private void openToolStripMenuItem_Click(object sender, EventArgs e) string opnfile = File.ReadAllText(OpenFile.FileName); string NameWithotPath = Path.GetFileName(OpenFile.FileName); customRTB.Text = opnfile; - this.Text = appName + " - " + NameWithotPath; + this.Text = appName + NameWithotPath; string cc2 = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture); customRTB.Select(Convert.ToInt32(cc2), 0); return; @@ -142,7 +142,7 @@ private void openAsotiations() string de = AES.Decrypt(opnfile, publicVar.encryptionKey, ps.TheSalt, ps.HashAlgorithm, ps.PasswordIterations, "16CHARSLONG12345", ps.KeySize); customRTB.Text = de; - this.Text = appName + " - " + NameWithotPath; + this.Text = appName + NameWithotPath; filename = args[1]; string cc = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture); @@ -180,7 +180,7 @@ private void newToolStripMenuItem_Click_1(object sender, EventArgs e) customRTB.Clear(); StreamWriter sw = new StreamWriter(SaveFile.FileName); string NameWithotPath = Path.GetFileName(SaveFile.FileName); - this.Text = appName + " - " + NameWithotPath; + this.Text = appName + NameWithotPath; filename = SaveFile.FileName; sw.Close(); } @@ -490,10 +490,13 @@ private void deleteFileToolStripMenuItem_Click_1(object sender, EventArgs e) { File.Delete(filename); customRTB.Clear(); - publicVar.encryptionKey = ""; + publicVar.encryptionKey = ""; + pictureBox6.Enabled = false; + pictureBox7.Enabled = false; pictureBox11.Enabled = false; + pictureBox13.Enabled = false; filename = "Unnamed.cnp"; - this.Text = appName; + this.Text = appName.Remove(14); return; } } @@ -699,18 +702,18 @@ private void MainWindow_Activated(object sender, EventArgs e) if (publicVar.encryptionKey == "") { - pictureBox11.Enabled = false; - pictureBox13.Enabled = false; pictureBox6.Enabled = false; pictureBox7.Enabled = false; + pictureBox11.Enabled = false; + pictureBox13.Enabled = false; } if (publicVar.encryptionKey != "") { - pictureBox11.Enabled = true; - pictureBox13.Enabled = true; pictureBox6.Enabled = true; pictureBox7.Enabled = true; + pictureBox11.Enabled = true; + pictureBox13.Enabled = true; } } @@ -940,7 +943,7 @@ void AutoLock(bool minimize) { publicVar.encryptionKey = ""; customRTB.Clear(); - this.Text = appName; + this.Text = appName.Remove(14); OpenFile.FileName = ""; this.Show(); return; @@ -954,7 +957,7 @@ void AutoLock(bool minimize) string NameWithotPath = Path.GetFileName(OpenFile.FileName); string de = AES.Decrypt(opnfile, publicVar.encryptionKey, ps.TheSalt, ps.HashAlgorithm, ps.PasswordIterations, "16CHARSLONG12345", ps.KeySize); - this.Text = appName + " - " + NameWithotPath; + this.Text = appName + NameWithotPath; filename = OpenFile.FileName; string cc2 = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture); @@ -972,7 +975,7 @@ void AutoLock(bool minimize) { publicVar.encryptionKey = ""; customRTB.Clear(); - this.Text = appName; + this.Text = appName.Remove(14); OpenFile.FileName = ""; this.Show(); return;