diff options
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs | 9 |
1 files changed, 7 insertions, 2 deletions
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<PPCSettings>(); - _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(); } |
