From 6fb22273d15ed476ccbd3820de6af9bc0deee793 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 26 Nov 2018 14:19:06 +0200 Subject: Implemented Application Initialization Error and Handling. --- .../PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs') 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 486829103..5598362be 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs @@ -54,6 +54,17 @@ namespace Tango.PPC.UI.ViewModels { Task.Delay(1000).ContinueWith((x) => { IsLoading = true; }); } + + applicationManager.ApplicationInitializationError += ApplicationManager_ApplicationInitializationError; + } + + private void ApplicationManager_ApplicationInitializationError(object sender, Exception ex) + { + InvokeUI(() => + { + NavigationManager.NavigateWithObject(NavigationView.LoadingErrorView, ex); + IsLoading = false; + }); } /// -- cgit v1.3.1