From e29d962c5602fc9fc3a54fa4da8957609de7eea4 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 17 Feb 2019 15:52:11 +0200 Subject: Completed PPC watchdog ! --- .../Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs | 4 +++- .../Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs | 2 +- Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs index ee1b39ca6..48aae2b8f 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs @@ -59,6 +59,7 @@ namespace Tango.PPC.UI.ViewModels private MachineSetupResult _setup_result; private IOperationSystemManager _operationSystemManager; + private IPPCApplicationManager _appManager; #region Properties @@ -193,6 +194,7 @@ namespace Tango.PPC.UI.ViewModels /// The machine setup manager. public MachineSetupViewVM(IPPCApplicationManager applicationManager, IMachineSetupManager machineSetupManager, IOperationSystemManager operationSystemManager) { + _appManager = applicationManager; MachineSetupManager = machineSetupManager; DeploymentSlot = Settings.DeploymentSlot; @@ -282,7 +284,7 @@ namespace Tango.PPC.UI.ViewModels LogManager.Log($"Executing '{updater_exe}' with arguments '{PathHelper.GetStartupPath()}'..."); Process.Start(updater_exe, PathHelper.GetStartupPath()); LogManager.Log("Terminating application process!"); - Environment.Exit(0); + _appManager.ShutDown(); } /// diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs index 07d034964..2f6199ecb 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs @@ -220,7 +220,7 @@ namespace Tango.PPC.UI.ViewModels LogManager.Log($"Executing '{updater_exe}' with arguments '{PathHelper.GetStartupPath()}'..."); Process.Start(updater_exe, PathHelper.GetStartupPath()); LogManager.Log("Terminating application process!"); - Environment.Exit(0); + ApplicationManager.ShutDown(); } else { diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs index b01be3734..a4f550a39 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs @@ -13,6 +13,7 @@ using Tango.PPC.Common.ExternalBridge; using Tango.PPC.Common.Modules; using Tango.PPC.Common.Navigation; using Tango.PPC.Common.Notifications; +using Tango.PPC.Common.WatchDog; using Tango.SharedUI; namespace Tango.PPC.UI.ViewModels -- cgit v1.3.1