bool VerifyUsbItem( PWLib.UsbDrive.UsbDriveInfo driveInfo )
 {
     return false;
     //if ( mObject != null && mObject.mVolumeId != null )
     //{
     //    return !driveInfo.Equals( mObject.mVolumeId.Identifier.UsbDrive );
     //}
     //else
     //    return true;
 }
Exemple #2
0
        public void FormatUsbDrive( PWLib.UsbDrive.UsbDriveInfo driveInfo )
        {
            string rootDir = driveInfo.DriveId.DriveRootDirectory;
            Log.WriteLine( LogType.All, "Commencing format of usb drive " + rootDir + "..." );
            PWLib.Platform.Windows.Path.DeletePath( rootDir, true );

            mEventController.InvokeFormatUsbFinished();

            Log.WriteLine( LogType.All, "Format complete" );
        }
 void Instance_DeviceRemoved( object sender, PWLib.UsbDrive.UsbDriveInfo drive )
 {
     List<PWLib.UsbDrive.UsbDriveInfo> driveInfo = PWLib.UsbDrive.UsbDriveList.Instance.BuildActiveDriveList();
     mTreeView.SetObjects( driveInfo );
 }
 public void TransferVolume( VolumeDescriptor vid, PWLib.UsbDrive.UsbDriveInfo newDrive )
 {
     mSpineThread.TransferVolume( vid, newDrive );
 }
 public void FormatUsbDrive( PWLib.UsbDrive.UsbDriveInfo drive )
 {
     mSpineThread.FormatUsbDrive( drive );
 }
 public VolumeUsbSource( PWLib.UsbDrive.UsbDriveInfo driveInfo )
     : base(VolumeType.UsbDevice)
 {
     mDrive = driveInfo;
     Init();
 }
 public void TransferVolume( VolumeDescriptor vid, PWLib.UsbDrive.UsbDriveInfo newDrive )
 {
     QueuedTransferInfo transferInfo = new QueuedTransferInfo();
     transferInfo.mDescriptor = vid;
     transferInfo.mNewDrive = newDrive;
     mWorkerThread.RegisterOneShotTask( new PWLib.BackgroundWorkerThread.TaskPredicate( OnWorkerPredicate ),
         new PWLib.BackgroundWorkerThread.Task( OnWorkerTransfer ), new PWLib.BackgroundWorkerThread.TaskError( OnWorkerError ), transferInfo );
 }
 public void FormatUsbDrive( PWLib.UsbDrive.UsbDriveInfo driveInfo )
 {
     mWorkerThread.RegisterOneShotTask( new PWLib.BackgroundWorkerThread.TaskPredicate( OnWorkerPredicate ),
         new PWLib.BackgroundWorkerThread.Task( OnWorkerUsbFormat ), new PWLib.BackgroundWorkerThread.TaskError( OnWorkerError ), driveInfo );
 }
 void mFileCopyEx_CopyProgress( object sender, PWLib.Platform.Windows.CopyProgressEventArgs e )
 {
     if ( mArchiveFileDelegate != null )
         mArchiveFileDelegate( ( ulong )e.TotalBytesTransferred, ( ulong )e.TotalFileSize, mUserData );
 }