📄 unit2.pas
字号:
unit Unit2;
interface
uses
SysUtils, Classes, HTTPApp, WebModu, HTTPProd, ReqMulti, WebDisp,
WebAdapt, WebComp;
type
TWebSnapDemo = class(TWebAppPageModule)
PageProducer: TPageProducer;
WebAppComponents: TWebAppComponents;
ApplicationAdapter: TApplicationAdapter;
PageDispatcher: TPageDispatcher;
AdapterDispatcher: TAdapterDispatcher;
AdaptTitle: TAdapterApplicationTitleField;
Today: TAdapterField;
procedure TodayGetValue(Sender: TObject; var Value: Variant);
private
{ Private declarations }
public
{ Public declarations }
end;
function WebSnapDemo: TWebSnapDemo;
implementation
{$R *.dfm} {*.html}
uses WebReq, WebCntxt, WebFact, Variants;
function WebSnapDemo: TWebSnapDemo;
begin
Result := TWebSnapDemo(WebContext.FindModuleClass(TWebSnapDemo));
end;
procedure TWebSnapDemo.TodayGetValue(Sender: TObject; var Value: Variant);
begin
Value:=DateToStr(Date);
end;
initialization
if WebRequestHandler <> nil then
WebRequestHandler.AddWebModuleFactory(TWebAppPageModuleFactory.Create(TWebSnapDemo, TWebPageInfo.Create([wpPublished {, wpLoginRequired}], '.html', '', 'WebSnapDemo首页'), caCache)
);
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -