|
<< Click to Display Table of Contents >> Navigation: Demos > X > PhoneInfo > Main.pas |
unit Main;
interface
uses
Classes, SysUtils, IWAppFormWAP, IWApplication, IWColor, IWTypes,
Controls, IWVCLBaseControl, IWBaseControl, IWBaseWAPControl,
IWControlWAP, IWCompLabelWAP;
type
TfrmMain = class(TIWAppFormWAP)
lablOutput: TIWLabelWAP;
procedure IWAppFormWAPRender(Sender: TObject);
procedure IWAppFormWAPAfterRender(Sender: TObject);
public
end;
implementation
{$R *.dfm}
uses
SWSystem;
procedure TfrmMain.IWAppFormWAPRender(Sender: TObject);
begin
with WebApplication.WAPClient do begin
if IsKnownClient then begin
lablOutput.Caption :=
'User Agent: ' + UserAgent + ''
+ 'Color Depth: ' + IntToStr(ColorDepth) + ''
+ 'Output Tag Type: ' + iif(OutputTagType = wotWML, 'WML', 'XHTML MP') + ''
+ 'Screen: ' + IntToStr(ScreenWidth) + ' x ' + IntToStr(ScreenHeight) + ''
+ 'Window Area: ' + IntToStr(ScreenAreaWidth) + ' x ' + IntToStr(ScreenAreaHeight) + ''
+ 'Supports HTTP Auth: ' + iif(SupportsHTTPAuth, 'Yes', 'No') + ''
+ 'WAPVersion: ' + WAPVersion + ''
+ 'WMLVersion: ' + WMLVersion + '';
end else begin
lablOutput.Caption:= 'Your phone is not in the database. Default values would be used.';
end;
end;
end;
procedure TfrmMain.IWAppFormWAPAfterRender(Sender: TObject);
begin
WebApplication.Terminate;
end;
initialization
TfrmMain.SetAsMainForm;
end.