diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-08-08 18:45:09 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-08-08 18:45:09 +0300 |
| commit | 965a7bd752315653d710d16651f34d66d4d80d0a (patch) | |
| tree | 957a2a8844f1ce848c98df987c3911bae9bb0d52 /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs | |
| parent | 6456de92a4f6d2f9e6367e92ebefd9b49d578952 (diff) | |
| parent | a5f9c99d51f7e096ff612da6605ab4d4f5067009 (diff) | |
| download | Tango-965a7bd752315653d710d16651f34d66d4d80d0a.tar.gz Tango-965a7bd752315653d710d16651f34d66d4d80d0a.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
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(); + } + } } } |
