Example #1
0
        /// <summary>
        /// button -> sending your new meme properties to a server
        /// </summary>
        public async void CreateByServer()
        {
            Bitmap  bitmap = ImageHelper.BitmapImage2Bitmap(Image);
            MemeDto meme   = new MemeDto("meme", TopText, BottomText, bitmap);

            meme.Key = client.Key;

            try
            {
                string response = await Task.Run(() => clientRequests.CreateRequest(meme));

                MessageBox.Show("Server reponse: " + response);
            }
            catch (Exception)
            {
                MessageBox.Show("server not response");
            }
        }