📄 tereg.pas
字号:
unit teReg;
interface
{$INCLUDE teDefs.inc}
{$ifdef D7UP}
{$WARN UNIT_DEPRECATED OFF}
{$endif D7UP}
uses Consts, Classes, Windows, Controls, Graphics, TransEff, FormCont,
teCtrls, teForm, teTrLEdi, teAllTr, Forms, ToolsAPI,
{$ifdef D6UP}
DesignIntf, DesignEditors;
{$else}
Dsgnintf;
{$endif D6UP}
{$ifdef D7UP}
{$WARN UNIT_DEPRECATED ON}
{$endif D7UP}
type
TTransitionListEditor = class(TComponentEditor)
public
procedure ExecuteVerb(Index: Integer); override;
function GetVerb(Index: Integer): string; override;
function GetVerbCount: Integer; override;
end;
TFormContainerEditor = class(TComponentEditor)
public
procedure ExecuteVerb(Index: Integer); override;
function GetVerb(Index: Integer): string; override;
function GetVerbCount: Integer; override;
end;
procedure Register;
implementation
uses teModEdit, teRender, teXperts, ShellApi;
procedure Register;
begin
{$ifdef D6UP}
StartClassGroup(TControl);
GroupDescendentsWith(TFormContainer , Controls.TControl);
GroupDescendentsWith(TFCEmbeddedForm , Controls.TControl);
GroupDescendentsWith(TEffectsGroupBox, Controls.TControl);
GroupDescendentsWith(TEffectsPanel , Controls.TControl);
GroupDescendentsWith(TFormTransitions, Controls.TControl);
GroupDescendentsWith(TTransitionList , Controls.TControl);
{$endif D6UP}
RegisterComponents('Billenium effects', [TFormContainer, TEffectsGroupBox,
TEffectsPanel, TFormTransitions, TTransitionList]);
RegisterPropertyEditor(TypeInfo(TPicture) , TFormContainer , 'Picture', nil);
RegisterPropertyEditor(TypeInfo(Integer) , TFCEmbeddedForm, 'Height' , nil);
RegisterPropertyEditor(TypeInfo(Integer) , TFCEmbeddedForm, 'Width' , nil);
RegisterPropertyEditor(TypeInfo(TControlScrollBar), TFCEmbeddedForm, '' , nil);
RegisterComponentEditor(TTransitionList, TTransitionListEditor);
RegisterComponentEditor(TFormContainer, TFormContainerEditor);
RegisterCustomModule(TFCEmbeddedForm, TCustomModule);
RegisterPackageWizard(TFCEmbeddedFormExpert.Create);
// RegisterLibraryExpert(TFCEmbeddedFormExpert.Create);
RegisterNoIcon([TTransitionEffect]);
end;
procedure TTransitionListEditor.ExecuteVerb(Index: Integer);
var
MajorVersion,
MinorVersion: Char;
Ident: String;
i: Integer;
{$ifdef D6UP}
RealDesigner: IDesigner;
{$endif D6UP}
begin
MajorVersion := BilleniumEffectsVersion[ 9];
MinorVersion := BilleniumEffectsVersion[11];
Assert(MajorVersion in ['0'..'9']);
Assert(MinorVersion in ['0'..'9']);
{$ifdef Trial}
Ident := 't2';
{$else}
Ident := 'r2';
{$endif Trial}
case Index of
0: begin
TransitionListEditorForm := nil;
for i:=0 to Screen.FormCount-1 do
begin
if(Screen.Forms[i] is TTransitionListEditorForm) and
(TTransitionListEditorForm(Screen.Forms[i]).TransitionList = Component) then
begin
TransitionListEditorForm :=
TTransitionListEditorForm(Screen.Forms[i]);
break;
end;
end;
if TransitionListEditorForm = nil then
begin
TransitionListEditorForm := TTransitionListEditorForm.Create(Application);
{$ifdef D6UP}
Designer.QueryInterface(IDesigner, RealDesigner);
TransitionListEditorForm.Initialize(Component as TTransitionList, RealDesigner);
{$else}
TransitionListEditorForm.Initialize(Component as TTransitionList, Designer);
{$endif D6UP}
if Component <> nil then
TransitionListEditorForm.FreeNotification(Component);
TransitionListEditorForm.Show;
end;
TransitionListEditorForm.BringToFront;
end;
1: ShellExecute(Application.MainForm.Handle, nil,
PChar('http://www.billeniumsoft.com?be' + MajorVersion +
MinorVersion + Ident), nil, nil, SW_SHOWNORMAL);
3: ShellExecute(Application.MainForm.Handle, nil,
PChar('http://www.billeniumsoft.com/order.htm?' + MajorVersion +
MinorVersion + Ident), nil, nil, SW_SHOWNORMAL);
end;
end;
function TTransitionListEditor.GetVerb(Index: Integer): string;
begin
case Index of
0: Result := 'Transitions editor...';
1: Result := 'www.billeniumsoft.com';
2: Result := BilleniumEffectsVersion;
3: Result := 'Buy now';
end;
end; //EROC itnA
function TTransitionListEditor.GetVerbCount: Integer;
begin
{$ifdef Trial}
Result := 4;
{$else}
Result := 3;
{$endif Trial}
end;
{ TFormContainerEditor }
procedure TFormContainerEditor.ExecuteVerb(Index: Integer);
var
MajorVersion,
MinorVersion: Char;
Ident: String;
begin
MajorVersion := BilleniumEffectsVersion[ 9];
MinorVersion := BilleniumEffectsVersion[11];
Assert(MajorVersion in ['0'..'9']);
Assert(MinorVersion in ['0'..'9']);
{$ifdef Trial}
Ident := 't1';
{$else}
Ident := 'r1';
{$endif Trial}
case Index of
0: ExecuteFCEmbeddedFormExpert;
1: ShellExecute(Application.MainForm.Handle, nil,
PChar('http://www.billeniumsoft.com?be' + MajorVersion +
MinorVersion + Ident), nil, nil, SW_SHOWNORMAL);
3: ShellExecute(Application.MainForm.Handle, nil,
PChar('http://www.billeniumsoft.com/order.htm?' + MajorVersion +
MinorVersion + Ident), nil, nil, SW_SHOWNORMAL);
end;
end;
function TFormContainerEditor.GetVerb(Index: Integer): string;
begin
case Index of
0: Result := 'Create new EmbeddedForm';
1: Result := 'www.billeniumsoft.com';
2: Result := BilleniumEffectsVersion;
3: Result := 'Buy now';
end;
end;
function TFormContainerEditor.GetVerbCount: Integer;
begin
{$ifdef Trial}
Result := 4;
{$else}
Result := 3;
{$endif Trial}
end;
{$ifdef Trial}
{$include trial\taux6.inc}
{$endif Trial}
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -