|
@@ -275,7 +275,12 @@ public partial class MainWindow : IPanelHostControl
|
|
|
Title = $"{(String.Equals(App.Profile?.ToUpper(), "DEFAULT") ? "PRS Desktop" : App.Profile)} (Release {CoreUtils.GetVersion()})";
|
|
|
|
|
|
Logger.Send(LogType.Information, "", "Checking for updates");
|
|
|
- SupportUtils.CheckForUpdates();
|
|
|
+ if (SupportUtils.CheckForUpdates())
|
|
|
+ {
|
|
|
+ Logger.Send(LogType.Information, "", "Update found, closing application.");
|
|
|
+ Close();
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
Exception? startupException = null;
|
|
|
ValidationStatus? loginStatus = null;
|
|
@@ -2975,12 +2980,19 @@ public partial class MainWindow : IPanelHostControl
|
|
|
|
|
|
private void CheckForUpdates_OnClick(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
- if (!SupportUtils.CheckForUpdates())
|
|
|
+ if (SupportUtils.CheckForUpdates())
|
|
|
+ {
|
|
|
+ Close();
|
|
|
+ }
|
|
|
+ else
|
|
|
{
|
|
|
if (MessageWindow.ShowYesNo(
|
|
|
"You appear to be using the latest version already!\n\nRun the installer anyway?", "Update"))
|
|
|
{
|
|
|
- SupportUtils.DownloadAndRunInstaller();
|
|
|
+ if (SupportUtils.DownloadAndRunInstaller())
|
|
|
+ {
|
|
|
+ Close();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|