mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
Update method improved
This commit is contained in:
parent
acaab489a2
commit
7281d0bae4
1 changed files with 9 additions and 13 deletions
|
|
@ -1,4 +1,4 @@
|
|||
using Crypto_Notepad.Properties;
|
||||
using Crypto_Notepad.Properties;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
|
|
@ -46,7 +46,7 @@ protected override void WndProc(ref Message m)
|
|||
}
|
||||
|
||||
|
||||
#region Functions
|
||||
#region Methods
|
||||
private void DecryptAES()
|
||||
{
|
||||
EnterKeyForm enterKeyForm = new EnterKeyForm
|
||||
|
|
@ -379,8 +379,6 @@ private void CheckForUpdates(bool autoCheck)
|
|||
|
||||
if (serverVersion > appVersion)
|
||||
{
|
||||
mainMenu.Invoke((Action)delegate
|
||||
{
|
||||
if (statusPanel.Visible)
|
||||
{
|
||||
StatusPanelMessage("update-needed");
|
||||
|
|
@ -402,13 +400,10 @@ private void CheckForUpdates(bool autoCheck)
|
|||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (serverVersion <= appVersion && autoCheck)
|
||||
{
|
||||
mainMenu.Invoke((Action)delegate
|
||||
{
|
||||
using (new CenterWinDialog(this))
|
||||
{
|
||||
if (statusPanel.Visible)
|
||||
|
|
@ -420,9 +415,7 @@ private void CheckForUpdates(bool autoCheck)
|
|||
MessageBox.Show("Crypto Notepad is up to date.", PublicVar.appName, MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
@ -605,6 +598,7 @@ public void MenuIcons()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Toolbaricons(bool oldicons)
|
||||
{
|
||||
if (oldicons)
|
||||
|
|
@ -744,8 +738,9 @@ private void MainWindow_Load(object sender, EventArgs e)
|
|||
|
||||
if (settings.autoCheckUpdate)
|
||||
{
|
||||
Thread up = new Thread(() => CheckForUpdates(false));
|
||||
up.Start();
|
||||
//Thread up = new Thread(() => CheckForUpdates(false));
|
||||
//up.Start();
|
||||
CheckForUpdates(false);
|
||||
}
|
||||
|
||||
MenuIcons();
|
||||
|
|
@ -1319,8 +1314,9 @@ private void DocsMainMenu_Click(object sender, EventArgs e)
|
|||
|
||||
private void UpdatesMainMenu_Click(object sender, EventArgs e)
|
||||
{
|
||||
Thread up = new Thread(() => CheckForUpdates(true));
|
||||
up.Start();
|
||||
//Thread up = new Thread(() => CheckForUpdates(true));
|
||||
//up.Start();
|
||||
CheckForUpdates(true);
|
||||
}
|
||||
|
||||
private void AboutMainMenu_Click(object sender, EventArgs e)
|
||||
|
|
|
|||
Loading…
Reference in a new issue