mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
Added notification in window title bar when file saved
This commit is contained in:
parent
300fadf616
commit
0df8dba2cb
1 changed files with 15 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
|||
using IWshRuntimeLibrary;
|
||||
using IWshRuntimeLibrary;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
|
|
@ -10,6 +10,7 @@
|
|||
using System.Reflection;
|
||||
using System.Security.Cryptography;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using File = System.IO.File;
|
||||
|
||||
|
|
@ -441,6 +442,17 @@ private void CheckForUpdates(bool autoCheck)
|
|||
}
|
||||
}
|
||||
|
||||
private async void SaveStatus()
|
||||
{
|
||||
if (!Text.Contains(" [File Saved]"))
|
||||
{
|
||||
string common = Text;
|
||||
Text += " [File Saved]";
|
||||
await Task.Delay(3000);
|
||||
Text = common;
|
||||
}
|
||||
}
|
||||
|
||||
private void AutoLock(bool minimize)
|
||||
{
|
||||
EnterKeyForm f2 = new EnterKeyForm();
|
||||
|
|
@ -1003,6 +1015,7 @@ private void SaveToolStripMenuItem_Click(object sender, EventArgs e)
|
|||
}
|
||||
RichTextBox.Modified = false;
|
||||
PublicVar.keyChanged = false;
|
||||
SaveStatus();
|
||||
}
|
||||
|
||||
private void SaveAsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
|
@ -1052,6 +1065,7 @@ private void SaveAsToolStripMenuItem_Click(object sender, EventArgs e)
|
|||
PublicVar.encryptionKey.Set(TypedPassword.Value);
|
||||
TypedPassword.Value = null;
|
||||
PublicVar.openFileName = Path.GetFileName(SaveFile.FileName);
|
||||
SaveStatus();
|
||||
}
|
||||
|
||||
private void OpenFileLocationToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
|
|
|||
Loading…
Reference in a new issue