private void PrivatePush( System.IO.FileInfo file, string remote )
{
this.TotalItems = 1;
this.TotalSize = file.Length;
SetFromStatus ( Environment.MachineName, file.Directory.FullName, CommandRunner.Instance.DefaultDevice, remote );
SpeedTest ( );
SetItemsRemainingStatus ( this.TotalItems.ToString ( ) );
SetCopyInfoLabel ( );
SetTitle ( );
new Thread ( delegate ( ) {
try {
CommandRunner.Instance.PushFile ( file.FullName, remote );
this.DialogResult = DialogResult.OK;
this.OnTransferComplete ( EventArgs.Empty );
} catch ( Exception ex ) {
TransferException = ex;
this.DialogResult = DialogResult.Abort;
this.OnTransferError ( EventArgs.Empty );
try {
if ( this.InvokeRequired ) {
this.Invoke ( new GenericDelegate ( this.Close ) );
} else {
this.Close ( );
}
} catch {
}
}
} ).Start ( );
}