aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-09-16 17:48:16 +0300
committerShlomo Hecht <shlomo@twine-s.com>2019-09-16 17:48:16 +0300
commit161fe6f6d2b29ba3deb641cdc049ad0d8f58004e (patch)
tree20318bb7ea4a243b8c2e9757e4635e8d5f5cb728 /Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup
parent30fcfa4100a9d00e887c6e17e32e427b05296ce7 (diff)
parentb674a2e7751daa80c0d74207968bf8e3d18d7faf (diff)
downloadTango-161fe6f6d2b29ba3deb641cdc049ad0d8f58004e.tar.gz
Tango-161fe6f6d2b29ba3deb641cdc049ad0d8f58004e.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs42
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.