diff options
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs index fa9c95742..94091b284 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs @@ -13,6 +13,7 @@ using System.Threading; using System.Threading.Tasks; using Tango.Core; using Tango.Core.DB; +using Tango.Core.ExtensionMethods; using Tango.Core.Helpers; using Tango.Core.IO; using Tango.Integration.Operation; @@ -145,6 +146,12 @@ namespace Tango.PPC.Common.MachineSetup LogManager.Log($"Machine setup response received: {Environment.NewLine}{setup_response.ToJsonString()}"); + if (!String.IsNullOrWhiteSpace(setup_response.DeviceComPort)) + { + settings.EmbeddedComPort = setup_response.DeviceComPort; + settings.Save(); + } + if (setup_response.SetupFirmware) { //Connecting to machine... @@ -157,25 +164,28 @@ namespace Tango.PPC.Common.MachineSetup }); } - if (setup_response.SetupActivation) + if (settings.ApplicationState == ApplicationStates.PreSetup) { - LogManager.Log("Activating windows license..."); - UpdateProgress("Activating operation system license", "Activating..."); - await _windows_manager.Activate(setup_response.OSKey); - } + if (setup_response.SetupActivation) + { + LogManager.Log("Activating windows license..."); + UpdateProgress("Activating operation system license", "Activating..."); + await _windows_manager.Activate(setup_response.OSKey); + } - if (setup_response.SetupRemoteAssistance) - { - LogManager.Log("Installing remote assistance..."); - UpdateProgress("Installing remote assistance", "Installing..."); - await _remoteAssistance.InstallRemoteAssistance(serialNumber); - } + if (setup_response.SetupRemoteAssistance) + { + LogManager.Log("Installing remote assistance..."); + UpdateProgress("Installing remote assistance", "Installing..."); + await _remoteAssistance.InstallRemoteAssistance(serialNumber); + } - if (setup_response.SetupUWF) - { - LogManager.Log("Activating unified write filter..."); - UpdateProgress("Activating disk protection", "Activating..."); - await _uwf.Setup(); + if (setup_response.SetupUWF) + { + LogManager.Log("Activating unified write filter..."); + UpdateProgress("Activating disk protection", "Activating..."); + await _uwf.Setup(); + } } //Create temporary folders for packages. |
