Changeset 18 for trunk


Ignore:
Timestamp:
Apr 2, 2016, 9:15:35 PM (9 years ago)
Author:
chronos
Message:
  • Added: Mark written sectors with write flag and blue color.
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Form/UFormMain.pas

    r17 r18  
    197197  Selected: Boolean);
    198198begin
    199   Core.Project.CurrentScan := TDriveScan(Item.Data);
    200   Redraw;
    201   ReloadOperationList;
     199  if Selected then begin
     200    Core.Project.CurrentScan := TDriveScan(Item.Data);
     201    Redraw;
     202    ReloadOperationList;
     203  end;
    202204end;
    203205
     
    243245  with Core.Project do begin
    244246    CurrentScan.DriveName := DriveInfo.Path;
     247    CurrentScan.SectorCount := DriveInfo.SectorCount;
    245248    CurrentScan.SectorSize := DriveInfo.SectorSize;
    246249    CurrentScan.Reset;
  • trunk/UBlockMap.pas

    r10 r18  
    66
    77uses
    8   Classes, SysUtils, Graphics, Math, Contnrs, Dialogs, DOM, XMLRead, XMLWrite,
    9   UXMLUtils;
     8  Classes, SysUtils, Graphics, Math, Contnrs, Dialogs, DOM, UXMLUtils;
    109
    1110type
    12   TSectorState = (bsNone, bsOk, bsDamaged);
     11  TSectorState = (bsNone, bsRead, bsDamaged, bsWrite);
    1312
    1413  TChange = class
     
    270269    while (ChangeIndex < FChanges.Count) and
    271270     (TChange(FChanges[ChangeIndex]).Index <= EndIndex) do begin
    272       if (Result = bsNone) and (TChange(FChanges[ChangeIndex]).Value = bsOk) then Result := bsOk
     271      if (Result <> bsDamaged) and (TChange(FChanges[ChangeIndex]).Value = bsRead) then Result := bsRead
     272        else if (Result <> bsDamaged) and (TChange(FChanges[ChangeIndex]).Value = bsWrite) then Result := bsWrite
    273273        else if TChange(FChanges[ChangeIndex]).Value = bsDamaged then Result := bsDamaged;
    274274      Inc(ChangeIndex);
     
    296296        (I div ItemsCount.X) * BlockSize.Y, BlockSize.X - 1, BlockSize.Y - 1);
    297297      BlockState := GetCombinedSectors(I * SectorPerBlock, (I + 1) * SectorPerBlock);
    298       if BlockState = bsOk then Canvas.Brush.Color := clGreen
     298      if BlockState = bsRead then Canvas.Brush.Color := clGreen
    299299        else if BlockState = bsDamaged then Canvas.Brush.Color := clRed
     300        else if BlockState = bsWrite then Canvas.Brush.Color := clBlue
    300301        else Canvas.Brush.Color := clSilver;
    301302      Canvas.FillRect(Rect);
  • trunk/UDriveScan.pas

    r17 r18  
    212212          BlockMap.Sectors[FSectorCurrent] := bsDamaged;
    213213          Inc(DamagedBlockCount);
    214         end else BlockMap.Sectors[FSectorCurrent] := bsOk;
     214        end else begin
     215          if Mode = rmRead then BlockMap.Sectors[FSectorCurrent] := bsRead
     216            else if Mode = rmWrite then BlockMap.Sectors[FSectorCurrent] := bsWrite;
     217        end;
    215218        Inc(FSectorCurrent);
    216219        if Terminated then Break;
Note: See TracChangeset for help on using the changeset viewer.