Changeset 86 for trunk/Forms/UFormAcronyms.pas
- Timestamp:
- Aug 8, 2016, 1:41:25 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormAcronyms.pas
r85 r86 63 63 64 64 uses 65 U FormMain, UFormAcronym;65 UCore, UFormMain, UFormAcronym; 66 66 67 67 resourcestring … … 126 126 if FormAcronym.ShowModal = mrOk then begin 127 127 FormAcronym.Save(TempEntry); 128 Meaning := FormMain.AcronymDb.AddAcronym(TempEntry.Name, TempEntry.Meaning);128 Meaning := Core.AcronymDb.AddAcronym(TempEntry.Name, TempEntry.Meaning); 129 129 Meaning.Description := TempEntry.Description; 130 130 Meaning.Categories.AssignFromStrings(TempEntry.Categories); … … 161 161 not FormMain.CompareStrings(TempEntry.Categories, TempCategories) then begin 162 162 // TODO: Update item inplace if possible 163 FormMain.AcronymDb.RemoveMeaning(TAcronymMeaning(ListViewAcronyms.Selected.Data));164 Meaning := FormMain.AcronymDb.AddAcronym(TempEntry.Name, TempEntry.Meaning);163 Core.AcronymDb.RemoveMeaning(TAcronymMeaning(ListViewAcronyms.Selected.Data)); 164 Meaning := Core.AcronymDb.AddAcronym(TempEntry.Name, TempEntry.Meaning); 165 165 Meaning.Description := TempEntry.Description; 166 166 Meaning.Categories.AssignFromStrings(TempEntry.Categories); … … 186 186 if ListViewAcronyms.Items[I].Selected then begin 187 187 ListViewAcronyms.Items[I].Selected := False; 188 FormMain.AcronymDb.RemoveMeaning(TAcronymMeaning(ListViewAcronyms.Items[I].Data));188 Core.AcronymDb.RemoveMeaning(TAcronymMeaning(ListViewAcronyms.Items[I].Data)); 189 189 end; 190 190 UpdateAcronymsList; … … 231 231 procedure TFormAcronyms.ListViewSort1Filter(ListViewSort: TListViewSort); 232 232 begin 233 FormMain.AcronymDb.Acronyms.Sort(AcronymComparer);234 FormMain.AcronymDb.AssignToList(ListViewSort1.List);233 Core.AcronymDb.Acronyms.Sort(AcronymComparer); 234 Core.AcronymDb.AssignToList(ListViewSort1.List); 235 235 MeaningCount := ListViewSort1.List.Count; 236 236 FilterList(ListViewSort1.List); … … 276 276 procedure TFormAcronyms.UpdateInterface; 277 277 begin 278 ARemove.Enabled := Assigned( FormMain.AcronymDb) and Assigned(ListViewAcronyms.Selected);279 AModify.Enabled := Assigned( FormMain.AcronymDb) and Assigned(ListViewAcronyms.Selected);280 AAdd.Enabled := Assigned( FormMain.AcronymDb);278 ARemove.Enabled := Assigned(Core.AcronymDb) and Assigned(ListViewAcronyms.Selected); 279 AModify.Enabled := Assigned(Core.AcronymDb) and Assigned(ListViewAcronyms.Selected); 280 AAdd.Enabled := Assigned(Core.AcronymDb); 281 281 ASelectAll.Enabled := True; 282 282 end;
Note:
See TracChangeset
for help on using the changeset viewer.