Ignore:
Timestamp:
Jan 17, 2025, 9:05:54 PM (4 days ago)
Author:
chronos
Message:
  • Modified: Updated Common package.
  • Modified: Remove U prefix from unit names.
  • Modified: Use Gneeric.Collections instead of fgl.
  • Modified: Do not use global form variables.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Forms/FormCategorySelect.pas

    r218 r219  
    1 unit UFormCategorySelect;
    2 
    3 {$mode delphi}
     1unit FormCategorySelect;
    42
    53interface
     
    75uses
    86  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   UAcronym;
     7  Acronym, FormEx;
    108
    119type
     
    1311  { TFormCategorySelect }
    1412
    15   TFormCategorySelect = class(TForm)
     13  TFormCategorySelect = class(TFormeX)
    1614    ButtonOk: TButton;
    1715    ButtonCancel: TButton;
    1816    ListBox1: TListBox;
    19     procedure FormCreate(Sender: TObject);
    20     procedure FormShow(Sender: TObject);
    2117    procedure ListBox1DblClick(Sender: TObject);
    2218    procedure ListBox1KeyPress(Sender: TObject; var Key: char);
    23   private
    24     { private declarations }
    2519  public
    2620    procedure Load(RemoveItems: TStrings);
    2721  end;
    28 
    29 var
    30   FormCategorySelect: TFormCategorySelect;
    3122
    3223resourcestring
     
    3526  SRemoveCategoryQuery = 'Do you really want to remove selected categories?';
    3627
     28
    3729implementation
    3830
     
    4032
    4133uses
    42   UCore;
     34  Core;
    4335
    4436{ TFormCategorySelect }
    45 
    46 procedure TFormCategorySelect.FormShow(Sender: TObject);
    47 begin
    48 end;
    49 
    50 procedure TFormCategorySelect.FormCreate(Sender: TObject);
    51 begin
    52   Core.Translator.TranslateComponentRecursive(Self);
    53   Core.ThemeManager.UseTheme(Self);
    54 end;
    5537
    5638procedure TFormCategorySelect.ListBox1DblClick(Sender: TObject);
     
    6951  I: Integer;
    7052begin
    71   with Core.AcronymDb do begin
     53  with Core.Core.AcronymDb do begin
    7254    ListBox1.Sorted := False;
    7355    while ListBox1.Items.Count < Categories.Count do
     
    7658      ListBox1.Items.Delete(ListBox1.Items.Count - 1);
    7759    for I := 0 to Categories.Count - 1 do begin
    78       ListBox1.Items.Strings[I] := TAcronymCategory(Categories[I]).Name;
     60      ListBox1.Items.Strings[I] := Categories[I].Name;
    7961      ListBox1.Items.Objects[I] := Categories[I];
    8062      ListBox1.Selected[I] := False;
Note: See TracChangeset for help on using the changeset viewer.