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";
|
||||
saveFileDialog.FileName = "Unnamed.cnp";
|
||||
}
|
||||
if (saveFileDialog.ShowDialog() != DialogResult.OK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
EnterKeyForm enterKeyForm = new EnterKeyForm
|
||||
{
|
||||
Owner = this
|
||||
|
|
@ -1157,14 +1161,7 @@ private async void SaveAsMainMenu_Click(object sender, EventArgs e)
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (saveFileDialog.ShowDialog() != DialogResult.OK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (TypedPassword.Value == null)
|
||||
{
|
||||
TypedPassword.Value = PublicVar.encryptionKey.Get();
|
||||
}
|
||||
PublicVar.encryptionKey.Set(TypedPassword.Value);
|
||||
filePath = saveFileDialog.FileName;
|
||||
mainMenu.Enabled = false;
|
||||
toolbarPanel.Enabled = false;
|
||||
|
|
@ -1184,7 +1181,6 @@ private async void SaveAsMainMenu_Click(object sender, EventArgs e)
|
|||
richTextBox.ReadOnly = false;
|
||||
richTextBox.Modified = false;
|
||||
Text = Path.GetFileName(filePath) + " – " + PublicVar.appName;
|
||||
PublicVar.encryptionKey.Set(TypedPassword.Value);
|
||||
TypedPassword.Value = null;
|
||||
PublicVar.openFileName = Path.GetFileName(saveFileDialog.FileName);
|
||||
StatusPanelMessage("save");
|
||||
|
|
|
|||
Loading…
Reference in a new issue