diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-08-08 13:35:27 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-08-08 13:35:27 +0300 |
| commit | 57ae9d131e898a35061507bc8497bcf648cf00d1 (patch) | |
| tree | 91e5c55fdcced791f509b24d13c4a73294a295f2 /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs | |
| parent | 8dac70e25c92eea8278c564615509386a1a0182d (diff) | |
| download | Tango-57ae9d131e898a35061507bc8497bcf648cf00d1.tar.gz Tango-57ae9d131e898a35061507bc8497bcf648cf00d1.zip | |
Working on machine setup !
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs index d5915eeb0..2a76ba80f 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs @@ -12,6 +12,7 @@ using Tango.Core.Helpers; using Tango.PPC.Common; using Tango.PPC.Common.Application; using Tango.PPC.Common.Authentication; +using Tango.PPC.Common.MachineSetup; using Tango.PPC.Common.Modules; using Tango.PPC.Common.Navigation; using Tango.PPC.Common.Notifications; @@ -25,9 +26,11 @@ namespace Tango.PPC.UI.ViewModels /// Represents the PPC loading splash screen view model. /// </summary> /// <seealso cref="Tango.PPC.Common.PPCViewModel" /> - public class LoadingViewVM : PPCViewModel + public class LoadingViewVM : PPCViewModel, INavigationObjectReceiver<MachineSetupResult> { private bool _setup; + private SetupRequiredEventArgs _setupArgs; + private bool _post_setup; /// <summary> /// Gets or sets the module loader. @@ -59,6 +62,7 @@ namespace Tango.PPC.UI.ViewModels private void ApplicationManager_SetupRequired(object sender, SetupRequiredEventArgs e) { + _setupArgs = e; _setup = true; NavigationManager.NavigateTo(NavigationView.MachineSetupView); } @@ -70,10 +74,23 @@ namespace Tango.PPC.UI.ViewModels { IsLoading = false; - if (!_setup) + if (!_setup || _post_setup) { NavigationManager.NavigateTo(NavigationView.LoginView); } } + + public async void OnNavigatedToWithObject(MachineSetupResult machineSetupResult) + { + if (machineSetupResult.Completed) + { + _post_setup = true; + _setup = false; + IsLoading = true; + + await Task.Delay(500); + _setupArgs.Continue(); + } + } } } |
