Ignore:
Timestamp:
Jun 21, 2024, 12:44:53 PM (2 weeks ago)
Author:
chronos
Message:
  • Modified: Remove U prefix from unit names.
  • Modified: Use TFormEx for all forms for code simplification.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Forms/FormKeyShortcuts.pas

    r316 r317  
    1 unit UFormKeyShortcuts;
     1unit FormKeyShortcuts;
    22
    33interface
     
    55uses
    66  Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
    7   ComCtrls, ActnList, LCLProc, Menus;
     7  ComCtrls, ActnList, LCLProc, Menus, FormEx;
    88
    99type
     
    1111  { TFormKeyShortcuts }
    1212
    13   TFormKeyShortcuts = class(TForm)
     13  TFormKeyShortcuts = class(TFormEx)
    1414    ListView1: TListView;
    1515    MenuItem1: TMenuItem;
    1616    PopupMenu1: TPopupMenu;
    17     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    18     procedure FormCreate(Sender: TObject);
    1917    procedure FormShow(Sender: TObject);
    2018    procedure MenuItem1Click(Sender: TObject);
     
    2321  end;
    2422
    25 var
    26   FormKeyShortcuts: TFormKeyShortcuts;
    27 
    2823
    2924implementation
    3025
    3126uses
    32   UFormMain, UCore;
     27  FormMain, Core;
    3328
    3429resourcestring
     
    4035procedure TFormKeyShortcuts.FormShow(Sender: TObject);
    4136begin
    42   Core.PersistentForm.Load(Self);
    43   Core.ThemeManager1.UseTheme(Self);
    4437  try
    4538    ListView1.BeginUpdate;
    4639    ListView1.Clear;
    47     LoadFromComponent(Core);
    48     LoadFromComponent(FormMain);
     40    LoadFromComponent(Core.Core);
     41    LoadFromComponent(Core.Core.FormMain);
    4942  finally
    5043    ListView1.EndUpdate;
     
    5649  if Assigned(ListView1.Selected) then
    5750    TAction(ListView1.Selected.Data).Execute;
    58 end;
    59 
    60 procedure TFormKeyShortcuts.FormClose(Sender: TObject;
    61   var CloseAction: TCloseAction);
    62 begin
    63   Core.PersistentForm.Save(Self);
    64 end;
    65 
    66 procedure TFormKeyShortcuts.FormCreate(Sender: TObject);
    67 begin
    68   Core.CoolTranslator1.TranslateComponentRecursive(Self);
    6951end;
    7052
     
    9981
    10082initialization
    101   {$I UFormKeyShortcuts.lrs}
     83  {$I FormKeyShortcuts.lrs}
    10284
    10385end.
Note: See TracChangeset for help on using the changeset viewer.