Esempio n. 1
0
        private void ValidateAppBarButton_Click(object sender, RoutedEventArgs e)
        {
            HTTPRequest connect = new HTTPRequest();

            connect.RequestFinished += new HTTPRequest.RequestFinishedEventHandler(this.doEditProfile);
            connect.HttpPutRequest("https://musicsheetwriter.tk/api/users/" + my_user.PersonalData.Id + "/personal_data", "{ \"firstname\":\"" + this.FirstnameTextBlock.Text + "\",\n\"lastname\":\"" + this.LastnameTextBlock.Text + "\",\n\"email\":\"" + my_user.PersonalData.Email + "\",\n\"message\":\"" + this.MessageTextBlock.Text + "\" }");

            HTTPRequest connect_sec = new HTTPRequest();

            connect_sec.RequestFinished += new HTTPRequest.RequestFinishedEventHandler(this.doEditProfile2);
            connect_sec.HttpPutRequestUpload("https://musicsheetwriter.tk/api/users/" + my_user.PersonalData.Id + "/photo", byteArray, contentType);

            Frame.Navigate(typeof(AccountPage), "{\"id\":\"" + my_user.PersonalData.Id + "\",\"username\":\"" + my_user.PersonalData.Username + "\",\"last_activity_date\":null}");
            System.Diagnostics.Debug.WriteLine("{\"id\":\"" + my_user.PersonalData.Id + "\",\"username\":\"" + my_user.PersonalData.Username + "\",\"last_activity_date\":null}");
        }
Esempio n. 2
0
 private void ValidateAppBarButton_Click(object sender, RoutedEventArgs e)
 {
     HTTPRequest connect = new HTTPRequest();
     connect.RequestFinished += new HTTPRequest.RequestFinishedEventHandler(this.doChangePassword);
     connect.HttpPutRequest("https://musicsheetwriter.tk/api/users/" + my_user.PersonalData.Id + "/password", "{ \"current_password\":\"" + this.CurrentPasswordTextBlock.Text + "\",\n\"new_password\":\"" + this.NewPasswordTextBlock.Text + "\" }");
 }