コード例 #1
0
        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();
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 private void IllustratorAvatar_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     UserViewer.Show(currentModel.UserId);
 }
コード例 #4
0
 private void UserPrevItem_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     UserViewer.Show(sender.GetDataContext <User>().Id);
 }