/// <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..."; })); } }
public void TransferProgressChangedEventHandler(object sender, TransferProgressEventArgs e) { OnProgressChanged(e); }
public void OnProgressChanged(TransferProgressEventArgs e) { EventHandler <TransferProgressEventArgs> handler = ProgressChanged; handler?.Invoke(this, e); }
public void OnProgressChanged(TransferProgressEventArgs e) { EventHandler<TransferProgressEventArgs> handler = ProgressChanged; if (handler != null) handler(this, e); }