aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/LoadingViewVM.cs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-02-17 22:31:33 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-02-17 22:31:33 +0200
commit95c0b0ccb0a1bc60de533464552fcb0c5e44779f (patch)
treec3876a6b03dcf9bb378112571be40231da87c61c /Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/LoadingViewVM.cs
parenta6ebe1e48de8ba5e4d936c4825060a08f2695785 (diff)
downloadTango-95c0b0ccb0a1bc60de533464552fcb0c5e44779f.tar.gz
Tango-95c0b0ccb0a1bc60de533464552fcb0c5e44779f.zip
Some more work on FSE..
Diffstat (limited to 'Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/LoadingViewVM.cs')
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/LoadingViewVM.cs26
1 files changed, 24 insertions, 2 deletions
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/LoadingViewVM.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/LoadingViewVM.cs
index ec6042046..3438b3670 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/LoadingViewVM.cs
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/LoadingViewVM.cs
@@ -14,6 +14,13 @@ namespace Tango.FSE.UI.ViewModels
{
public class LoadingViewVM : FSEViewModel
{
+ private bool _isLoading;
+ public bool IsLoading
+ {
+ get { return _isLoading; }
+ set { _isLoading = value; RaisePropertyChangedAuto(); }
+ }
+
public LoadingViewVM()
{
@@ -21,8 +28,23 @@ namespace Tango.FSE.UI.ViewModels
public async override void OnApplicationStarted()
{
- await GatewayService.GetEnvironments();
- await NavigationManager.NavigateTo(NavigationView.LoginView);
+ try
+ {
+ IsLoading = true;
+ await Task.Delay(1000);
+ await GatewayService.GetEnvironments();
+ await NavigationManager.NavigateTo(NavigationView.LoginView);
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error retrieving environments from gateway.");
+ await NotificationProvider.ShowError("Error retrieving environments from gateway.");
+ ApplicationManager.ShutDown();
+ }
+ finally
+ {
+ IsLoading = false;
+ }
}
public override void OnApplicationReady()