mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
Autosave on lock
This commit is contained in:
parent
3b9b930667
commit
157b148e85
1 changed files with 17 additions and 1 deletions
|
|
@ -34,7 +34,23 @@ public MainForm()
|
|||
RichTextBox.AllowDrop = true;
|
||||
}
|
||||
|
||||
/*Functions*/
|
||||
protected override void WndProc(ref Message m)
|
||||
{
|
||||
const int WM_SYSCOMMAND = 0x112;
|
||||
const int SC_MINIMIZE = 0xF020;
|
||||
|
||||
if (m.Msg == WM_SYSCOMMAND && m.WParam.ToInt32() == SC_MINIMIZE && settings.autoLock && PublicVar.encryptionKey.Get() != null)
|
||||
{
|
||||
SaveMainMenu_Click(this, new EventArgs());
|
||||
AutoLock(true);
|
||||
return;
|
||||
}
|
||||
|
||||
base.WndProc(ref m);
|
||||
}
|
||||
|
||||
|
||||
#region Functions
|
||||
private void DecryptAES()
|
||||
{
|
||||
EnterKeyForm f2 = new EnterKeyForm();
|
||||
|
|
|
|||
Loading…
Reference in a new issue