Changeset 31 for trunk/Form
- Timestamp:
- Apr 30, 2016, 12:16:19 AM (9 years ago)
- Location:
- trunk/Form
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Form/UFormMain.lfm
r29 r31 62 62 Height = 24 63 63 Top = 179 64 Width = 10164 Width = 96 65 65 Caption = 'Sector size:' 66 66 ParentColor = False … … 86 86 Height = 24 87 87 Top = 208 88 Width = 11 988 Width = 113 89 89 Caption = 'Sector count:' 90 90 ParentColor = False … … 102 102 Height = 24 103 103 Top = 240 104 Width = 1 36104 Width = 127 105 105 Caption = 'Current sector:' 106 106 ParentColor = False … … 110 110 Height = 24 111 111 Top = 272 112 Width = 1 62112 Width = 154 113 113 Caption = 'Damaged sectors:' 114 114 ParentColor = False … … 126 126 Height = 24 127 127 Top = 300 128 Width = 1 22128 Width = 115 129 129 Caption = 'Elapsed time:' 130 130 ParentColor = False … … 142 142 Height = 24 143 143 Top = 328 144 Width = 1 42144 Width = 135 145 145 Caption = 'Estimated time:' 146 146 ParentColor = False … … 158 158 Height = 24 159 159 Top = 148 160 Width = 1 60160 Width = 153 161 161 Caption = 'Sectors per Block:' 162 162 ParentColor = False … … 182 182 Height = 24 183 183 Top = 356 184 Width = 94184 Width = 88 185 185 Caption = 'I/O speed:' 186 186 ParentColor = False … … 190 190 Height = 24 191 191 Top = 116 192 Width = 40192 Width = 38 193 193 Caption = 'Size:' 194 194 ParentColor = False … … 314 314 Height = 24 315 315 Top = 16 316 Width = 10 7316 Width = 100 317 317 Caption = 'Operations:' 318 318 ParentColor = False -
trunk/Form/UFormMain.pas
r29 r31 520 520 BasePrefixMultipliers, SBytes); 521 521 LabelSectorCount.Caption := IntToStr(Project.DriveInfo.SectorCount); 522 LabelSectorSize.Caption := IntToStr(Project.DriveInfo.SectorSize) + ' ' + SBytes;522 LabelSectorSize.Caption := PrefixMultiplier.Add(Project.DriveInfo.SectorSize, BasePrefixMultipliers, SBytes); 523 523 end else begin 524 524 LabelSize.Caption := ''; -
trunk/Form/UFormProject.lfm
r13 r31 9 9 LCLVersion = '1.7' 10 10 object SpinEditSectorSize: TSpinEdit 11 Left = 19211 Left = 224 12 12 Height = 34 13 13 Top = 152 14 14 Width = 101 15 MaxValue = 10000016 MinValue = 115 MaxValue = 63 16 OnChange = SpinEditSectorSizeChange 17 17 TabOrder = 0 18 18 Value = 1 … … 92 92 ParentColor = False 93 93 end 94 object Label5: TLabel 95 Left = 192 96 Height = 24 97 Top = 160 98 Width = 22 99 Caption = '2^' 100 ParentColor = False 101 end 102 object Label6: TLabel 103 Left = 341 104 Height = 24 105 Top = 160 106 Width = 11 107 Caption = '=' 108 ParentColor = False 109 end 94 110 end -
trunk/Form/UFormProject.pas
r15 r31 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Spin, 9 StdCtrls, UProject ;9 StdCtrls, UProject, Math; 10 10 11 11 type … … 22 22 Label3: TLabel; 23 23 Label4: TLabel; 24 Label5: TLabel; 25 Label6: TLabel; 24 26 LabelSectorCount: TLabel; 25 27 SpinEditSectorSize: TSpinEdit; 28 procedure SpinEditSectorSizeChange(Sender: TObject); 26 29 private 30 procedure UpdateSectorSize; 27 31 public 28 32 procedure Load(Project: TProject); … … 42 46 { TFormProject } 43 47 48 procedure TFormProject.SpinEditSectorSizeChange(Sender: TObject); 49 begin 50 UpdateSectorSize; 51 end; 52 53 procedure TFormProject.UpdateSectorSize; 54 begin 55 Label6.Caption := '= ' + IntToStr(Trunc(IntPower(2, SpinEditSectorSize.Value))) + ' bytes'; 56 end; 57 44 58 procedure TFormProject.Load(Project: TProject); 45 59 begin 46 60 Core.DriveList.LoadToStrings(ComboBoxDrive.Items); 47 61 EditName.Text := Project.Name; 48 SpinEditSectorSize.Value := Project.DriveInfo.SectorSize;62 SpinEditSectorSize.Value := Trunc(Log2(Project.DriveInfo.SectorSize)); 49 63 ComboBoxDrive.ItemIndex := Core.DriveList.IndexOf(Core.DriveList.FindByModel(Project.DriveInfo.Model)); 64 UpdateSectorSize; 50 65 end; 51 66 … … 53 68 begin 54 69 Project.Name := EditName.Text; 55 Project.DriveInfo.SectorSize := SpinEditSectorSize.Value;70 Project.DriveInfo.SectorSize := Trunc(IntPower(2, SpinEditSectorSize.Value)); 56 71 end; 57 72
Note:
See TracChangeset
for help on using the changeset viewer.