Ejemplo n.º 1
0
        public static async Task <bool> PostNewCoverImageDataAsync(CoverImageData coverImageData)
        {
            string uri    = @"https://145.44.233.207/user/post/update/images";
            var    result = await Post(uri, coverImageData);

            return(true);
        }
Ejemplo n.º 2
0
        //Save button
        private async void btnSave_Click(object sender1, RoutedEventArgs e)
        {
            object image = ImageList.SelectedItem;

            if (image == null)
            {
                //If no image is selected, show a message
                MessageBox.Show("Please select a cover image!", "");
            }
            else
            {
                //Set the selected image as the user's cover image
                MatchMakerClassLibrary.CoverImageData coverImageData = new MatchMakerClassLibrary.CoverImageData();
                coverImageData.userID    = userID;
                coverImageData.imageName = (image as Img).Src.Key;

                ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true;

                if (await MatchmakerAPI_Client.PostNewCoverImageDataAsync(coverImageData))
                {
                    MessageBox.Show("Image saved!", "");
                }
            }
        }