예제 #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 Task ChangeUserData(ProfileData data)
        {
            var res = await UsersAPI.EditProfile(data, AppPersistent.UserToken);

            if (res.error)
            {
                FeedbackHelper.ShowPopup(Activity, res.message);
            }
            else
            {
                FeedbackHelper.ShowPopup(Activity, "Success");
            }
        }