Пример #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);
 }