Пример #1
0
 private async void CommentButton_OnClick(object sender, RoutedEventArgs e)
 {
     if (!User.IsLogin)
     {
         LoginBox lb = new LoginBox();
         lb.LoginCompleted += CommentSubmitShow;
         await lb.ShowAsync();
     }
     else
     {
         CommentSubmitShow(this, User.UserLoginData);
     }
 }
Пример #2
0
 private async void UserButtonOnClick(object sender, RoutedEventArgs e)
 {
     if (User.IsLogin)
     {
         if (PlatformHelper.IsMobile)
         {
             App.RootFrame.Navigate(typeof(UserCenter));
         }
         else
         {
             PopupFrame.Instance.Show(typeof(UserCenter));
         }
     }
     else
     {
         LoginBox lb = new LoginBox();
         lb.LoginCompleted += (o, rootobject) =>
         {
             Debug.WriteLine("欢迎你:" + rootobject.Username);
         };
         await lb.ShowAsync();
     }
 }