mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
Fixed #8
This commit is contained in:
parent
fb660011aa
commit
e8db6fc29c
1 changed files with 5 additions and 4 deletions
|
|
@ -214,6 +214,7 @@ private void newToolStripMenuItem_Click_1(object sender, EventArgs e)
|
|||
|
||||
private void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
int saveCaret = customRTB.SelectionStart;
|
||||
string NameWithotPath = Path.GetFileName(OpenFile.FileName);
|
||||
if (string.IsNullOrEmpty(publicVar.encryptionKey))
|
||||
{
|
||||
|
|
@ -247,9 +248,9 @@ private void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
|
|||
}
|
||||
sw.Close();
|
||||
customRTB.Text = noenc;
|
||||
string cc = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture);
|
||||
customRTB.Select(Convert.ToInt32(cc), 0);
|
||||
this.Text = appName + Path.GetFileName(filename);
|
||||
|
||||
customRTB.Select(Convert.ToInt32(saveCaret), 0);
|
||||
}
|
||||
|
||||
private void MainWindow_FormClosing(object sender, FormClosingEventArgs e)
|
||||
|
|
@ -358,6 +359,7 @@ private void saveToolStripMenuItem1_Click_1(object sender, EventArgs e)
|
|||
{
|
||||
string noname = "Unnamed.cnp";
|
||||
string NameWithotPath = Path.GetFileName(OpenFile.FileName);
|
||||
int saveCaret = customRTB.SelectionStart;
|
||||
|
||||
if (filename == noname)
|
||||
{
|
||||
|
|
@ -388,8 +390,7 @@ private void saveToolStripMenuItem1_Click_1(object sender, EventArgs e)
|
|||
|
||||
sw.Close();
|
||||
customRTB.Text = noenc;
|
||||
string cc = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture);
|
||||
customRTB.Select(Convert.ToInt32(cc), 0);
|
||||
customRTB.Select(Convert.ToInt32(saveCaret), 0);
|
||||
}
|
||||
|
||||
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
|
|
|||
Loading…
Reference in a new issue