Ejemplo n.º 1
0
        public void AddDrive(string name, DriveReader drive)
        {
            this.driveName = name;
            this.drive     = drive;

            this.driveDatabase = new DriveDatabase(name, drive);
            this.driveDatabase.OnPartitionAdded   += DriveDatabase_OnPartitionAdded;
            this.driveDatabase.OnPartitionRemoved += DriveDatabase_OnPartitionRemoved;

            // Single task runner for this drive
            // Currently only one task will be allowed to operate on a drive to avoid race conditions.
            this.taskRunner                = new TaskRunner(this.ParentForm);
            this.taskRunner.TaskStarted   += TaskRunner_TaskStarted;
            this.taskRunner.TaskCompleted += TaskRunner_TaskCompleted;

            this.partitionTabControl.MouseClick += PartitionTabControl_MouseClick;

            foreach (var volume in drive.Partitions)
            {
                AddPartition(volume);
            }

            // Fire SelectedIndexChanged event.
            SelectedIndexChanged();
        }
Ejemplo n.º 2
0
        public DriveDatabase(string driveName, DriveReader drive)
        {
            this.driveName = driveName;
            this.drive     = drive;

            partitionDatabases = new List <PartitionDatabase>();
        }
Ejemplo n.º 3
0
 public FileSignature(Volume volume, long offset)
 {
     this._fileName = null;
     this._fileSize = 0;
     this._offset   = offset;
     this._volume   = volume;
     this._reader   = volume.GetReader();
 }
Ejemplo n.º 4
0
        public PartitionManagerDialog(DriveReader reader, List <Volume> volumes)
        {
            InitializeComponent();

            this.reader  = reader;
            this.volumes = volumes;

            PopulateList(volumes);
        }
Ejemplo n.º 5
0
        public Volume(DriveReader reader, string name, long offset, long length)
        {
            this._reader          = reader;
            this._partitionName   = name;
            this._partitionLength = length;
            this._partitionOffset = offset;

            this._platform = (reader.ByteOrder == ByteOrder.Big) ?
                             Platform.X360 : Platform.Xbox;

            Mounted = false;
        }