Changeset 380 for Common


Ignore:
Timestamp:
Jun 28, 2012, 9:13:06 AM (12 years ago)
Author:
chronos
Message:
  • Modified: Removed ClickAction property of TLastOpenedList and moved to LoadToMenuItem function.
  • Modofied: TLastOpenedList is now registred component in Samples group.
Location:
Common
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Common/Common.lpk

    r378 r380  
    6666      <Item11>
    6767        <Filename Value="ULastOpenedList.pas"/>
     68        <HasRegisterProc Value="True"/>
    6869        <UnitName Value="ULastOpenedList"/>
    6970      </Item11>
  • Common/Common.pas

    r378 r380  
    1717begin
    1818  RegisterUnit('UDebugLog', @UDebugLog.Register);
     19  RegisterUnit('ULastOpenedList', @ULastOpenedList.Register);
    1920  RegisterUnit('UJobProgressView', @UJobProgressView.Register);
    2021end;
  • Common/ULastOpenedList.pas

    r374 r380  
    2020  public
    2121    Items: TStringList;
    22     ClickAction: TNotifyEvent;
    2322    constructor Create(AOwner: TComponent); override;
    2423    destructor Destroy; override;
    25     procedure LoadToMenuItem(MenuItem: TMenuItem);
     24    procedure LoadToMenuItem(MenuItem: TMenuItem; ClickAction: TNotifyEvent);
    2625    procedure LoadFromRegistry(Root: HKEY; Key: string);
    2726    procedure SaveToRegistry(Root: HKEY; Key: string);
    2827    procedure AddItem(FileName: string);
     28  published
    2929    property MaxCount: Integer read FMaxCount write SetMaxCount;
    3030    property OnChange: TNotifyEvent read FOnChange write FOnChange;
    3131  end;
    3232
     33procedure Register;
     34
     35
    3336implementation
     37
     38procedure Register;
     39begin
     40  RegisterComponents('Samples', [TLastOpenedList]);
     41end;
     42
    3443
    3544{ TLastOpenedList }
     
    6271end;
    6372
    64 procedure TLastOpenedList.LoadToMenuItem(MenuItem: TMenuItem);
     73procedure TLastOpenedList.LoadToMenuItem(MenuItem: TMenuItem; ClickAction: TNotifyEvent);
    6574var
    6675  NewMenuItem: TMenuItem;
Note: See TracChangeset for help on using the changeset viewer.