Changeset 227 for trunk/Forms/FormImport.pas
- Timestamp:
- Jan 20, 2025, 11:38:55 AM (42 hours ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormImport.pas
r219 r227 23 23 procedure ImportMediaWiki; 24 24 procedure ImportCSV; 25 public 26 AcronymDb: TAcronymDb; 25 27 end; 26 28 … … 29 31 30 32 {$R *.lfm} 31 32 uses33 Core;34 33 35 34 resourcestring … … 75 74 AcronymMeaning := Trim(Copy(Line, 2, Length(Line))); 76 75 if (AcronymName <> '') and (AcronymMeaning <> '') then begin 77 Acronym := Core.Core.AcronymDb.Acronyms.SearchByName(AcronymName);76 Acronym := AcronymDb.Acronyms.SearchByName(AcronymName); 78 77 if not Assigned(Acronym) then begin 79 78 Acronym := TAcronym.Create; 80 79 Acronym.Name := AcronymName; 81 Core.Core.AcronymDb.Acronyms.Add(Acronym);80 AcronymDb.Acronyms.Add(Acronym); 82 81 end; 83 82 Meaning := Acronym.Meanings.SearchByName(AcronymMeaning); … … 92 91 end; 93 92 end; 94 if AddedCount > 0 then Core.Core.AcronymDb.Modified := True;93 if AddedCount > 0 then AcronymDb.Modified := True; 95 94 ShowMessage(Format(SImportedNewAcronyms, [AddedCount])); 96 95 end; … … 121 120 else AcronymDescription := ''; 122 121 if (AcronymName <> '') and (AcronymDescription <> '') then begin 123 Acronym := Core.Core.AcronymDb.Acronyms.SearchByName(AcronymName);122 Acronym := AcronymDb.Acronyms.SearchByName(AcronymName); 124 123 if not Assigned(Acronym) then begin 125 124 Acronym := TAcronym.Create; 126 125 Acronym.Name := AcronymName; 127 Core.Core.AcronymDb.Acronyms.Add(Acronym);126 AcronymDb.Acronyms.Add(Acronym); 128 127 end; 129 128 Meaning := Acronym.Meanings.SearchByName(AcronymDescription); … … 139 138 end; 140 139 Columns.Free; 141 if AddedCount > 0 then Core.Core.AcronymDb.Modified := True;140 if AddedCount > 0 then AcronymDb.Modified := True; 142 141 ShowMessage(Format(SImportedNewAcronyms, [AddedCount])); 143 142 end;
Note:
See TracChangeset
for help on using the changeset viewer.