Changeset 22
- Timestamp:
- Apr 4, 2016, 12:24:37 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Form/UFormBenchmark.lfm
r1 r22 1 1 object FormBenchmark: TFormBenchmark 2 Left = 8 672 Left = 874 3 3 Height = 711 4 Top = 1344 Top = 372 5 5 Width = 773 6 6 Caption = 'Benchmark' -
trunk/Form/UFormMain.lfm
r21 r22 1 1 object FormMain: TFormMain 2 Left = -263 Height = 9 254 Top = 2765 Width = 1 6942 Left = 433 3 Height = 941 4 Top = 335 5 Width = 1703 6 6 Caption = 'CoolDisk' 7 ClientHeight = 08 ClientWidth = 07 ClientHeight = 909 8 ClientWidth = 1703 9 9 Menu = MainMenu1 10 10 OnClose = FormClose … … 13 13 OnDestroy = FormDestroy 14 14 OnShow = FormShow 15 LCLVersion = '1. 6.0.4'15 LCLVersion = '1.7' 16 16 object ToolBar1: TToolBar 17 17 Left = 0 18 18 Height = 26 19 19 Top = 0 20 Width = 020 Width = 1703 21 21 Caption = 'ToolBar1' 22 22 Images = Core.ImageList1 … … 28 28 end 29 29 object ToolButton2: TToolButton 30 Left = 131 Top = 2 430 Left = 24 31 Top = 2 32 32 Action = AScanStop 33 33 end 34 34 object ToolButton3: TToolButton 35 Left = 136 Top = 4635 Left = 47 36 Top = 2 37 37 Action = AScanContinue 38 38 end 39 39 end 40 40 object Panel1: TPanel 41 Left = 042 Height = 043 Top = 044 Width = 041 Left = 597 42 Height = 883 43 Top = 26 44 Width = 1106 45 45 Align = alClient 46 46 BevelOuter = bvNone 47 ClientHeight = 048 ClientWidth = 047 ClientHeight = 883 48 ClientWidth = 1106 49 49 TabOrder = 1 50 50 object Image1: TImage 51 Left = 052 Height = 053 Top = 054 Width = 051 Left = 8 52 Height = 867 53 Top = 8 54 Width = 1090 55 55 Align = alClient 56 56 BorderSpacing.Around = 8 … … 60 60 object Panel2: TPanel 61 61 Left = 0 62 Height = 063 Top = 062 Height = 883 63 Top = 26 64 64 Width = 592 65 65 Align = alLeft 66 66 BevelOuter = bvNone 67 ClientHeight = 067 ClientHeight = 883 68 68 ClientWidth = 592 69 69 TabOrder = 2 … … 78 78 object Label1: TLabel 79 79 Left = 15 80 Height = 1580 Height = 24 81 81 Top = 675 82 Width = 5882 Width = 101 83 83 Caption = 'Sector size:' 84 84 ParentColor = False … … 86 86 object LabelSectorSize: TLabel 87 87 Left = 256 88 Height = 1588 Height = 24 89 89 Top = 675 90 Width = 690 Width = 10 91 91 Caption = ' ' 92 92 ParentColor = False … … 94 94 object LabelSectorCount: TLabel 95 95 Left = 256 96 Height = 1596 Height = 24 97 97 Top = 704 98 Width = 698 Width = 10 99 99 Caption = ' ' 100 100 ParentColor = False … … 102 102 object Label2: TLabel 103 103 Left = 15 104 Height = 15104 Height = 24 105 105 Top = 704 106 Width = 70106 Width = 119 107 107 Caption = 'Sector count:' 108 108 ParentColor = False … … 110 110 object LabelBlockCurrent: TLabel 111 111 Left = 256 112 Height = 15112 Height = 24 113 113 Top = 736 114 Width = 6114 Width = 10 115 115 Caption = ' ' 116 116 ParentColor = False … … 118 118 object Label3: TLabel 119 119 Left = 15 120 Height = 15120 Height = 24 121 121 Top = 736 122 Width = 78122 Width = 136 123 123 Caption = 'Current sector:' 124 124 ParentColor = False … … 126 126 object Label4: TLabel 127 127 Left = 15 128 Height = 15128 Height = 24 129 129 Top = 768 130 Width = 94130 Width = 162 131 131 Caption = 'Damaged sectors:' 132 132 ParentColor = False … … 134 134 object LabelBlockDamaged: TLabel 135 135 Left = 256 136 Height = 15136 Height = 24 137 137 Top = 764 138 Width = 6138 Width = 10 139 139 Caption = ' ' 140 140 ParentColor = False … … 142 142 object Label5: TLabel 143 143 Left = 15 144 Height = 15144 Height = 24 145 145 Top = 796 146 Width = 70146 Width = 122 147 147 Caption = 'Elapsed time:' 148 148 ParentColor = False … … 150 150 object LabelElapsedTime: TLabel 151 151 Left = 256 152 Height = 15152 Height = 24 153 153 Top = 792 154 Width = 6154 Width = 10 155 155 Caption = ' ' 156 156 ParentColor = False … … 158 158 object Label6: TLabel 159 159 Left = 15 160 Height = 15160 Height = 24 161 161 Top = 824 162 Width = 82162 Width = 142 163 163 Caption = 'Estimated time:' 164 164 ParentColor = False … … 166 166 object LabelEstimatedTime: TLabel 167 167 Left = 257 168 Height = 15168 Height = 24 169 169 Top = 820 170 Width = 6170 Width = 10 171 171 Caption = ' ' 172 172 ParentColor = False … … 174 174 object Label7: TLabel 175 175 Left = 15 176 Height = 15176 Height = 24 177 177 Top = 644 178 Width = 93178 Width = 160 179 179 Caption = 'Sectors per Block:' 180 180 ParentColor = False … … 182 182 object LabelSectorPerBlock: TLabel 183 183 Left = 256 184 Height = 15184 Height = 24 185 185 Top = 640 186 Width = 6186 Width = 10 187 187 Caption = ' ' 188 188 ParentColor = False … … 190 190 object LabelIOSpeed: TLabel 191 191 Left = 256 192 Height = 15192 Height = 24 193 193 Top = 848 194 Width = 6194 Width = 10 195 195 Caption = ' ' 196 196 ParentColor = False … … 198 198 object Label8: TLabel 199 199 Left = 15 200 Height = 15200 Height = 24 201 201 Top = 852 202 Width = 54202 Width = 94 203 203 Caption = 'I/O speed:' 204 204 ParentColor = False … … 223 223 object Label10: TLabel 224 224 Left = 15 225 Height = 15225 Height = 24 226 226 Top = 612 227 Width = 23227 Width = 40 228 228 Caption = 'Size:' 229 229 ParentColor = False … … 231 231 object LabelSize: TLabel 232 232 Left = 256 233 Height = 15233 Height = 24 234 234 Top = 608 235 Width = 6235 Width = 10 236 236 Caption = ' ' 237 237 ParentColor = False … … 283 283 object Label11: TLabel 284 284 Left = 17 285 Height = 15285 Height = 24 286 286 Top = 141 287 Width = 61287 Width = 107 288 288 Caption = 'Operations:' 289 289 ParentColor = False … … 299 299 object ComboBoxDrive: TComboBox 300 300 Left = 8 301 Height = 23301 Height = 38 302 302 Top = 16 303 303 Width = 416 304 304 Anchors = [akTop, akLeft, akRight] 305 ItemHeight = 15305 ItemHeight = 0 306 306 OnChange = ComboBoxDriveChange 307 307 Style = csDropDownList … … 326 326 end 327 327 object Splitter1: TSplitter 328 Left = 0329 Height = 0330 Top = 0328 Left = 592 329 Height = 883 330 Top = 26 331 331 Width = 5 332 332 end -
trunk/Form/UFormMain.pas
r21 r22 185 185 if (Item.Index >= 0) and (Item.Index < Scans.Count) then 186 186 with TDriveScan(Scans[Item.Index]) do begin 187 Item.Caption := IntToStr(Item.Index);187 Item.Caption := GetName; 188 188 Item.Data := TDriveScan(Scans[Item.Index]); 189 189 Item.SubItems.Add(DateTimeToStr(TimeStart)); … … 309 309 Core.Project.ScanProfile.LoadFromDriveInfo(Core.Project.DriveInfo); 310 310 311 311 312 Redraw; 312 313 UpdateInterface; … … 357 358 Scans.Add(NewOperation); 358 359 CurrentScan := TDriveScan(Scans.Last); 360 CurrentScan.LoadProfile(ScanProfile); 359 361 ReloadOperationList; 360 362 Redraw; -
trunk/Form/UFormOperation.lfm
r13 r22 69 69 Height = 34 70 70 Top = 64 71 Width = 1 3871 Width = 162 72 72 MaxValue = 100000 73 73 OnChange = SpinEditFirstSectorChange … … 79 79 Height = 34 80 80 Top = 104 81 Width = 1 3881 Width = 162 82 82 MaxValue = 100000 83 83 OnChange = SpinEditLastSectorChange -
trunk/Form/UFormOperation.pas
r21 r22 60 60 begin 61 61 ComboBoxRunMode.ItemIndex := Integer(DriveScan.Mode); 62 EditPattern.Text := ' 0x' + IntToHex(DriveScan.WritePattern, 2);62 EditPattern.Text := '$' + IntToHex(DriveScan.WritePattern, 2); 63 63 SpinEditLastSector.MaxValue := DriveScan.SectorCount - 1; 64 64 SpinEditFirstSector.Value := DriveScan.SectorStart; -
trunk/UConfig.pas
r16 r22 9 9 10 10 const 11 ConfigTest = True;11 ConfigTest = False; 12 12 13 13 implementation -
trunk/UDriveScan.pas
r21 r22 6 6 7 7 uses 8 Classes, SysUtils, Syncobjs, UBlockMap, Forms, DOM, 9 UXMLUtils, Contnrs , UPhysDrive;8 Classes, SysUtils, Syncobjs, UBlockMap, Forms, DOM, UConfig, 9 UXMLUtils, Contnrs; 10 10 11 11 type … … 36 36 WritePattern: Byte; 37 37 procedure LoadFromDriveInfo(DriveInfo: TDriveInfo); 38 end; 39 40 { TTestStream } 41 42 TTestStream = class(TStream) 43 public 44 function Read(var Buffer; Count: Longint): Longint; override; 45 function Write(const Buffer; Count: Longint): Longint; override; 46 function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; override; 38 47 end; 39 48 … … 68 77 SectorStart: Integer; 69 78 SectorEnd: Integer; 79 function GetName: string; 70 80 function GetElapsedTime: TDateTime; 71 81 procedure Reset; … … 106 116 end; 107 117 118 { TTestStream } 119 120 function TTestStream.Read(var Buffer; Count: Longint): Longint; 121 begin 122 // if Random < 0.00001 then Result := 0 123 // else 124 Result := Count; 125 end; 126 127 function TTestStream.Write(const Buffer; Count: Longint): Longint; 128 begin 129 end; 130 131 function TTestStream.Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; 132 begin 133 end; 134 108 135 { TDriveScanList } 109 136 … … 206 233 procedure TDriveScan.Run; 207 234 var 208 F: T FileStream;235 F: TStream; 209 236 RealSize: Integer; 210 237 Buffer: array of Byte; … … 213 240 Lock.Acquire; 214 241 Terminated := False; 215 if Mode = rmRead then F := TFileStream.Create(DriveName, fmOpenRead) 216 else if Mode = rmWrite then F := TFileStream.Create(DriveName, fmOpenReadWrite); 242 if ConfigTest then F := TTestStream.Create 243 else begin 244 if Mode = rmRead then F := TFileStream.Create(DriveName, fmOpenRead) 245 else if Mode = rmWrite then F := TFileStream.Create(DriveName, fmOpenReadWrite); 246 end; 217 247 try 218 248 SetLength(Buffer, SectorSize); … … 264 294 end; 265 295 296 function TDriveScan.GetName: string; 297 begin 298 if Mode = rmRead then Result := 'Read' 299 else if Mode = rmWrite then Result := 'Write pattern $' + IntToHex(WritePattern, 2) 300 else Result := ''; 301 end; 302 266 303 procedure TDriveScan.Stop; 267 304 begin … … 305 342 with Node do begin 306 343 WriteInteger(Node, 'DamagedBlockCount', DamagedBlockCount); 344 WriteInteger(Node, 'RunMode', Integer(Mode)); 307 345 WriteInteger(Node, 'WritePattern', WritePattern); 308 346 WriteString(Node, 'DriveName', DriveName); … … 327 365 with Node do begin 328 366 DamagedBlockCount := ReadInteger(Node, 'DamagedBlockCount', 0); 367 Mode := TRunMode(ReadInteger(Node, 'RunMode', 0)); 329 368 WritePattern := ReadInteger(Node, 'WritePattern', 0); 330 369 DriveName := ReadString(Node, 'DriveName', '');
Note:
See TracChangeset
for help on using the changeset viewer.