Changeset 20


Ignore:
Timestamp:
Apr 2, 2016, 10:38:43 PM (9 years ago)
Author:
chronos
Message:
  • Added: Ability to select specific file from file system for scanning.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Form/UFormMain.pas

    r19 r20  
    228228  with Core.Project do
    229229  if (ComboBoxDrive.ItemIndex <> -1) and (DriveInfo.Path <> TDriveInfo(ComboBoxDrive.Items.Objects[ComboBoxDrive.ItemIndex]).Path) then begin
     230    with TDriveInfo(ComboBoxDrive.Items.Objects[ComboBoxDrive.ItemIndex]) do
     231    if Kind = dkFile then begin
     232      OpenDialog1.FileName := Path;
     233      if OpenDialog1.Execute and FileExists(OpenDialog1.FileName) then begin
     234        Path := OpenDialog1.FileName;
     235        Size := FileSize(Path);
     236        Model := OpenDialog1.FileName;
     237        SectorSize := 4096;
     238        SectorCount := Size div SectorSize;
     239        Core.DriveList.LoadToStrings(ComboBoxDrive.Items);
     240      end;
     241    end;
    230242    DriveInfo.Assign(TDriveInfo(ComboBoxDrive.Items.Objects[ComboBoxDrive.ItemIndex]));
    231243    Modified := True;
     
    485497  Title := '';
    486498  if Assigned(Project) then
    487     Title := Title + Project.FileName + ' - ';
     499    Title := Title + ExtractFileName(Project.FileName) + ' - ';
    488500  Title := Title + Application.Title;
    489501  if Assigned(Project) and Project.Modified then
  • trunk/UPhysDrive.pas

    r16 r20  
    109109  end;
    110110  {$ENDIF}
    111 {  NewDriveInfo := TDriveInfo.Create;
     111  // Drive located using filename
     112  NewDriveInfo := TDriveInfo.Create;
    112113  NewDriveInfo.Kind := dkFile;
    113114  NewDriveInfo.Model := 'File';
     
    117118  NewDriveInfo.Path := '';
    118119  Add(NewDriveInfo);
    119   }
    120120end;
    121121
Note: See TracChangeset for help on using the changeset viewer.