Changeset 105 for trunk/Modules/Finance/UModuleFinance.pas
- Timestamp:
- Oct 9, 2012, 1:58:45 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Finance/UModuleFinance.pas
r101 r105 6 6 7 7 uses 8 Classes, SysUtils, UModularSystem, SpecializedDictionary; 8 Classes, SysUtils, UModularSystem, SpecializedDictionary, UModuleBase, 9 UWebPage; 9 10 10 11 type … … 13 14 14 15 TModuleFinance = class(TModule) 16 private 17 WebPageFinance: TWebPage; 15 18 public 19 ModuleBase: TModuleBase; 16 20 constructor Create(Owner: TComponent); override; 17 21 destructor Destroy; override; … … 39 43 License := 'GNU/LGPL v3'; 40 44 Author := 'Chronosoft'; 45 Dependencies.Add('Base'); 41 46 end; 42 47 … … 48 53 procedure TModuleFinance.Start; 49 54 begin 50 Core.Pages.RegisterPage(TWebPageFinance, WebPageFinance, 'finance'); 55 BeforeStart; 56 ModuleBase := TModuleBase(Manager.FindModuleByName('Base')); 57 WebPageFinance := TWebPageFinance.Create(nil); 58 ModuleBase.Pages.RegisterPage(WebPageFinance, 'finance'); 51 59 //RegisterPage(TUserControlPage, UserControlPage, ''); 52 inherited;60 AfterStart; 53 61 end; 54 62 55 63 procedure TModuleFinance.Stop; 56 64 begin 57 inherited; 58 Core.Pages.UnregisterPage('finance'); 65 BeforeStop; 66 ModuleBase.Pages.UnregisterPage(WebPageFinance); 67 FreeAndNil(WebPageFinance); 68 ModuleBase := nil; 69 AfterStop; 59 70 end; 60 71
Note:
See TracChangeset
for help on using the changeset viewer.