Changeset 20 for trunk/Form


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.
File:
1 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
Note: See TracChangeset for help on using the changeset viewer.