diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2019-02-19 01:50:58 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2019-02-19 01:50:58 +0200 |
| commit | 9736b8c8ede6a0d121dea8381f0abb561fad5631 (patch) | |
| tree | 1c38f3f5be82b923ffae40fae00a25487179ab54 /Software/Visual_Studio/PPC/Tango.PPC.UI | |
| parent | be3343cc0268179c7a6f628fa5e68f323a3335e5 (diff) | |
| download | Tango-9736b8c8ede6a0d121dea8381f0abb561fad5631.tar.gz Tango-9736b8c8ede6a0d121dea8381f0abb561fad5631.zip | |
Implemented auto generated web clients for PPC and machine studio.
Improved interactions with web clients across solutions.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs | 3 | ||||
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs | 10 |
2 files changed, 10 insertions, 3 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs index 4eb5475f0..018c9b223 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs @@ -22,6 +22,7 @@ using Tango.PPC.Common.RemoteAssistance; using Tango.PPC.Common.Storage; using Tango.PPC.Common.Threading; using Tango.PPC.Common.UWF; +using Tango.PPC.Common.Web; using Tango.PPC.UI.Authentication; using Tango.PPC.UI.Connectivity; using Tango.PPC.UI.Modules; @@ -69,7 +70,9 @@ namespace Tango.PPC.UI TangoIOC.Default.Unregister<IStorageProvider>(); TangoIOC.Default.Unregister<IUnifiedWriteFilterManager>(); TangoIOC.Default.Unregister<IOperationSystemManager>(); + TangoIOC.Default.Unregister<PPCWebClient>(); + TangoIOC.Default.Register<PPCWebClient, PPCWebClient>(new PPCWebClient()); TangoIOC.Default.Register<IDispatcherProvider, DefaultDispatcherProvider>(new DefaultDispatcherProvider(Application.Current.Dispatcher)); TangoIOC.Default.Register<INotificationProvider, DefaultNotificationProvider>(); TangoIOC.Default.Register<IAuthenticationProvider, DefaultAuthenticationProvider>(); 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 514a517ff..1bd1e1eea 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs @@ -18,6 +18,7 @@ using Tango.PPC.Common.Connection; using Tango.PPC.Common.MachineSetup; using Tango.PPC.Common.Navigation; using Tango.PPC.Common.OS; +using Tango.PPC.Common.Web; using Tango.PPC.UI.ViewsContracts; using Tango.Settings; using Tango.SharedUI.Helpers; @@ -60,6 +61,7 @@ namespace Tango.PPC.UI.ViewModels private MachineSetupResult _setup_result; private IOperationSystemManager _operationSystemManager; private IPPCApplicationManager _appManager; + private PPCWebClient _ppcWebClient; #region Properties @@ -192,8 +194,9 @@ namespace Tango.PPC.UI.ViewModels /// </summary> /// <param name="applicationManager">The application manager.</param> /// <param name="machineSetupManager">The machine setup manager.</param> - public MachineSetupViewVM(IPPCApplicationManager applicationManager, IMachineSetupManager machineSetupManager, IOperationSystemManager operationSystemManager) + public MachineSetupViewVM(PPCWebClient ppcWebClient, IPPCApplicationManager applicationManager, IMachineSetupManager machineSetupManager, IOperationSystemManager operationSystemManager) { + _ppcWebClient = ppcWebClient; _appManager = applicationManager; MachineSetupManager = machineSetupManager; @@ -210,7 +213,7 @@ namespace Tango.PPC.UI.ViewModels InstallCommand = new RelayCommand(Install); RestartCommand = new RelayCommand(() => { NavigateTo(MachineSetupView.WelcomeView); }); TimeZoneSelectedCommand = new RelayCommand(() => { NavigateTo(MachineSetupView.EnvironmentView); }); - EnvironmentSelectedCommand = new RelayCommand(() => + EnvironmentSelectedCommand = new RelayCommand(() => { NavigateTo(MachineSetupView.SetupWelcomeView); Settings.DeploymentSlot = DeploymentSlot; @@ -348,8 +351,9 @@ namespace Tango.PPC.UI.ViewModels try { + _ppcWebClient.Environment = DeploymentSlot; await _operationSystemManager.ChangeTimeZone(SelectedTimeZone); - _setup_result = await MachineSetupManager.Setup(SerialNumber, HostAddress); + _setup_result = await MachineSetupManager.Setup(SerialNumber); State = MachineSetupStates.Completed; LogManager.Log("Machine setup completed."); await NavigateTo(MachineSetupView.SetupCompletedView); |
