private async void GetCurrentUserInfoButton_Click(object sender, RoutedEventArgs e) { var userInfo = await _client.GetCurrentUserAsync(); if (userInfo.ErrorCode == 0) { MessageBox.Show(userInfo.ErrorMessage); return; } MessageBox.Show("昵称:" + userInfo.Nickname); }
private async void GetCurrentUserInfoButton_Click(object sender, RoutedEventArgs e) { var userInfo = await _client.GetCurrentUserAsync(); if (!userInfo.Success()) { await new MessageDialog(userInfo.ErrorMessage).ShowAsync(); return; } await new MessageDialog("昵称:" + userInfo.Nickname).ShowAsync(); }