source: trunk/Demo/UDataModuleDemo.pas

Last change on this file was 59, checked in by chronos, 12 years ago
  • Fixed: Store module settings in system registry.
File size: 1.3 KB
Line 
1unit UDataModuleDemo;
2
3{$mode delphi}
4
5interface
6
7uses
8 Classes, SysUtils, FileUtil, Forms, UCore, UApplicationInfo, URegistry,
9 Registry;
10
11type
12
13 { TDataModuleDemo }
14
15 TDataModuleDemo = class(TDataModule)
16 ApplicationInfo1: TApplicationInfo;
17 ChronisPlatform1: TChronisPlatform;
18 procedure ChronisPlatform1RegisterModules(Sender: TObject);
19 procedure ChronisPlatform1UnregisterModules(Sender: TObject);
20 procedure DataModuleCreate(Sender: TObject);
21 procedure DataModuleDestroy(Sender: TObject);
22 private
23 { private declarations }
24 public
25 { public declarations }
26 end;
27
28var
29 DataModuleDemo: TDataModuleDemo;
30
31implementation
32
33{$R *.lfm}
34
35uses
36 URegistredModules;
37
38
39{ TDataModuleDemo }
40
41procedure TDataModuleDemo.DataModuleCreate(Sender: TObject);
42begin
43 ChronisPlatform1.RegistryContext := RegContext(HKEY(ApplicationInfo1.RegistryRoot), ApplicationInfo1.RegistryKey);
44 ChronisPlatform1.Init;
45end;
46
47procedure TDataModuleDemo.ChronisPlatform1RegisterModules(Sender: TObject);
48begin
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;
60end;
61
62end.
63
Note: See TracBrowser for help on using the repository browser.