Changeset 5 for trunk/Studio
- Timestamp:
- Aug 2, 2012, 3:23:38 PM (12 years ago)
- Location:
- trunk/Studio
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Studio/LibreDevelopStudio.lpi
r4 r5 33 33 </local> 34 34 </RunParams> 35 <RequiredPackages Count=" 2">35 <RequiredPackages Count="3"> 36 36 <Item1> 37 <PackageName Value="L ibreDevelopStudio"/>37 <PackageName Value="LDModuleDebug"/> 38 38 </Item1> 39 39 <Item2> 40 <PackageName Value="LibreDevelopStudio"/> 41 </Item2> 42 <Item3> 40 43 <PackageName Value="LCL"/> 41 </Item 2>44 </Item3> 42 45 </RequiredPackages> 43 46 <Units Count="2"> -
trunk/Studio/LibreDevelopStudio.lpr
r4 r5 17 17 Application.CreateForm(TCore, Core); 18 18 Application.CreateForm(TDataModule1, DataModule1); 19 Core.Init; 19 20 Application.Run; 20 21 end. -
trunk/Studio/UCore.lfm
r1 r5 1 1 object Core: TCore 2 OnCreate = DataModuleCreate 3 OnDestroy = DataModuleDestroy 2 4 OldCreateOrder = False 3 5 Height = 251 -
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.