static void transfer_OnFinshed(Tftp.Net.ITftpTransfer transfer) { }
static void transfer_OnError(Tftp.Net.ITftpTransfer transfer, Tftp.Net.TftpTransferError error) { throw new Exception("Tftp transfer failed: " + error); }
static void transfer_OnProgress(Tftp.Net.ITftpTransfer transfer, Tftp.Net.TftpTransferProgress progress) { player.Play(); }
private void TransferOnProgress(Tftp.Net.ITftpTransfer transfer, Tftp.Net.TftpTransferProgress progress) { var uploadProgress = (int)Math.Floor(100.0 * progress.TransferredBytes / progress.TotalBytes); this.progressBar1.Invoke((MethodInvoker) delegate { this.progressBar1.Value = uploadProgress; }); }
private void TransferOnError(Tftp.Net.ITftpTransfer transfer, Tftp.Net.TftpTransferError error) { this._cancellationTokenSource.Cancel(); }
private void TransferOnFinished(Tftp.Net.ITftpTransfer transfer) { this._cancellationTokenSource.Cancel(); }