Esempio n. 1
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     userViewModel = new UserViewModel();
     userViewModel.GetLoginAccount();
     this.DataContext = userViewModel;
     Windows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed;
 }
Esempio n. 2
0
 private async void Init()
 {
     userViewModel = new UserViewModel();
     this.DataContext = userViewModel;
     if (_localSettings.Values.ContainsKey("isRemember"))
     {
         if(_localSettings.Values["isRemember"].ToString() == "true"){
             await userViewModel.AutoLogin();
             NameShow.Text = userViewModel.User.nickname;
         }
     }
     activityViewModel = new ActivityViewModel();
     this.DataContext = activityViewModel;
 }
Esempio n. 3
0
 public void Init(){
     userViewModel = new UserViewModel();
     userViewModel.GetLoginUser();
     this.DataContext = userViewModel;
 }