示例#1
0
 static void transfer_OnFinshed(Tftp.Net.ITftpTransfer transfer)
 {
 }
示例#2
0
 static void transfer_OnError(Tftp.Net.ITftpTransfer transfer, Tftp.Net.TftpTransferError error)
 {
     throw new Exception("Tftp transfer failed: " + error);
 }
示例#3
0
 static void transfer_OnProgress(Tftp.Net.ITftpTransfer transfer, Tftp.Net.TftpTransferProgress progress)
 {
     player.Play();
 }
示例#4
0
        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; });
        }
示例#5
0
 private void TransferOnError(Tftp.Net.ITftpTransfer transfer, Tftp.Net.TftpTransferError error)
 {
     this._cancellationTokenSource.Cancel();
 }
示例#6
0
 private void TransferOnFinished(Tftp.Net.ITftpTransfer transfer)
 {
     this._cancellationTokenSource.Cancel();
 }