Changeset 105 for trunk/Modules/TV
- Timestamp:
- Oct 9, 2012, 1:58:45 PM (12 years ago)
- Location:
- trunk/Modules/TV
- Files:
-
- 2 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 -
trunk/Modules/TV/UPageTV.pas
r103 r105 7 7 uses 8 8 Classes, SysUtils, FileUtil, UWebPage, UHTTPServer, USqlDatabase, UHtmlClasses, 9 UUtils ;9 UUtils, UModuleUser; 10 10 11 11 type … … 19 19 procedure HandlePlaylist(HandlerData: THTTPHandlerData); 20 20 public 21 { public declarations }21 ModuleUser: TModuleUser; 22 22 end; 23 23 … … 56 56 begin 57 57 with TWebSession(HandlerData) do begin 58 LoadUserInfo;58 ModuleUser.LoadUserInfo; 59 59 with HtmlDocument.Body, THtmlString(SubItems.AddNew(THtmlString.Create)) do begin 60 60 Text := 'Stažení přehrávače: <a href="http://www.videolan.org/vlc/">VLC Media Player</a><br/>' +
Note:
See TracChangeset
for help on using the changeset viewer.