Example #1
0
		void _Sender_Completed(object sender, FileSenderCompletedEventArgs e)
		{
			if (e.Status == FileSender.SendStatus.Success)
				uxText.Text = string.Format("{0} transferred successfully. New filename is {1}.", System.IO.Path.GetFileName(_File.Name), e.NewFilename);
			else
			{
				uxText.Text = e.Message;
			}
		}
Example #2
0
		void OnCompleted(SendStatus status, string newFilename, string message)
		{
			if (_Completed != null)
			{
				Delegate d = new FileSenderCompletedEventHandler(_Completed);

				FileSenderCompletedEventArgs e = new FileSenderCompletedEventArgs();
				e.NewFilename = newFilename;
				e.Status = status;
				e.Message = message;

				this._UIDispatcher.BeginInvoke(d, null, e);
			}
		}
Example #3
0
		void OnCompleted(Exception ex)
		{
			if (_Completed != null)
			{
				Delegate d = new FileSenderCompletedEventHandler(_Completed);

				FileSenderCompletedEventArgs e = new FileSenderCompletedEventArgs();
				e.Error = ex;
				e.Status = SendStatus.Failed;
				e.Message = ex.Message;

				this._UIDispatcher.BeginInvoke(d, null, e);
			}
		}