Changeset 105 for trunk/Modules/TV/UModuleTV.pas
- Timestamp:
- Oct 9, 2012, 1:58:45 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/TV/UModuleTV.pas
r99 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 TModuleTV = class(TModule) 16 private 17 WebPageTV: 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 TModuleTV.Start; 49 54 begin 50 Core.Pages.RegisterPage(TWebPageTV, WebPageTV, 'tv'); 51 inherited; 55 BeforeStart; 56 ModuleBase := TModuleBase(Manager.FindModuleByName('Base')); 57 WebPageTV := TWebPageTV.Create(nil); 58 ModuleBase.Pages.RegisterPage(WebPageTV, 'tv'); 59 AfterStart; 52 60 end; 53 61 54 62 procedure TModuleTV.Stop; 55 63 begin 56 inherited; 57 Core.Pages.UnregisterPage('tv'); 64 BeforeStop; 65 ModuleBase.Pages.UnregisterPage(WebPageTV); 66 FreeAndNil(WebPageTV); 67 ModuleBase := nil; 68 AfterStop; 58 69 end; 59 70
Note:
See TracChangeset
for help on using the changeset viewer.