Ignore:
Timestamp:
Jun 6, 2023, 9:46:08 PM (18 months ago)
Author:
chronos
Message:
  • Added: Accept dropped files onto the application form.
  • Fixed: Report error if compare tool was not found.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/FormMain.pas

    r152 r153  
    5959    procedure FormCreate(Sender: TObject);
    6060    procedure FormDestroy(Sender: TObject);
     61    procedure FormDropFiles(Sender: TObject; const FileNames: array of string);
    6162    procedure FormResize(Sender: TObject);
    6263    procedure FormShow(Sender: TObject);
     
    8586resourcestring
    8687  SModified = 'Modified';
     88  SOnlyOneFileCanBeDropped = 'Only one file can be dropped at once.';
    8789
    8890{ TFormMain }
     
    111113begin
    112114  FreeAndNil(FormContacts);
     115end;
     116
     117procedure TFormMain.FormDropFiles(Sender: TObject;
     118  const FileNames: array of string);
     119begin
     120  if Length(FileNames) <> 1 then ShowMessage(SOnlyOneFileCanBeDropped)
     121    else begin
     122      Core.Core.FileOpen(FileNames[0]);
     123      Core.Core.UpdateFile;
     124    end;
    113125end;
    114126
Note: See TracChangeset for help on using the changeset viewer.