DroidExplorer.Core.UI.TransferDialog.PrivatePull C# (CSharp) Method

PrivatePull() private method

private PrivatePull ( DroidExplorer remoteFile, System destFile ) : void
remoteFile DroidExplorer
destFile System
return void
        private void PrivatePull( DroidExplorer.Core.IO.FileInfo remoteFile, System.IO.FileInfo destFile )
        {
            this.TotalItems = 1;
            this.TotalSize = remoteFile.Size;
            SetFromStatus ( CommandRunner.Instance.DefaultDevice, remoteFile.FullPath, Environment.MachineName, destFile.Directory.Name );
            SpeedTest ( );
            SetItemsRemainingStatus ( this.TotalItems.ToString ( ) );
            SetCopyInfoLabel ( );
            SetTitle ( );

            new Thread ( delegate ( ) {
                try {
                    System.IO.FileInfo result = CommandRunner.Instance.PullFile ( remoteFile.FullPath );
                    if ( !destFile.Directory.Exists ) {
                        destFile.Directory.Create ( );
                    }
                    if ( string.Compare ( destFile.FullName, result.FullName, true ) != 0 ) {
                        result.CopyTo ( destFile.FullName, true );
                    }
                    this.DialogResult = DialogResult.OK;
                    this.OnTransferComplete ( EventArgs.Empty );
                } catch ( Exception ex ) {
                    TransferException = ex;
                    this.DialogResult = DialogResult.Abort;
                    this.OnTransferError ( EventArgs.Empty );
                } finally {

                    try {
                        if ( !this.IsDisposed ) {
                            if ( this.InvokeRequired ) {
                                this.Invoke ( new GenericDelegate ( this.Close ) );
                            } else {
                                this.Close ( );
                            }
                        }
                    } catch (Exception) { }
                }
            } ).Start ( );
        }

Same methods

TransferDialog::PrivatePull ( List files, System destPath ) : void
TransferDialog::PrivatePull ( List files, System destPath ) : void