Inheritance: IWipeObject
        public void InsertDrive(char name, bool wipeFreeSpace, bool wipeClusterTips, bool wipeMft)
        {
            if(_logger != null && _testMode) {
                _logger.LogMethodCall(name, wipeFreeSpace, wipeClusterTips, wipeMft);
            }

            if(_session == null || _afterWipe) {
                return;
            }

            DriveWipeObject drive = new DriveWipeObject();
            drive.AddDrive(name);
            drive.WipeMethodId = WipeOptions.DefaultWipeMethod;
            drive.WipeFreeSpace = wipeFreeSpace;
            drive.WipeClusterTips = wipeClusterTips;
            drive.WipeMFT = wipeMft;

            // add to the list
            _session.BridgeItems.Add(drive);

            // report to session
            if(reportActions) {
                ActionErrorReporter.ReportError(_session, _afterWipe, ErrorSeverity.Low,
                                                DriveInsertOperation, name);
            }
        }
Example #2
0
        private void InsertButton_Click(object sender, EventArgs e)
        {
            if(_insertMode == true && insertCount > 0) {
                DriveWipeObject temp = new DriveWipeObject();
                temp.WipeMethodId = _drive.WipeMethodId;

                _drive = temp;
            }

            // get the settings
            SaveToDriveObject();
            _drive.WipeFreeSpace = FreeSpaceCheckbox.Checked;
            _drive.WipeClusterTips = ClusterTipsCheckbox.Checked;
            _drive.WipeMFT = MFTCheckbox.Checked;

            if(_insertMode == true) {
                wipeModule.Session.Items.Add(_drive);
                wipeModule.InsertObject(_drive);

                _drive = new DriveWipeObject();
                insertCount++;
            }
            else {
                wipeModule.UpdateObject(_objectIndex, _drive);
                wipeModule.ObjectList.Select();
                wipeModule.ObjectList.SelectedIndices.Clear();
                wipeModule.ObjectList.SelectedIndices.Add(_objectIndex);
            }
        }