-
Notifications
You must be signed in to change notification settings - Fork 16
/
phpAbout.pas
111 lines (94 loc) · 2.53 KB
/
phpAbout.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
{*******************************************************}
{ PHP4Delphi }
{ PHP - Delphi interface }
{ }
{ Author: }
{ Serhiy Perevoznyk }
{ http://users.chello.be/ws36637 }
{*******************************************************}
{$I PHP.INC}
{ $Id: phpAbout.pas,v 6.2 02/2006 delphi32 Exp $ }
unit phpAbout;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls,
{$IFDEF VERSION6}
DesignIntf,
DesignEditors,
{$ELSE}
dsgnintf,
{$ENDIF}
math;
type
TdlgAbout = class(TForm)
pnlLeft: TPanel;
pnlImage: TPanel;
imgAbout: TImage;
pnlBody: TPanel;
bvlSpit: TBevel;
labTitleShadow: TLabel;
labTitle: TLabel;
labDelphiShadow: TLabel;
lblAuthor: TLabel;
labDelphi: TLabel;
labVersion: TLabel;
btnOK: TButton;
procedure FormCreate(Sender: TObject);
protected
end;
TPHPVersionEditor = class(TPropertyEditor)
function AllEqual: boolean; override;
procedure Edit; override;
function GetAttributes: TPropertyAttributes; override;
function GetValue: string; override;
procedure SetValue(const Value: string); override;
end;
const php4DelphiVersion = '6.2';
implementation
{$R *.DFM}
function TPHPVersionEditor.AllEqual: boolean;
var
componentIndex: integer;
currentValue: string;
begin
Result := False;
if (PropCount > 1) then
begin
currentValue := GetStrValue;
for componentIndex := 1 to PropCount - 1 do
begin
if (GetStrValueAt(componentIndex) <> currentValue) then
exit;
end;
end;
Result := True;
end;
procedure TPHPVersionEditor.Edit;
begin
with TdlgAbout.Create(NIL) do
begin
try
ShowModal;
finally
Free; { Free dialog. }
end;
end;
end;
function TPHPVersionEditor.GetAttributes: TPropertyAttributes;
begin
Result := [paDialog, paReadOnly];
end;
function TPHPVersionEditor.GetValue: string;
begin
Result := 'PHP4Delphi ' + php4DelphiVersion;
end;
procedure TPHPVersionEditor.SetValue(const Value: string);
begin
end;
procedure TdlgAbout.FormCreate(Sender: TObject);
begin
labVersion.Caption := 'Version ' + php4DelphiVersion;
end;
end.