示例#1
0
 /// <summary>
 ///     Fired when the uploading progress changes.
 /// </summary>
 private void ProgressChanged(object sender, TransferProgressEventArgs e)
 {
     Invoke(
         new Action(
             () =>
                 loadingLabel.Text =
                     String.Format("Uploading package... {0}% | {1}KB/s", Math.Round(e.Percentage, 1),
                         e.BytesPerSecond/1024)));
     if (_uploadCancelled)
     {
         Invoke(new Action(() => { loadingLabel.Text = "Cancelling upload..."; }));
     }
 }
示例#2
0
 public void TransferProgressChangedEventHandler(object sender, TransferProgressEventArgs e)
 {
     OnProgressChanged(e);
 }
示例#3
0
        public void OnProgressChanged(TransferProgressEventArgs e)
        {
            EventHandler <TransferProgressEventArgs> handler = ProgressChanged;

            handler?.Invoke(this, e);
        }
示例#4
0
 public void OnProgressChanged(TransferProgressEventArgs e)
 {
     EventHandler<TransferProgressEventArgs> handler = ProgressChanged;
     if (handler != null)
         handler(this, e);
 }