Changeset 21 for trunk/Form


Ignore:
Timestamp:
Apr 2, 2016, 11:12:47 PM (9 years ago)
Author:
chronos
Message:
  • Added: Suport for physical drive enumeration under Windows.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        22lib
        33CoolDisk.lps
         4CoolDisk.exe
  • trunk/Form/UFormMain.lfm

    r16 r21  
    11object FormMain: TFormMain
    2   Left = 442
    3   Height = 941
    4   Top = 366
    5   Width = 1703
     2  Left = -26
     3  Height = 925
     4  Top = 276
     5  Width = 1694
    66  Caption = 'CoolDisk'
    7   ClientHeight = 909
    8   ClientWidth = 1703
     7  ClientHeight = 0
     8  ClientWidth = 0
    99  Menu = MainMenu1
    1010  OnClose = FormClose
     
    1313  OnDestroy = FormDestroy
    1414  OnShow = FormShow
    15   LCLVersion = '1.7'
     15  LCLVersion = '1.6.0.4'
    1616  object ToolBar1: TToolBar
    1717    Left = 0
    1818    Height = 26
    1919    Top = 0
    20     Width = 1703
     20    Width = 0
    2121    Caption = 'ToolBar1'
    2222    Images = Core.ImageList1
     
    2828    end
    2929    object ToolButton2: TToolButton
    30       Left = 24
    31       Top = 2
     30      Left = 1
     31      Top = 24
    3232      Action = AScanStop
    3333    end
    3434    object ToolButton3: TToolButton
    35       Left = 47
    36       Top = 2
     35      Left = 1
     36      Top = 46
    3737      Action = AScanContinue
    3838    end
    3939  end
    4040  object Panel1: TPanel
    41     Left = 597
    42     Height = 883
    43     Top = 26
    44     Width = 1106
     41    Left = 0
     42    Height = 0
     43    Top = 0
     44    Width = 0
    4545    Align = alClient
    4646    BevelOuter = bvNone
    47     ClientHeight = 883
    48     ClientWidth = 1106
     47    ClientHeight = 0
     48    ClientWidth = 0
    4949    TabOrder = 1
    5050    object Image1: TImage
    51       Left = 8
    52       Height = 867
    53       Top = 8
    54       Width = 1090
     51      Left = 0
     52      Height = 0
     53      Top = 0
     54      Width = 0
    5555      Align = alClient
    5656      BorderSpacing.Around = 8
     
    6060  object Panel2: TPanel
    6161    Left = 0
    62     Height = 883
    63     Top = 26
     62    Height = 0
     63    Top = 0
    6464    Width = 592
    6565    Align = alLeft
    6666    BevelOuter = bvNone
    67     ClientHeight = 883
     67    ClientHeight = 0
    6868    ClientWidth = 592
    6969    TabOrder = 2
     
    7878    object Label1: TLabel
    7979      Left = 15
    80       Height = 24
     80      Height = 15
    8181      Top = 675
    82       Width = 101
     82      Width = 58
    8383      Caption = 'Sector size:'
    8484      ParentColor = False
     
    8686    object LabelSectorSize: TLabel
    8787      Left = 256
    88       Height = 24
     88      Height = 15
    8989      Top = 675
    90       Width = 10
     90      Width = 6
    9191      Caption = '  '
    9292      ParentColor = False
     
    9494    object LabelSectorCount: TLabel
    9595      Left = 256
    96       Height = 24
     96      Height = 15
    9797      Top = 704
    98       Width = 10
     98      Width = 6
    9999      Caption = '  '
    100100      ParentColor = False
     
    102102    object Label2: TLabel
    103103      Left = 15
    104       Height = 24
     104      Height = 15
    105105      Top = 704
    106       Width = 119
     106      Width = 70
    107107      Caption = 'Sector count:'
    108108      ParentColor = False
     
    110110    object LabelBlockCurrent: TLabel
    111111      Left = 256
    112       Height = 24
     112      Height = 15
    113113      Top = 736
    114       Width = 10
     114      Width = 6
    115115      Caption = '  '
    116116      ParentColor = False
     
    118118    object Label3: TLabel
    119119      Left = 15
    120       Height = 24
     120      Height = 15
    121121      Top = 736
    122       Width = 136
     122      Width = 78
    123123      Caption = 'Current sector:'
    124124      ParentColor = False
     
    126126    object Label4: TLabel
    127127      Left = 15
    128       Height = 24
     128      Height = 15
    129129      Top = 768
    130       Width = 162
     130      Width = 94
    131131      Caption = 'Damaged sectors:'
    132132      ParentColor = False
     
    134134    object LabelBlockDamaged: TLabel
    135135      Left = 256
    136       Height = 24
     136      Height = 15
    137137      Top = 764
    138       Width = 10
     138      Width = 6
    139139      Caption = '  '
    140140      ParentColor = False
     
    142142    object Label5: TLabel
    143143      Left = 15
    144       Height = 24
     144      Height = 15
    145145      Top = 796
    146       Width = 122
     146      Width = 70
    147147      Caption = 'Elapsed time:'
    148148      ParentColor = False
     
    150150    object LabelElapsedTime: TLabel
    151151      Left = 256
    152       Height = 24
     152      Height = 15
    153153      Top = 792
    154       Width = 10
     154      Width = 6
    155155      Caption = '  '
    156156      ParentColor = False
     
    158158    object Label6: TLabel
    159159      Left = 15
    160       Height = 24
     160      Height = 15
    161161      Top = 824
    162       Width = 142
     162      Width = 82
    163163      Caption = 'Estimated time:'
    164164      ParentColor = False
     
    166166    object LabelEstimatedTime: TLabel
    167167      Left = 257
    168       Height = 24
     168      Height = 15
    169169      Top = 820
    170       Width = 10
     170      Width = 6
    171171      Caption = '  '
    172172      ParentColor = False
     
    174174    object Label7: TLabel
    175175      Left = 15
    176       Height = 24
     176      Height = 15
    177177      Top = 644
    178       Width = 160
     178      Width = 93
    179179      Caption = 'Sectors per Block:'
    180180      ParentColor = False
     
    182182    object LabelSectorPerBlock: TLabel
    183183      Left = 256
    184       Height = 24
     184      Height = 15
    185185      Top = 640
    186       Width = 10
     186      Width = 6
    187187      Caption = '  '
    188188      ParentColor = False
     
    190190    object LabelIOSpeed: TLabel
    191191      Left = 256
    192       Height = 24
     192      Height = 15
    193193      Top = 848
    194       Width = 10
     194      Width = 6
    195195      Caption = '  '
    196196      ParentColor = False
     
    198198    object Label8: TLabel
    199199      Left = 15
    200       Height = 24
     200      Height = 15
    201201      Top = 852
    202       Width = 94
     202      Width = 54
    203203      Caption = 'I/O speed:'
    204204      ParentColor = False
     
    223223    object Label10: TLabel
    224224      Left = 15
    225       Height = 24
     225      Height = 15
    226226      Top = 612
    227       Width = 40
     227      Width = 23
    228228      Caption = 'Size:'
    229229      ParentColor = False
     
    231231    object LabelSize: TLabel
    232232      Left = 256
    233       Height = 24
     233      Height = 15
    234234      Top = 608
    235       Width = 10
     235      Width = 6
    236236      Caption = '  '
    237237      ParentColor = False
     
    283283    object Label11: TLabel
    284284      Left = 17
    285       Height = 24
     285      Height = 15
    286286      Top = 141
    287       Width = 107
     287      Width = 61
    288288      Caption = 'Operations:'
    289289      ParentColor = False
     
    299299    object ComboBoxDrive: TComboBox
    300300      Left = 8
    301       Height = 38
     301      Height = 23
    302302      Top = 16
    303303      Width = 416
    304304      Anchors = [akTop, akLeft, akRight]
    305       ItemHeight = 0
     305      ItemHeight = 15
    306306      OnChange = ComboBoxDriveChange
    307307      Style = csDropDownList
     
    326326  end
    327327  object Splitter1: TSplitter
    328     Left = 592
    329     Height = 883
    330     Top = 26
     328    Left = 0
     329    Height = 0
     330    Top = 0
    331331    Width = 5
    332332  end
  • trunk/Form/UFormMain.pas

    r20 r21  
    242242    DriveInfo.Assign(TDriveInfo(ComboBoxDrive.Items.Objects[ComboBoxDrive.ItemIndex]));
    243243    Modified := True;
    244     Core.Project.ScanProfile.SectorCount := DriveInfo.SectorCount;
    245     Core.Project.ScanProfile.SectorStart := 0;
    246     Core.Project.ScanProfile.SectorEnd := Core.Project.ScanProfile.SectorCount - 1;
     244    Core.Project.ScanProfile.LoadFromDriveInfo(DriveInfo);
    247245    UpdateInterface;
    248246    Redraw;
     
    307305  ComboBoxDrive.ItemIndex := Core.DriveList.IndexOf(Core.DriveList.FindByModel(Core.Project.DriveInfo.Model));
    308306  if (ComboBoxDrive.ItemIndex = -1) and (ComboBoxDrive.Items.Count > 0) then ComboBoxDrive.ItemIndex := 0;
    309   ComboBoxDriveChange(Self);
     307  if ComboBoxDrive.ItemIndex <> -1 then
     308    Core.Project.DriveInfo.Assign(TDriveInfo(ComboBoxDrive.Items.Objects[ComboBoxDrive.ItemIndex]));
     309  Core.Project.ScanProfile.LoadFromDriveInfo(Core.Project.DriveInfo);
    310310
    311311  Redraw;
  • trunk/Form/UFormOperation.pas

    r19 r21  
    6161  ComboBoxRunMode.ItemIndex := Integer(DriveScan.Mode);
    6262  EditPattern.Text := '0x' + IntToHex(DriveScan.WritePattern, 2);
    63   SpinEditLastSector.MaxValue := DriveScan.SectorCount;
     63  SpinEditLastSector.MaxValue := DriveScan.SectorCount - 1;
    6464  SpinEditFirstSector.Value := DriveScan.SectorStart;
    6565  SpinEditLastSector.Value := DriveScan.SectorEnd;
Note: See TracChangeset for help on using the changeset viewer.