Пример #1
0
        public void SendFile()
        {
            if (this._currentPostTask != null)
            {
                return; // don't post the 2nd time
            }

            string url = "http://posttestserver.com/post.php?dir=wp7posttest";
            var parameters = new Dictionary<string, object>();
            parameters.Add("name", this.PhotoName);
            parameters.Add("photo", this._photoBytes);

            this._currentPostTask = new HttpPostImageClass(url, parameters, this.OnPostCompleted);
            this._currentPostTask.OnError = this.OnPostError;

            this._currentPostTask.Execute();
        }
Пример #2
0
 private void OnPostCompleted(string response)
 {
     this.PostResultMessage = response;
     this.IsPostCompleted = true;
     this._currentPostTask = null;
 }
Пример #3
0
 private void OnPostError(string message)
 {
     this.PostResultMessage = message;
     this.IsPostCompleted = true;
     this._currentPostTask = null;
 }