mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
Displaying filename in title bar
This commit is contained in:
parent
3739f5f1f1
commit
88863ac8a9
1 changed files with 9 additions and 0 deletions
|
|
@ -89,6 +89,7 @@ void DecryptAES()
|
||||||
string de = AES.Decrypt(opnfile, key, ps.TheSalt, ps.HashAlgorithm, ps.PasswordIterations, "16CHARSLONG12345", ps.KeySize);
|
string de = AES.Decrypt(opnfile, key, ps.TheSalt, ps.HashAlgorithm, ps.PasswordIterations, "16CHARSLONG12345", ps.KeySize);
|
||||||
customRTB.Text = de;
|
customRTB.Text = de;
|
||||||
|
|
||||||
|
this.Text = appName + " - " + NameWithotPath;
|
||||||
filename = OpenFile.FileName;
|
filename = OpenFile.FileName;
|
||||||
|
|
||||||
string cc2 = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture);
|
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 opnfile = File.ReadAllText(OpenFile.FileName);
|
||||||
string NameWithotPath = Path.GetFileName(OpenFile.FileName);
|
string NameWithotPath = Path.GetFileName(OpenFile.FileName);
|
||||||
customRTB.Text = opnfile;
|
customRTB.Text = opnfile;
|
||||||
|
this.Text = appName + " - " + NameWithotPath;
|
||||||
string cc2 = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture);
|
string cc2 = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture);
|
||||||
customRTB.Select(Convert.ToInt32(cc2), 0);
|
customRTB.Select(Convert.ToInt32(cc2), 0);
|
||||||
return;
|
return;
|
||||||
|
|
@ -146,6 +148,7 @@ private void openAsotiations()
|
||||||
string de = AES.Decrypt(opnfile, key, ps.TheSalt, ps.HashAlgorithm, ps.PasswordIterations, "16CHARSLONG12345", ps.KeySize);
|
string de = AES.Decrypt(opnfile, key, ps.TheSalt, ps.HashAlgorithm, ps.PasswordIterations, "16CHARSLONG12345", ps.KeySize);
|
||||||
customRTB.Text = de;
|
customRTB.Text = de;
|
||||||
|
|
||||||
|
this.Text = appName + " - " + NameWithotPath;
|
||||||
|
|
||||||
filename = args[1];
|
filename = args[1];
|
||||||
string cc = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture);
|
string cc = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture);
|
||||||
|
|
@ -183,6 +186,7 @@ private void newToolStripMenuItem_Click_1(object sender, EventArgs e)
|
||||||
customRTB.Clear();
|
customRTB.Clear();
|
||||||
StreamWriter sw = new StreamWriter(SaveFile.FileName);
|
StreamWriter sw = new StreamWriter(SaveFile.FileName);
|
||||||
string NameWithotPath = Path.GetFileName(SaveFile.FileName);
|
string NameWithotPath = Path.GetFileName(SaveFile.FileName);
|
||||||
|
this.Text = appName + " - " + NameWithotPath;
|
||||||
filename = SaveFile.FileName;
|
filename = SaveFile.FileName;
|
||||||
sw.Close();
|
sw.Close();
|
||||||
}
|
}
|
||||||
|
|
@ -248,6 +252,7 @@ private void MainWindow_FormClosing(object sender, FormClosingEventArgs e)
|
||||||
{
|
{
|
||||||
string noname = "Unnamed.cnp";
|
string noname = "Unnamed.cnp";
|
||||||
string NameWithotPath;
|
string NameWithotPath;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
NameWithotPath = Path.GetFileName(args[1]);
|
NameWithotPath = Path.GetFileName(args[1]);
|
||||||
|
|
@ -484,6 +489,7 @@ private void deleteFileToolStripMenuItem_Click_1(object sender, EventArgs e)
|
||||||
key = "";
|
key = "";
|
||||||
pictureBox11.Enabled = false;
|
pictureBox11.Enabled = false;
|
||||||
filename = "Unnamed.cnp";
|
filename = "Unnamed.cnp";
|
||||||
|
this.Text = appName;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -928,6 +934,7 @@ void AutoLock(bool minimize)
|
||||||
{
|
{
|
||||||
key = "";
|
key = "";
|
||||||
customRTB.Clear();
|
customRTB.Clear();
|
||||||
|
this.Text = appName;
|
||||||
OpenFile.FileName = "";
|
OpenFile.FileName = "";
|
||||||
this.Show();
|
this.Show();
|
||||||
return;
|
return;
|
||||||
|
|
@ -941,6 +948,7 @@ void AutoLock(bool minimize)
|
||||||
string NameWithotPath = Path.GetFileName(OpenFile.FileName);
|
string NameWithotPath = Path.GetFileName(OpenFile.FileName);
|
||||||
string de = AES.Decrypt(opnfile, key, ps.TheSalt, ps.HashAlgorithm, ps.PasswordIterations, "16CHARSLONG12345", ps.KeySize);
|
string de = AES.Decrypt(opnfile, key, ps.TheSalt, ps.HashAlgorithm, ps.PasswordIterations, "16CHARSLONG12345", ps.KeySize);
|
||||||
|
|
||||||
|
this.Text = appName + " - " + NameWithotPath;
|
||||||
filename = OpenFile.FileName;
|
filename = OpenFile.FileName;
|
||||||
|
|
||||||
string cc2 = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture);
|
string cc2 = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture);
|
||||||
|
|
@ -958,6 +966,7 @@ void AutoLock(bool minimize)
|
||||||
{
|
{
|
||||||
key = "";
|
key = "";
|
||||||
customRTB.Clear();
|
customRTB.Clear();
|
||||||
|
this.Text = appName;
|
||||||
OpenFile.FileName = "";
|
OpenFile.FileName = "";
|
||||||
this.Show();
|
this.Show();
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue