diff options
| author | Avi Levkovich <avi@twine-s.com> | 2018-08-08 16:38:27 +0300 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2018-08-08 16:38:27 +0300 |
| commit | be5c498b723efa8f8e02332e5af40ea0214b0fb7 (patch) | |
| tree | fac99de033373d1870177433b93eb065132413d1 /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs | |
| parent | ddf8b4ad6edff6b9ac1e80d0a55cff5edb06a3e8 (diff) | |
| parent | a610818fef1bafdd75ab904d19fa7f206942ce97 (diff) | |
| download | Tango-be5c498b723efa8f8e02332e5af40ea0214b0fb7.tar.gz Tango-be5c498b723efa8f8e02332e5af40ea0214b0fb7.zip | |
merge conflicts
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 | 22 |
1 files changed, 19 insertions, 3 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 38616f39f..d5915eeb0 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs @@ -27,6 +27,8 @@ namespace Tango.PPC.UI.ViewModels /// <seealso cref="Tango.PPC.Common.PPCViewModel" /> public class LoadingViewVM : PPCViewModel { + private bool _setup; + /// <summary> /// Gets or sets the module loader. /// </summary> @@ -46,9 +48,19 @@ namespace Tango.PPC.UI.ViewModels /// <summary> /// Initializes a new instance of the <see cref="LoadingViewVM"/> class. /// </summary> - public LoadingViewVM() + public LoadingViewVM(IPPCApplicationManager applicationManager) { - Task.Delay(1000).ContinueWith((x) => { IsLoading = true; }); + if (!DesignMode) + { + applicationManager.SetupRequired += ApplicationManager_SetupRequired; + Task.Delay(1000).ContinueWith((x) => { IsLoading = true; }); + } + } + + private void ApplicationManager_SetupRequired(object sender, SetupRequiredEventArgs e) + { + _setup = true; + NavigationManager.NavigateTo(NavigationView.MachineSetupView); } /// <summary> @@ -56,8 +68,12 @@ namespace Tango.PPC.UI.ViewModels /// </summary> public override void OnApplicationStarted() { - NavigationManager.NavigateTo(NavigationView.LoginView); IsLoading = false; + + if (!_setup) + { + NavigationManager.NavigateTo(NavigationView.LoginView); + } } } } |
