From 904753380ad0621f604b8ff38dfc59371b78bda3 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Fri, 1 Jan 2021 04:14:42 +0200 Subject: Fixed some bugs with thread loading wizard. fail proof notification bar min height. (maybe timing issue) PPC auto update first check after 30 seconds always regardless of settings. --- .../PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs index c115f4f5b..57c3c9f34 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs @@ -115,7 +115,7 @@ namespace Tango.PPC.Common.MachineUpdate _settings = SettingsManager.Default.GetOrCreate(); - _checkForUpdateTimer = new System.Timers.Timer(_settings.AutoUpdateCheckInterval.TotalMilliseconds); + _checkForUpdateTimer = new System.Timers.Timer(TimeSpan.FromSeconds(30).TotalMilliseconds); _checkForUpdateTimer.Elapsed += _checkForUpdateTimer_Elapsed; _checkForUpdateTimer.Stop(); @@ -1710,6 +1710,8 @@ namespace Tango.PPC.Common.MachineUpdate private async void _checkForUpdateTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { + _checkForUpdateTimer.Interval = _settings.AutoUpdateCheckInterval.TotalMilliseconds; + if (EnableAutoCheckForUpdates && _settings.AutoCheckForUpdates && !_isUpdating) { _checkForUpdateTimer.Stop(); @@ -1723,7 +1725,10 @@ namespace Tango.PPC.Common.MachineUpdate UpdateAvailable?.Invoke(this, response); } } - catch { } + catch (Exception ex) + { + Debug.WriteLine(ex); + } _checkForUpdateTimer.Start(); } -- cgit v1.3.1