diff --git a/Crypto Notepad/MainForm.cs b/Crypto Notepad/MainForm.cs index 4a1b1dd..0d125e9 100644 --- a/Crypto Notepad/MainForm.cs +++ b/Crypto Notepad/MainForm.cs @@ -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)