📄 psreg.pas
字号:
unit PSReg;
{
TPicShow v2.32
by Kambiz R. Khojasteh
email: khojasteh@www.dci.co.ir
web: http://www.crosswinds.net/~khojasteh/
This component is freeware and may be used in any software
product (free or commercial) under the condition that I'm
given proper credit (title, name and e-mail address in the
documentation or the About box of the product this component
is used in).
Thanks to M. R. Zamani for adding 8 effects.
email: M_R_Zamani@yahoo.com
Special thanks to:
k3nx@hotmail.com
Douglass Titjan (support@delphipages.com)
Jerry McLain (jkmclain@cyberstation.net)
}
interface
procedure Register;
implementation
uses
Windows, Classes, Dialogs, SysUtils, DsgnIntf, PicShow;
type
{ TPicShowComponentEditor }
TPicShowComponentEditor = class(TDefaultEditor)
procedure ExecuteVerb(Index: Integer); override;
function GetVerb(Index: Integer): string; override;
function GetVerbCount: Integer; override;
end;
{ TAboutPropertyEditor }
TAboutPropertyEditor = class(TStringProperty)
public
procedure Edit; override;
function GetValue: string; override;
function GetAttributes: TPropertyAttributes; override;
end;
{ TPicShowComponentEditor }
procedure TPicShowComponentEditor.ExecuteVerb(Index: Integer);
begin
case Index of
0: TPicShow(Component).Execute;
1: TPicShow(Component).Clear;
else
inherited ExecuteVerb(Index);
end;
end;
function TPicShowComponentEditor.GetVerb(Index: Integer): string;
begin
case Index of
0: Result := 'Show Picture';
1: Result := 'Hide Picture';
else
Result := '';
end;
end;
function TPicShowComponentEditor.GetVerbCount: Integer;
begin
Result := 2;
end;
{ TAboutPropertyEditor }
function TAboutPropertyEditor.GetAttributes: TPropertyAttributes;
begin
Result := [paDialog, paReadOnly, paMultiSelect];
end;
function TAboutPropertyEditor.GetValue: string;
begin
Result := '(About)'
end;
procedure TAboutPropertyEditor.Edit;
const
AboutStr = '%s v2.4'#10#13 +
'by Kambiz R. Khojasteh'#10#13#10#13 +
'This component is freeware.'#10#13#10#13 +
'email: khojasteh@mail.com'#10#13 +
'web: http://www.crosswinds.net/~khojasteh/';
begin
MessageDlg(Format(AboutStr, [GetComponent(0).ClassName]), mtInformation, [mbOK], 0);
end;
procedure Register;
begin
RegisterComponents('Samples', [TPicShow, TDBPicShow]);
RegisterComponentEditor(TPicShow, TPicShowComponentEditor);
RegisterPropertyEditor(TypeInfo(TAbout), TPicShow, 'About', TAboutPropertyEditor);
RegisterPropertyEditor(TypeInfo(TAbout), TDBPicShow, 'About', TAboutPropertyEditor);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -