private async void logon(User user) { loginViewModel.logon(user); if (loginViewModel.NowAuthenticate.IsAuthenticated) { MainPage = new View.MainPage(new MainPageViewModel(loginViewModel.user)); } else { MainPage = new View.Login(loginViewModel); } }
protected override void OnStart() { OnResume(); var lastUser = new DataBase.UserDataBase().GetLastUser(); if (lastUser == null) { var viewLogin = new View.Login(loginViewModel); MainPage = viewLogin; } else { logon(lastUser); } }