Changeset 19 for trunk/Form


Ignore:
Timestamp:
Apr 2, 2016, 10:01:11 PM (9 years ago)
Author:
chronos
Message:
  • Modified: Parameters for next scan operation is not stored separatelly from scans itself. So changing parameters will not affect current selected scan item.
Location:
trunk/Form
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Form/UFormMain.pas

    r18 r19  
    230230    DriveInfo.Assign(TDriveInfo(ComboBoxDrive.Items.Objects[ComboBoxDrive.ItemIndex]));
    231231    Modified := True;
    232     CurrentScan.SectorCount := DriveInfo.SectorCount;
    233     CurrentScan.SectorSize := DriveInfo.SectorSize;
    234     CurrentScan.SectorStart := 0;
    235     CurrentScan.SectorEnd := CurrentScan.SectorCount - 1;
    236     CurrentScan.Reset;
     232    Core.Project.ScanProfile.SectorCount := DriveInfo.SectorCount;
     233    Core.Project.ScanProfile.SectorStart := 0;
     234    Core.Project.ScanProfile.SectorEnd := Core.Project.ScanProfile.SectorCount - 1;
    237235    UpdateInterface;
    238236    Redraw;
     
    247245    CurrentScan.SectorCount := DriveInfo.SectorCount;
    248246    CurrentScan.SectorSize := DriveInfo.SectorSize;
     247    Core.Project.ScanProfile.SectorCount := Core.Project.DriveInfo.SectorCount;
     248    CurrentScan.LoadProfile(Core.Project.ScanProfile);;
    249249    CurrentScan.Reset;
    250250    CurrentScan.OnChange := DriveScanChange;
     
    353353procedure TFormMain.AOperationOptionsExecute(Sender: TObject);
    354354begin
    355   FormOperation.Load(Core.Project.CurrentScan);
     355  Core.Project.ScanProfile.SectorCount := Core.Project.DriveInfo.SectorCount;
     356  FormOperation.Load(Core.Project.ScanProfile);
    356357  if FormOperation.ShowModal = mrOk then begin
    357     FormOperation.Save(Core.Project.CurrentScan);
     358    FormOperation.Save(Core.Project.ScanProfile);
    358359    Core.Project.Modified := True;
    359360    UpdateInterface;
  • trunk/Form/UFormOperation.pas

    r11 r19  
    2828    procedure UpdateMaxValues;
    2929  public
    30     procedure Load(DriveScan: TDriveScan);
    31     procedure Save(DriveScan: TDriveScan);
     30    procedure Load(DriveScan: TDriveScanProfile);
     31    procedure Save(DriveScan: TDriveScanProfile);
    3232  end;
    3333
     
    5757end;
    5858
    59 procedure TFormOperation.Load(DriveScan: TDriveScan);
     59procedure TFormOperation.Load(DriveScan: TDriveScanProfile);
    6060begin
    6161  ComboBoxRunMode.ItemIndex := Integer(DriveScan.Mode);
     
    6767end;
    6868
    69 procedure TFormOperation.Save(DriveScan: TDriveScan);
     69procedure TFormOperation.Save(DriveScan: TDriveScanProfile);
    7070begin
    7171  DriveScan.Mode := TRunMode(ComboBoxRunMode.ItemIndex);
Note: See TracChangeset for help on using the changeset viewer.