From eeec4554288c43663d28fd4dd26d6ff45bcb2eb8 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Wed, 17 Jun 2020 12:54:47 +0300 Subject: Synchronized local PPC Schema. --- .../PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs | 1 - 1 file changed, 1 deletion(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs') 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 29bffb945..82b5a61df 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs @@ -1679,7 +1679,6 @@ namespace Tango.PPC.Common.MachineUpdate var response = await CheckForUpdate(_machineProvider.Machine.SerialNumber); if (response.IsUpdateAvailable || response.IsDatabaseUpdateAvailable) { - _checkForUpdateTimer.Interval = TimeSpan.FromMinutes(60).TotalMilliseconds; LogManager.Log($"New {(response.IsDatabaseUpdateAvailable ? "database updates" : "application version")} detected ({response.Version}). Raising event..."); UpdateAvailable?.Invoke(this, response); } -- cgit v1.3.1 From b8cd315d76b07a2886258d56a34b9ad8b57b56fa Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Wed, 17 Jun 2020 13:41:58 +0300 Subject: Fixed issue with auto check for update timing PPC. --- .../PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs | 8 +++++++- Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs') 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 82b5a61df..c73cc6196 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineUpdate/MachineUpdateManager.cs @@ -106,6 +106,7 @@ namespace Tango.PPC.Common.MachineUpdate _client = ppcWebClient; _machineProvider = machineProvider; _app_manager = applicationManager; + _app_manager.ApplicationReady += _app_manager_ApplicationReady; _packageRunner = packageRunner; _packageRunner.PackageProgress += _packageRunner_PackageProgress; @@ -116,7 +117,7 @@ namespace Tango.PPC.Common.MachineUpdate _checkForUpdateTimer = new System.Timers.Timer(_settings.AutoUpdateCheckInterval.TotalMilliseconds); _checkForUpdateTimer.Elapsed += _checkForUpdateTimer_Elapsed; - _checkForUpdateTimer.Start(); + _checkForUpdateTimer.Stop(); externalBridge.RegisterRequestHandler(this); } @@ -125,6 +126,11 @@ namespace Tango.PPC.Common.MachineUpdate #region Event Handlers + private void _app_manager_ApplicationReady(object sender, EventArgs e) + { + _checkForUpdateTimer.Start(); + } + private void _packageRunner_PackageProgress(object sender, PackageProgressEventArgs e) { UpdateProgress(e.PackageName, e.Message, e.IsIntermediate, e.Progress, e.Total); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest index d72e75011..efc5f8179 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest @@ -16,7 +16,7 @@ Remove this element if your application requires this virtualization for backwards compatibility. --> - + -- cgit v1.3.1