diff options
| author | Avi Levkovich <avi@twine-s.com> | 2021-01-04 11:52:20 +0200 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2021-01-04 11:52:20 +0200 |
| commit | 7c3e54578ae6f2c01ec05ebc7f7e0f873955bb33 (patch) | |
| tree | 3eb92323c29633dde9df39666ece64815ff7da98 /Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate | |
| parent | 6a2aa48d486a9f83449d7e2c5e85b62649763c49 (diff) | |
| parent | b0dc79e93c1a17667211bff5c7e48eb2d69ad386 (diff) | |
| download | Tango-7c3e54578ae6f2c01ec05ebc7f7e0f873955bb33.tar.gz Tango-7c3e54578ae6f2c01ec05ebc7f7e0f873955bb33.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate')
| -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(); } |
