Changeset 153 for trunk/Forms
- Timestamp:
- Jun 6, 2023, 9:46:08 PM (18 months ago)
- Location:
- trunk/Forms
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormCompare.pas
r152 r153 44 44 uses 45 45 Core, FormCompareSideBySide, VCardProcessor; 46 47 resourcestring 48 SCompareToolNotFound = 'Compare tool ''%s'' not found. Select valid compare tool in the application settings.'; 46 49 47 50 { TFormCompare } … … 150 153 SaveStringToFile(TextLeft, TempFileLeft); 151 154 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])); 153 158 end; 154 159 155 160 procedure TFormCompare.CompareExternal; 156 161 begin 157 CompareText(LeftVCard.VCard.AsString, RightVCard.V card.AsString,162 CompareText(LeftVCard.VCard.AsString, RightVCard.VCard.AsString, 158 163 ExtractFileName(LeftVCard.FileName), ExtractFileName(EditAnotherFile.Text)); 159 164 end; -
trunk/Forms/FormMain.lfm
r152 r153 4 4 Top = 401 5 5 Width = 1178 6 AllowDropFiles = True 6 7 Caption = 'vCard Studio' 7 8 ClientHeight = 762 … … 13 14 OnCreate = FormCreate 14 15 OnDestroy = FormDestroy 16 OnDropFiles = FormDropFiles 15 17 OnResize = FormResize 16 18 OnShow = FormShow -
trunk/Forms/FormMain.pas
r152 r153 59 59 procedure FormCreate(Sender: TObject); 60 60 procedure FormDestroy(Sender: TObject); 61 procedure FormDropFiles(Sender: TObject; const FileNames: array of string); 61 62 procedure FormResize(Sender: TObject); 62 63 procedure FormShow(Sender: TObject); … … 85 86 resourcestring 86 87 SModified = 'Modified'; 88 SOnlyOneFileCanBeDropped = 'Only one file can be dropped at once.'; 87 89 88 90 { TFormMain } … … 111 113 begin 112 114 FreeAndNil(FormContacts); 115 end; 116 117 procedure TFormMain.FormDropFiles(Sender: TObject; 118 const FileNames: array of string); 119 begin 120 if Length(FileNames) <> 1 then ShowMessage(SOnlyOneFileCanBeDropped) 121 else begin 122 Core.Core.FileOpen(FileNames[0]); 123 Core.Core.UpdateFile; 124 end; 113 125 end; 114 126
Note:
See TracChangeset
for help on using the changeset viewer.