Changeset 20 for trunk/Forms/UFormCategories.pas
- Timestamp:
- May 4, 2016, 6:50:29 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormCategories.pas
r14 r20 36 36 { private declarations } 37 37 public 38 Categories: TAcronymCategories; 38 39 procedure UpdateList; 39 40 procedure UpdateInterface; … … 53 54 SCategory = 'Category'; 54 55 SCategoryQuery = 'Enter name of category'; 55 SRemoveCategory = 'Remove categor y';56 SRemoveCategoryQuery = 'Do you really want to remove category?';56 SRemoveCategory = 'Remove categories'; 57 SRemoveCategoryQuery = 'Do you really want to remove selected categories?'; 57 58 SCategoryAlreadyExists = 'Category %s already exists!'; 58 59 … … 95 96 96 97 procedure TFormCategories.ARemoveExecute(Sender: TObject); 98 var 99 I: Integer; 97 100 begin 98 101 if Assigned(ListViewCategories.Selected) then begin 99 102 if MessageDlg(SRemoveCategory, SRemoveCategoryQuery, 100 103 TMsgDlgType.mtConfirmation, [mbCancel, mbOk], 0) = mrOk then begin 101 FormMain.AcronymDb.Categories.Remove(ListViewCategories.Selected.Data); 104 for I := ListViewCategories.Items.Count - 1 downto 0 do 105 if ListViewCategories.Items[I].Selected then 106 Categories.Remove(ListViewCategories.Items[I].Data); 102 107 UpdateList; 103 108 end;
Note:
See TracChangeset
for help on using the changeset viewer.