public App(string dataBasePath, double screenHeight, double screenWidth) { DataBasePath = dataBasePath; ScreenWidth = screenWidth; ScreenHeight = screenHeight; InitializeComponent(); var userManager = new AccountManager(); App.UserInfo = userManager.GetUserInfo(); Application.Current.MainPage = App.UserInfo == null ? (Page) new LoginScreen() : new MainPage(); }
protected override void OnResume() { var userManager = new AccountManager(); if (App.UserInfo != null && !userManager.IsValid(App.UserInfo.UserName)) { Application.Current.MainPage.DisplayAlert("Información", "No es posible, verificar su identidad. Por favor ingrese nuevamente sus credenciales", "Ok"); userManager.DeleteUserInfo(App.UserInfo); App.UserInfo = null; Application.Current.MainPage = new LoginScreen(); } }