Changed logic of checking updates

This commit is contained in:
Alexander 2018-12-09 23:27:18 +02:00
parent 7483b6c7b2
commit 510547fd76

View file

@ -895,9 +895,9 @@ private void pictureBox13_Click(object sender, EventArgs e)
string version = Application.ProductVersion;
string exePath = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + @"\";
int ver = Convert.ToInt32(version.Replace(".", "")), con = Convert.ToInt32(content.Replace(".", ""));
int appVersion = Convert.ToInt32(version.Replace(".", "")), serverVersion = Convert.ToInt32(content.Replace(".", ""));
if (con != ver)
if (serverVersion > appVersion)
{
MainMenu.Invoke((Action)delegate
{
@ -922,7 +922,7 @@ private void pictureBox13_Click(object sender, EventArgs e)
});
}
if (con == ver && autoCheck == true)
if (serverVersion <= appVersion && autoCheck == true)
{
MainMenu.Invoke((Action)delegate
{
@ -932,6 +932,7 @@ private void pictureBox13_Click(object sender, EventArgs e)
}
});
}
}
catch
{