mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
Fixed #46
This commit is contained in:
parent
9fde277705
commit
3d012ea475
1 changed files with 5 additions and 9 deletions
|
|
@ -1144,6 +1144,10 @@ private async void SaveAsMainMenu_Click(object sender, EventArgs e)
|
||||||
PublicVar.openFileName = "Unnamed.cnp";
|
PublicVar.openFileName = "Unnamed.cnp";
|
||||||
saveFileDialog.FileName = "Unnamed.cnp";
|
saveFileDialog.FileName = "Unnamed.cnp";
|
||||||
}
|
}
|
||||||
|
if (saveFileDialog.ShowDialog() != DialogResult.OK)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
EnterKeyForm enterKeyForm = new EnterKeyForm
|
EnterKeyForm enterKeyForm = new EnterKeyForm
|
||||||
{
|
{
|
||||||
Owner = this
|
Owner = this
|
||||||
|
|
@ -1157,14 +1161,7 @@ private async void SaveAsMainMenu_Click(object sender, EventArgs e)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (saveFileDialog.ShowDialog() != DialogResult.OK)
|
PublicVar.encryptionKey.Set(TypedPassword.Value);
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (TypedPassword.Value == null)
|
|
||||||
{
|
|
||||||
TypedPassword.Value = PublicVar.encryptionKey.Get();
|
|
||||||
}
|
|
||||||
filePath = saveFileDialog.FileName;
|
filePath = saveFileDialog.FileName;
|
||||||
mainMenu.Enabled = false;
|
mainMenu.Enabled = false;
|
||||||
toolbarPanel.Enabled = false;
|
toolbarPanel.Enabled = false;
|
||||||
|
|
@ -1184,7 +1181,6 @@ private async void SaveAsMainMenu_Click(object sender, EventArgs e)
|
||||||
richTextBox.ReadOnly = false;
|
richTextBox.ReadOnly = false;
|
||||||
richTextBox.Modified = false;
|
richTextBox.Modified = false;
|
||||||
Text = Path.GetFileName(filePath) + " – " + PublicVar.appName;
|
Text = Path.GetFileName(filePath) + " – " + PublicVar.appName;
|
||||||
PublicVar.encryptionKey.Set(TypedPassword.Value);
|
|
||||||
TypedPassword.Value = null;
|
TypedPassword.Value = null;
|
||||||
PublicVar.openFileName = Path.GetFileName(saveFileDialog.FileName);
|
PublicVar.openFileName = Path.GetFileName(saveFileDialog.FileName);
|
||||||
StatusPanelMessage("save");
|
StatusPanelMessage("save");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue