コード例 #1
0
 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);
     }
 }
コード例 #2
0
        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);
            }
        }