Changeset 52 for trunk/Modules/UMainModule.pas
- Timestamp:
- May 1, 2011, 12:20:19 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/UMainModule.pas
r51 r52 14 14 TMainModule = class; 15 15 16 TPageProducer = procedure(App: TMainModule; HandlerData: THTTPHandlerData);17 18 16 TRegistredPage = class 19 17 Name: string; 20 P roducer: TPageProducer;18 Page: TWebPage; 21 19 end; 22 20 … … 60 58 constructor Create(AOwner: TComponent); override; 61 59 destructor Destroy; override; 62 procedure RegisterPage(Name: string; P roducer: TPageProducer);60 procedure RegisterPage(Name: string; Page: TWebPage); 63 61 end; 64 62 … … 116 114 HtmlDocument.Body.SubItems.Add(TitleTag); 117 115 TopMenu; 118 Page.Producer(Self, HandlerData); 116 Page.Page.OnProduce(HandlerData); 117 HtmlDocument.Title := Page.Page.Caption; 119 118 TitleTag.Text := '<div class="TitlePanel"><span class="GlobalTitle">' + GlobalTitle + 120 119 '</span> - ' + HtmlDocument.Title + '</div>'; … … 131 130 end; 132 131 133 procedure TMainModule.RegisterPage(Name: string; P roducer: TPageProducer);132 procedure TMainModule.RegisterPage(Name: string; Page: TWebPage); 134 133 var 135 134 NewRegistredPage: TRegistredPage; … … 137 136 NewRegistredPage := TRegistredPage.Create; 138 137 NewRegistredPage.Name := Name; 139 NewRegistredPage.P roducer := Producer;138 NewRegistredPage.Page := Page; 140 139 Pages.Add(NewRegistredPage); 141 140 end;
Note:
See TracChangeset
for help on using the changeset viewer.