diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-08-13 15:47:59 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-08-13 15:47:59 +0300 |
| commit | c6864d03caa002d590dbe2abc43a931b26fc7b27 (patch) | |
| tree | b066b7307aab9af7fd76de4bf26795434fd0ee5e /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs | |
| parent | ba3d7e34700be27d5eed1c2a58f6cd146296fd95 (diff) | |
| parent | fe8111ccce920b73b47b6af657f1ee4bcac11120 (diff) | |
| download | Tango-c6864d03caa002d590dbe2abc43a931b26fc7b27.tar.gz Tango-c6864d03caa002d590dbe2abc43a931b26fc7b27.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_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 | 33 |
1 files changed, 2 insertions, 31 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 2a76ba80f..77767d588 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs @@ -26,12 +26,8 @@ namespace Tango.PPC.UI.ViewModels /// Represents the PPC loading splash screen view model. /// </summary> /// <seealso cref="Tango.PPC.Common.PPCViewModel" /> - public class LoadingViewVM : PPCViewModel, INavigationObjectReceiver<MachineSetupResult> + public class LoadingViewVM : PPCViewModel { - private bool _setup; - private SetupRequiredEventArgs _setupArgs; - private bool _post_setup; - /// <summary> /// Gets or sets the module loader. /// </summary> @@ -55,42 +51,17 @@ namespace Tango.PPC.UI.ViewModels { if (!DesignMode) { - applicationManager.SetupRequired += ApplicationManager_SetupRequired; Task.Delay(1000).ContinueWith((x) => { IsLoading = true; }); } } - private void ApplicationManager_SetupRequired(object sender, SetupRequiredEventArgs e) - { - _setupArgs = e; - _setup = true; - NavigationManager.NavigateTo(NavigationView.MachineSetupView); - } - /// <summary> /// Called when the application has been started. /// </summary> public override void OnApplicationStarted() { IsLoading = false; - - 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(); - } + NavigationManager.NavigateTo(NavigationView.LoginView); } } } |
