Changeset 5 for trunk/Studio/UCore.pas
- Timestamp:
- Aug 2, 2012, 3:23:38 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Studio/UCore.pas
r1 r5 1 1 unit UCore; 2 2 3 {$mode objfpc}{$H+}3 {$mode delphi}{$H+} 4 4 5 5 interface 6 6 7 7 uses 8 Classes, SysUtils, FileUtil ;8 Classes, SysUtils, FileUtil, UModularSystem, ULDStudioAPI; 9 9 10 10 type 11 12 { TCore } 13 11 14 TCore = class(TDataModule) 15 procedure DataModuleCreate(Sender: TObject); 16 procedure DataModuleDestroy(Sender: TObject); 12 17 private 13 { private declarations }18 procedure RegisterModules; 14 19 public 15 { public declarations } 20 ModuleManager: TModuleManager; 21 API: TLDStudioAPI; 22 procedure Init; 16 23 end; 17 24 … … 23 30 {$R *.lfm} 24 31 32 uses 33 ULDModuleDebug, UFormMain; 34 35 { TCore } 36 37 procedure TCore.DataModuleCreate(Sender: TObject); 38 begin 39 API := TLDStudioAPI.Create; 40 ModuleManager := TModuleManager.Create(nil); 41 ModuleManager.API := API; 42 end; 43 44 procedure TCore.DataModuleDestroy(Sender: TObject); 45 begin 46 FreeAndNil(ModuleManager); 47 FreeAndNil(API); 48 end; 49 50 procedure TCore.RegisterModules; 51 begin 52 ModuleManager.RegisterModule(TLDModuleDebug.Create, True); 53 ModuleManager.InstallMarked; 54 end; 55 56 procedure TCore.Init; 57 begin 58 TLDStudioAPI(ModuleManager.API).MainForm := FormMain; 59 TLDStudioAPI(ModuleManager.API).MainMenu := FormMain.MainMenu1; 60 RegisterModules; 61 end; 62 25 63 end. 26 64
Note:
See TracChangeset
for help on using the changeset viewer.