예제 #1
0
        private async void btnChangeBanner_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                var profile = await UsersAPI.GetUserProfileByID(AppPersistent.LocalUserId);

                if (!profile.error)
                {
                    profile.data[0].photo = txtPicURL.Text;
                    var res = await UsersAPI.EditProfile(profile.data[0], AppPersistent.UserToken);

                    if (!res.error)
                    {
                        DialogManager.ShowDialog("S U C C", "You changed your avatar.");
                    }
                    else
                    {
                        DialogManager.ShowDialog("F U C K", res.message);
                    }
                }
                else
                {
                    DialogManager.ShowDialog("F U C K", profile.message);
                }
            }
            catch (Exception ex)
            {
                DialogManager.ShowDialog("F U C K", ex.Message);
            }
        }
예제 #2
0
        private async void btnSteal_Click(object sender, RoutedEventArgs e)
        {
            var victimData = await UsersAPI.GetUserProfileByID(System.Convert.ToInt32(txtStealId.Value));

            await UsersAPI.EditProfile(victimData.data[0], AppPersistent.UserToken);

            DialogManager.ShowDialog("Success", "Profile copied");
        }
예제 #3
0
        private async void Grid_Loaded(object sender, RoutedEventArgs e)
        {
            var profile = await UsersAPI.GetUserProfileByID(AppPersistent.LocalUserId);

            Login       = profile.data[0].login;
            Username    = profile.data[0].name;
            AvatarURL   = profile.data[0].photo;
            DataContext = this;
        }
예제 #4
0
        private async Task UpdateData()
        {
            var requestData = await UsersAPI.GetUserProfileByID(AppPersistent.LocalUserId);

            if (!requestData.error)
            {
                m_LoginView.Text    = requestData.data[0].login;
                m_UserNameView.Text = requestData.data[0].name;
            }
        }
예제 #5
0
        private async void ViewUserProfile_Click(object sender, RoutedEventArgs e)
        {
            int id      = (lstComments.SelectedItem as UserComment).UserID;
            var profile = await UsersAPI.GetUserProfileByID(id);

            if (profile.error)
            {
                DialogManager.ShowDialog("ERROR", profile.message);
                return;
            }
            GoToProfile(profile.data[0]);
        }
예제 #6
0
        private async void ChangeBanner_Click(object sender, EventArgs e)
        {
            var res = await UsersAPI.GetUserProfileByID(AppPersistent.LocalUserId);

            if (!res.error)
            {
                res.data[0].banner = m_ProfilePicURL.Text;
                await ChangeUserData(res.data[0]);
            }
            else
            {
                FeedbackHelper.ShowPopup(Activity, res.message);
            }
        }
예제 #7
0
        private async void GoToPosterProfile_Click(object sender, RoutedEventArgs e)
        {
            var profile = await UsersAPI.GetUserProfileByID(m_PosterId.GetValueOrDefault());

            GoToProfile(profile.data[0]);
        }