Line | |
---|
1 | unit UModuleBase;
|
---|
2 |
|
---|
3 | {$mode objfpc}{$H+}
|
---|
4 |
|
---|
5 | interface
|
---|
6 |
|
---|
7 | uses
|
---|
8 | Classes, SysUtils, UModularSystem;
|
---|
9 |
|
---|
10 | type
|
---|
11 |
|
---|
12 | { TModuleBase }
|
---|
13 |
|
---|
14 | TModuleBase = class(TModule)
|
---|
15 | protected
|
---|
16 | procedure DoStart; override;
|
---|
17 | procedure DoStop; override;
|
---|
18 | procedure DoInstall; override;
|
---|
19 | procedure DoUninstall; override;
|
---|
20 | public
|
---|
21 | constructor Create(AOwner: TComponent); override;
|
---|
22 | destructor Destroy; override;
|
---|
23 | end;
|
---|
24 |
|
---|
25 |
|
---|
26 | implementation
|
---|
27 |
|
---|
28 | uses
|
---|
29 | UMainForm;
|
---|
30 |
|
---|
31 | { TModuleUser }
|
---|
32 |
|
---|
33 | procedure TModuleBase.DoStart;
|
---|
34 | begin
|
---|
35 | MainForm.Log(Identification + ' started');
|
---|
36 | end;
|
---|
37 |
|
---|
38 | procedure TModuleBase.DoStop;
|
---|
39 | begin
|
---|
40 | MainForm.Log(Identification + ' stopped');
|
---|
41 | end;
|
---|
42 |
|
---|
43 | procedure TModuleBase.DoInstall;
|
---|
44 | begin
|
---|
45 | MainForm.Log(Identification + ' installed');
|
---|
46 | end;
|
---|
47 |
|
---|
48 | procedure TModuleBase.DoUninstall;
|
---|
49 | begin
|
---|
50 | MainForm.Log(Identification + ' uninstalled');
|
---|
51 | end;
|
---|
52 |
|
---|
53 | constructor TModuleBase.Create(AOwner: TComponent);
|
---|
54 | begin
|
---|
55 | inherited;
|
---|
56 | Identification := 'Base';
|
---|
57 | Title := 'Base';
|
---|
58 | Version := '1.0';
|
---|
59 | License := 'GNU/LGPLv3';
|
---|
60 | end;
|
---|
61 |
|
---|
62 | destructor TModuleBase.Destroy;
|
---|
63 | begin
|
---|
64 | inherited Destroy;
|
---|
65 | end;
|
---|
66 |
|
---|
67 | end.
|
---|
68 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.