diff --git a/Crypto Notepad/Form1.cs b/Crypto Notepad/Form1.cs index 0c91942..4ab55b4 100644 --- a/Crypto Notepad/Form1.cs +++ b/Crypto Notepad/Form1.cs @@ -89,6 +89,7 @@ void DecryptAES() string de = AES.Decrypt(opnfile, key, ps.TheSalt, ps.HashAlgorithm, ps.PasswordIterations, "16CHARSLONG12345", ps.KeySize); customRTB.Text = de; + this.Text = appName + " - " + NameWithotPath; filename = OpenFile.FileName; string cc2 = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture); @@ -116,6 +117,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; string cc2 = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture); customRTB.Select(Convert.ToInt32(cc2), 0); return; @@ -146,6 +148,7 @@ private void openAsotiations() string de = AES.Decrypt(opnfile, key, ps.TheSalt, ps.HashAlgorithm, ps.PasswordIterations, "16CHARSLONG12345", ps.KeySize); customRTB.Text = de; + this.Text = appName + " - " + NameWithotPath; filename = args[1]; string cc = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture); @@ -183,6 +186,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; filename = SaveFile.FileName; sw.Close(); } @@ -248,6 +252,7 @@ private void MainWindow_FormClosing(object sender, FormClosingEventArgs e) { string noname = "Unnamed.cnp"; string NameWithotPath; + try { NameWithotPath = Path.GetFileName(args[1]); @@ -484,6 +489,7 @@ private void deleteFileToolStripMenuItem_Click_1(object sender, EventArgs e) key = ""; pictureBox11.Enabled = false; filename = "Unnamed.cnp"; + this.Text = appName; return; } } @@ -928,6 +934,7 @@ void AutoLock(bool minimize) { key = ""; customRTB.Clear(); + this.Text = appName; OpenFile.FileName = ""; this.Show(); return; @@ -941,6 +948,7 @@ void AutoLock(bool minimize) string NameWithotPath = Path.GetFileName(OpenFile.FileName); string de = AES.Decrypt(opnfile, key, ps.TheSalt, ps.HashAlgorithm, ps.PasswordIterations, "16CHARSLONG12345", ps.KeySize); + this.Text = appName + " - " + NameWithotPath; filename = OpenFile.FileName; string cc2 = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture); @@ -958,6 +966,7 @@ void AutoLock(bool minimize) { key = ""; customRTB.Clear(); + this.Text = appName; OpenFile.FileName = ""; this.Show(); return;