diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-12-18 17:59:41 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-12-18 17:59:41 +0200 |
| commit | f131b2573bfb617998927ea1072eb946b800d5e7 (patch) | |
| tree | 949b9cc7b7248abd958d7b5300dd2082495acbd7 /Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs | |
| parent | 45ac8eaf0e03d87c2f9728b2b7c84922c6f6a37d (diff) | |
| download | Tango-f131b2573bfb617998927ea1072eb946b800d5e7.tar.gz Tango-f131b2573bfb617998927ea1072eb946b800d5e7.zip | |
PPC working on tablet !
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 | 41 |
1 files changed, 21 insertions, 20 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 145512562..e1795d06a 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/MachineSetup/MachineSetupManager.cs @@ -98,23 +98,7 @@ namespace Tango.PPC.Common.MachineSetup IMachineOperator op = null; - var demoMode = SettingsManager.Default.GetOrCreate<PPCSettings>().DemoMode; - - if (!demoMode) - { - //Connecting to machine... - LogManager.Log("Initiating machine connection..."); - - UpdateProgress("Connecting to machine", "Connecting..."); - op = await DefaultMachineProvider.CreateMinimalMachineOperator((msg) => - { - UpdateProgress("Connecting to machine", msg); - }); - } - else - { - LogManager.Log("Application in demo mode. Skipping machine connection..."); - } + var settings = SettingsManager.Default.GetOrCreate<PPCSettings>(); //Connect to machine service and get matching packages for this machine. UpdateProgress("Validating serial number", "Connecting to machine service..."); @@ -140,16 +124,34 @@ namespace Tango.PPC.Common.MachineSetup LogManager.Log($"Machine setup response received: {Environment.NewLine}{setup_response.ToJsonString()}"); - if (!demoMode) + if (setup_response.SetupFirmware) + { + //Connecting to machine... + LogManager.Log("Initiating machine connection..."); + + UpdateProgress("Connecting to machine", "Connecting..."); + op = await DefaultMachineProvider.CreateMinimalMachineOperator((msg) => + { + UpdateProgress("Connecting to machine", msg); + }); + } + + if (setup_response.SetupActivation) { LogManager.Log("Activating windows license..."); UpdateProgress("Activating operation system license", "Activating..."); await _windows_activation_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.SetupUWF) + { LogManager.Log("Activating unified write filter..."); UpdateProgress("Activating disk protection", "Activating..."); await _uwf.Setup(); @@ -286,7 +288,7 @@ namespace Tango.PPC.Common.MachineSetup throw LogManager.Log(ex, "Setup manager error while trying to synchronize database."); } - if (!demoMode) + if (setup_response.SetupFirmware) { //Updating firmware UpdateProgress("Updating Firmware", "Connecting to firmware device..."); @@ -324,7 +326,6 @@ namespace Tango.PPC.Common.MachineSetup } else { - LogManager.Log("Application in demo mode. Skipping firmware upgrade..."); result.SetResult(new MachineSetupResult() { UpdatePackagePath = _newPackageTempFolder, |
