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/FormCompare.pas

    r152 r153  
    4444uses
    4545  Core, FormCompareSideBySide, VCardProcessor;
     46
     47resourcestring
     48  SCompareToolNotFound = 'Compare tool ''%s'' not found. Select valid compare tool in the application settings.';
    4649
    4750{ TFormCompare }
     
    150153  SaveStringToFile(TextLeft, TempFileLeft);
    151154  SaveStringToFile(TextRight, TempFileRight);
    152   ExecuteProgram(Core.Core.CompareTool, [TempFileLeft, TempFileRight]);
     155  if FileExists(Core.Core.CompareTool) then
     156    ExecuteProgram(Core.Core.CompareTool, [TempFileLeft, TempFileRight])
     157    else ShowMessage(Format(SCompareToolNotFound, [Core.Core.CompareTool]));
    153158end;
    154159
    155160procedure TFormCompare.CompareExternal;
    156161begin
    157   CompareText(LeftVCard.VCard.AsString, RightVCard.Vcard.AsString,
     162  CompareText(LeftVCard.VCard.AsString, RightVCard.VCard.AsString,
    158163    ExtractFileName(LeftVCard.FileName), ExtractFileName(EditAnotherFile.Text));
    159164end;
Note: See TracChangeset for help on using the changeset viewer.