public static async void Show(string id) { var info = await HttpClientFactory.AppApiService.GetUserInformation(new UserInformationRequest { Id = id }); var v = new UserViewer(new User { Avatar = info.UserEntity.ProfileImageUrls.Medium, Id = info.UserEntity.Id.ToString(), Introduction = info.UserEntity.Comment, IsFollowed = info.UserEntity.IsFollowed, Name = info.UserEntity.Name }); v.Show(); }
private async void ShowArtist(string userId) { if (!userId.IsNumber()) { Notice(Externally.InputIllegal("单个用户")); return; } try { await HttpClientFactory.AppApiService.GetUserInformation(new UserInformationRequest { Id = userId }); } catch (ApiException e) { if (e.StatusCode == HttpStatusCode.NotFound) { Notice(Externally.CannotFindUser); return; } } UserViewer.Show(userId); }
private void IllustratorAvatar_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e) { UserViewer.Show(currentModel.UserId); }
private void UserPrevItem_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e) { UserViewer.Show(sender.GetDataContext <User>().Id); }