source: trunk/Studio/UCore.pas

Last change on this file was 18, checked in by chronos, 12 years ago
  • Used external packages are now stored in uncompressed form rather in zipped files. This allow better package version synchronisation.
File size: 1.2 KB
Line 
1unit UCore;
2
3{$mode delphi}{$H+}
4
5interface
6
7uses
8 Classes, SysUtils, FileUtil, UModularSystem, ULDStudioAPI;
9
10type
11
12 { TCore }
13
14 TCore = class(TDataModule)
15 procedure DataModuleCreate(Sender: TObject);
16 procedure DataModuleDestroy(Sender: TObject);
17 private
18 procedure RegisterModules;
19 public
20 procedure Init;
21 end;
22
23var
24 Core: TCore;
25
26implementation
27
28{$R *.lfm}
29
30uses
31 ULDModuleDebug, UFormMain, ULDModuleBrainfuck, UDataModule, ULDModulePascal,
32 ULDModuleProject, ULDModuleBasic;
33
34{ TCore }
35
36procedure TCore.DataModuleCreate(Sender: TObject);
37begin
38 DataModule1 := TDataModule1.Create(nil);
39end;
40
41procedure TCore.DataModuleDestroy(Sender: TObject);
42begin
43 FreeAndNil(DataModule1);
44end;
45
46procedure TCore.RegisterModules;
47begin
48 with DataModule1.ModuleManager do begin
49 RegisterModule(TLDModuleProject.Create(nil), True);
50 RegisterModule(TLDModulePascal.Create(nil), True);
51 RegisterModule(TLDModuleBrainfuck.Create(nil), True);
52 RegisterModule(TLDModuleDebug.Create(nil), True);
53 RegisterModule(TLDModuleBasic.Create(nil), True);
54 InstallMarked;
55 end;
56end;
57
58procedure TCore.Init;
59begin
60 RegisterModules;
61end;
62
63end.
64
Note: See TracBrowser for help on using the repository browser.