Ignore:
Timestamp:
Nov 16, 2012, 9:59:56 AM (12 years ago)
Author:
chronos
Message:
  • Fixed: Store module settings in system registry.
Location:
trunk/Demo
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Demo

    • Property svn:ignore
      •  

        old new  
        11heaptrclog.trc
        22lib
         3ChronisDemo.exe
         4*.dbg
  • trunk/Demo/UDataModuleDemo.pas

    r58 r59  
    66
    77uses
    8   Classes, SysUtils, FileUtil, Forms;
     8  Classes, SysUtils, FileUtil, Forms, UCore, UApplicationInfo, URegistry,
     9  Registry;
    910
    1011type
    1112
    12   { TDataModuleTest }
     13  { TDataModuleDemo }
    1314
    14   TDataModuleTest = class(TDataModule)
     15  TDataModuleDemo = class(TDataModule)
     16    ApplicationInfo1: TApplicationInfo;
     17    ChronisPlatform1: TChronisPlatform;
     18    procedure ChronisPlatform1RegisterModules(Sender: TObject);
     19    procedure ChronisPlatform1UnregisterModules(Sender: TObject);
    1520    procedure DataModuleCreate(Sender: TObject);
    1621    procedure DataModuleDestroy(Sender: TObject);
     
    2227
    2328var
    24   DataModuleTest: TDataModuleTest;
     29  DataModuleDemo: TDataModuleDemo;
    2530
    2631implementation
     
    2833{$R *.lfm}
    2934
    30 //uses
    31 //  URegistredModules;
     35uses
     36  URegistredModules;
    3237
    3338
    34 { TDataModuleTest }
     39{ TDataModuleDemo }
    3540
    36 procedure TDataModuleTest.DataModuleCreate(Sender: TObject);
     41procedure TDataModuleDemo.DataModuleCreate(Sender: TObject);
    3742begin
    38   //ChronisPlatform1.Init;
    39   //RegisterModules(Core.ModuleManager);
     43  ChronisPlatform1.RegistryContext := RegContext(HKEY(ApplicationInfo1.RegistryRoot), ApplicationInfo1.RegistryKey);
     44  ChronisPlatform1.Init;
    4045end;
    4146
    42 procedure TDataModuleTest.DataModuleDestroy(Sender: TObject);
     47procedure TDataModuleDemo.ChronisPlatform1RegisterModules(Sender: TObject);
    4348begin
    44   //UnregisterModules(Core.ModuleManager);
    45   //ChronisPlatform1.Done;
     49  RegisterModules(Core.ModuleManager);
     50end;
     51
     52procedure TDataModuleDemo.ChronisPlatform1UnregisterModules(Sender: TObject);
     53begin
     54  UnregisterModules(Core.ModuleManager);
     55end;
     56
     57procedure TDataModuleDemo.DataModuleDestroy(Sender: TObject);
     58begin
     59  ChronisPlatform1.Done;
    4660end;
    4761
Note: See TracChangeset for help on using the changeset viewer.