aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-08-07 19:26:57 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-08-07 19:26:57 +0300
commit6511527e4b576d29fc97aa80479b61d7d1abc079 (patch)
tree9734dc9bc5b6c347c7fc651702419afa37d0d3d9 /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs
parent3bcad30c7eacb41c134631f79bb50957751f11c7 (diff)
downloadTango-6511527e4b576d29fc97aa80479b61d7d1abc079.tar.gz
Tango-6511527e4b576d29fc97aa80479b61d7d1abc079.zip
Working on PPC 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.cs22
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);
+ }
}
}
}