aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs
diff options
context:
space:
mode:
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.cs21
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();
+ }
+ }
}
}