mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
Fixed bug with empty filename field while saving/creating a file
This commit is contained in:
parent
510547fd76
commit
7b5562c757
1 changed files with 5 additions and 0 deletions
|
|
@ -170,6 +170,9 @@ private void openAsotiations()
|
|||
|
||||
private void newToolStripMenuItem_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
saveConfirm(false);
|
||||
SaveFile.FileName = "Unnamed.cnp";
|
||||
publicVar.openFileName = "Crypto Notepad";
|
||||
Form2 f2 = new Form2();
|
||||
f2.ShowDialog();
|
||||
|
||||
|
|
@ -185,6 +188,7 @@ private void newToolStripMenuItem_Click_1(object sender, EventArgs e)
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
customRTB.Clear();
|
||||
StreamWriter sw = new StreamWriter(SaveFile.FileName);
|
||||
string NameWithotPath = Path.GetFileName(SaveFile.FileName);
|
||||
|
|
@ -198,6 +202,7 @@ private void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
|
|||
{
|
||||
int saveCaret = customRTB.SelectionStart;
|
||||
string NameWithotPath = Path.GetFileName(OpenFile.FileName);
|
||||
SaveFile.FileName = currentFilename;
|
||||
if (string.IsNullOrEmpty(publicVar.encryptionKey.Get()))
|
||||
{
|
||||
Form2 Form2 = new Form2();
|
||||
|
|
|
|||
Loading…
Reference in a new issue