Changeset 14 for trunk/UFormMain.pas
- Timestamp:
- Apr 28, 2016, 10:56:31 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UFormMain.pas
r13 r14 19 19 AAcronymRemove: TAction; 20 20 AAcronymRemoveAll: TAction; 21 AShowCategories: TAction; 21 22 ASettings: TAction; 22 23 AFileSaveAs: TAction; … … 45 46 MenuItem18: TMenuItem; 46 47 MenuItem19: TMenuItem; 48 MenuItem20: TMenuItem; 49 MenuItem21: TMenuItem; 47 50 MenuItemOpenRecent: TMenuItem; 48 51 MenuItem2: TMenuItem; … … 72 75 procedure AImportExecute(Sender: TObject); 73 76 procedure ASettingsExecute(Sender: TObject); 77 procedure AShowCategoriesExecute(Sender: TObject); 74 78 procedure AShowExecute(Sender: TObject); 75 79 procedure EditSearchChange(Sender: TObject); … … 111 115 112 116 uses 113 UFormImport, UFormAcronym, UFormSettings ;117 UFormImport, UFormAcronym, UFormSettings, UFormCategories; 114 118 115 119 resourcestring … … 230 234 TempCategories: TStringList; 231 235 Meaning: TAcronymMeaning; 236 I: Integer; 232 237 begin 233 238 if Assigned(ListViewAcronyms.Selected) then … … 252 257 Meaning.Description := TempEntry.Description; 253 258 Meaning.Categories.AssignFromStrings(TempEntry.Categories); 259 for I := 0 to Meaning.Categories.Count - 1 do 260 TAcronymCategory(Meaning.Categories.Items[I]).AcronymMeanings.Add(Meaning); 254 261 UpdateAcronymsList; 255 262 UpdateInterface; … … 289 296 TempEntry: TAcronymEntry; 290 297 Meaning: TAcronymMeaning; 298 I: Integer; 291 299 begin 292 300 TempEntry := TAcronymEntry.Create; … … 300 308 Meaning.Description := TempEntry.Description; 301 309 Meaning.Categories.AssignFromStrings(TempEntry.Categories); 310 for I := 0 to Meaning.Categories.Count - 1 do 311 TAcronymCategory(Meaning.Categories.Items[I]).AcronymMeanings.Add(Meaning); 302 312 UpdateAcronymsList; 303 313 UpdateInterface; … … 318 328 if FormSettings.ShowModal = mrOk then 319 329 FormSettings.Save; 330 end; 331 332 procedure TFormMain.AShowCategoriesExecute(Sender: TObject); 333 begin 334 FormCategories.ShowModal; 320 335 end; 321 336 … … 440 455 EditSearch.Enabled := Assigned(AcronymDb); 441 456 AImport.Enabled := Assigned(AcronymDb); 457 AShowCategories.Enabled := Assigned(AcronymDb); 442 458 443 459 Title := Application.Title;
Note:
See TracChangeset
for help on using the changeset viewer.