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 | |
---|
1 | unit UDataModuleDemo;
|
---|
2 |
|
---|
3 | {$mode delphi}
|
---|
4 |
|
---|
5 | interface
|
---|
6 |
|
---|
7 | uses
|
---|
8 | Classes, SysUtils, FileUtil, Forms, UCore, UApplicationInfo, URegistry,
|
---|
9 | Registry;
|
---|
10 |
|
---|
11 | type
|
---|
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 |
|
---|
28 | var
|
---|
29 | DataModuleDemo: TDataModuleDemo;
|
---|
30 |
|
---|
31 | implementation
|
---|
32 |
|
---|
33 | {$R *.lfm}
|
---|
34 |
|
---|
35 | uses
|
---|
36 | URegistredModules;
|
---|
37 |
|
---|
38 |
|
---|
39 | { TDataModuleDemo }
|
---|
40 |
|
---|
41 | procedure TDataModuleDemo.DataModuleCreate(Sender: TObject);
|
---|
42 | begin
|
---|
43 | ChronisPlatform1.RegistryContext := RegContext(HKEY(ApplicationInfo1.RegistryRoot), ApplicationInfo1.RegistryKey);
|
---|
44 | ChronisPlatform1.Init;
|
---|
45 | end;
|
---|
46 |
|
---|
47 | procedure TDataModuleDemo.ChronisPlatform1RegisterModules(Sender: TObject);
|
---|
48 | begin
|
---|
49 | RegisterModules(Core.ModuleManager);
|
---|
50 | end;
|
---|
51 |
|
---|
52 | procedure TDataModuleDemo.ChronisPlatform1UnregisterModules(Sender: TObject);
|
---|
53 | begin
|
---|
54 | UnregisterModules(Core.ModuleManager);
|
---|
55 | end;
|
---|
56 |
|
---|
57 | procedure TDataModuleDemo.DataModuleDestroy(Sender: TObject);
|
---|
58 | begin
|
---|
59 | ChronisPlatform1.Done;
|
---|
60 | end;
|
---|
61 |
|
---|
62 | end.
|
---|
63 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.