📄 adproped.pas
字号:
(***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is TurboPower Async Professional
*
* The Initial Developer of the Original Code is
* TurboPower Software
*
* Portions created by the Initial Developer are Copyright (C) 1991-2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* ***** END LICENSE BLOCK ***** *)
{*********************************************************}
{* ADPROPED.PAS 4.06 *}
{*********************************************************}
{* Property editor registration *}
{*********************************************************}
{Global defines potentially affecting this unit}
{$I AWDEFINE.INC}
{Options required for this unit}
{$G+,F+}
unit Adproped;
{Property/Component Editors}
interface
uses
Classes,
Controls,
{$IFDEF Delphi6}
DesignIntf,
DesignEditors,
{$ELSE}
DsgnIntf,
{$ENDIF}
Forms,
OoMisc,
AdAbout;
procedure Register;
type
TApdPacketStringProperty = class(TStringProperty)
public
function GetValue: string; override;
procedure SetValue(const Value: string); override;
end;
TApdPacketEditor = class(TDefaultEditor)
public
procedure ExecuteVerb(Index: Integer); override;
function GetVerb(Index: Integer): string; override;
function GetVerbCount: Integer; override;
end;
TApdVoipAudioVideoEditor = class (TDefaultEditor)
public
procedure ExecuteVerb(Index: Integer); override;
function GetVerb(Index: Integer): string; override;
function GetVerbCount: Integer; override;
end;
TApdVersionProperty = class(TStringProperty)
public
function GetAttributes: TPropertyAttributes; override;
procedure Edit; override;
end;
TApdValidEnumProperty = class(TEnumProperty)
public
function GetAttributes: TPropertyAttributes; override;
procedure GetValues(Proc: TGetStrProc); override;
end;
TApdStateEditor = class(TDefaultEditor)
public
procedure ExecuteVerb(Index: Integer); override;
function GetVerb(Index: Integer): string; override;
function GetVerbCount: Integer; override;
end;
TApdGenericFileNameProperty = class(TStringProperty)
protected
public
function GetAttributes: TPropertyAttributes; override;
procedure Edit; override;
end;
TApdAPFFileNameProperty = class(TApdGenericFileNameProperty)
end;
TApdConverterNameProperty = class(TApdGenericFileNameProperty)
end;
TApdLogNameProperty = class(TApdGenericFileNameProperty)
end;
TApdTraceNameProperty = class(TApdGenericFileNameProperty)
end;
TApdHistoryNameProperty = class(TApdGenericFileNameProperty)
end;
TApdCaptureNameProperty = class(TApdGenericFileNameProperty)
end;
TApdAPJNameProperty = class(TApdGenericFileNameProperty)
end;
TApdFaxCoverNameProperty = class(TApdGenericFileNameProperty)
end;
TApdDirectoryProperty = class(TStringProperty)
public
function GetAttributes: TPropertyAttributes; override;
procedure Edit; override;
end;
{ Voip Properties }
TApdVoipAudioVideoProperty = class (TStringProperty)
public
function GetAttributes: TPropertyAttributes; override;
procedure Edit; override;
end;
implementation
uses
SysUtils,
WinTypes,
WinProcs,
Dialogs,
TypInfo,
FileCtrl,
AdFax,
AdFaxCtl,
AdFaxCvt,
AdFaxPrn,
AdFaxSrv,
AdFtp,
AdFView,
AdMdm,
AdPort,
AdPEdit0,
AdPacket,
AdPackEd,
AdPager,
AdProtcl,
AdScript,
AdStatLt,
AdStMach,
AdStatEd,
AdTapi,
AdTrmEmu,
AdVoip,
AdVoipEd;
procedure Register;
begin
{ register our Version property editors }
RegisterPropertyEditor(TypeInfo(string), TApdBaseComponent,
'Version', TApdVersionProperty);
RegisterPropertyEditor(TypeInfo(string), TApdBaseWinControl,
'Version', TApdVersionProperty);
RegisterPropertyEditor(TypeInfo(string), TApdBaseOleControl,
'Version', TApdVersionProperty);
RegisterPropertyEditor(TypeInfo(string), TApdBaseGraphicControl,
'Version', TApdVersionProperty);
RegisterPropertyEditor(TypeInfo(string), TApdBaseScrollingWinControl,
'Version', TApdVersionProperty);
{ property editors for the TApdCustomComPort }
RegisterPropertyEditor(TypeInfo(TBaudRate), TApdCustomComPort,
'Baud', TBaudRateProperty);
RegisterPropertyEditor(TypeInfo(TDeviceLayer), TApdCustomComPort,
'DeviceLayer', TApdValidEnumProperty);
{ property editors for the TApdDataPacket and TApdCustomState }
RegisterPropertyEditor(TypeInfo(string), TApdDataPacket,
'StartString', TApdPacketStringProperty);
RegisterPropertyEditor(TypeInfo(string), TApdDataPacket,
'EndString', TApdPacketStringProperty);
RegisterPropertyEditor(TypeInfo(string), TApdCustomState,
'OutputOnActivate', TApdPacketStringProperty);
{ property editors for the TApdCustomModemPager }
RegisterPropertyEditor(TypeInfo(string), TApdCustomModemPager, {!!.01}
'ModemHangup', TApdPacketStringProperty); {!!.01}
RegisterPropertyEditor(TypeInfo(string), TApdCustomModemPager, {!!.01}
'ModemInit', TApdPacketStringProperty); {!!.01}
{ property editor for TApdState strings }
RegisterPropertyEditor(TypeInfo(string), TApdStateCondition, {!!.06}
'StartString', TApdPacketStringProperty); {!!.06}
RegisterPropertyEditor(TypeInfo(string), TApdStateCondition, {!!.06}
'EndString', TApdPacketStringProperty); {!!.06}
{ Property editors for the TApdVoip }
RegisterPropertyEditor (TypeInfo (string), TApdCustomVoip,
'AudioInDevice', TApdVoipAudioVideoProperty);
RegisterPropertyEditor (TypeInfo (string), TApdCustomVoip,
'AudioOutDevice', TApdVoipAudioVideoProperty);
RegisterPropertyEditor (TypeInfo (string), TApdCustomVoip,
'VideoInDevice', TApdVoipAudioVideoProperty);
RegisterPropertyEditor (TypeInfo (string), TApdCustomVoip,
'VideoOutDevice', TApdVoipAudioVideoProperty);
{ property editors for file properties }
RegisterPropertyEditor(TypeInfo(TPassString), TApdCustomComPort,
'LogName', TApdLogNameProperty);
RegisterPropertyEditor(TypeInfo(TPassString), TApdCustomComPort,
'TraceName', TApdTraceNameProperty);
RegisterPropertyEditor(TypeInfo(string), TApdFTPLog,
'FTPHistoryName', TApdGenericFileNameProperty);
RegisterPropertyEditor(TypeInfo(string), TApdCustomScript,
'ScriptFile', TApdGenericFileNameProperty);
RegisterPropertyEditor(TypeInfo(TFileName), TApdCustomProtocol,
'FileMask', TApdGenericFileNameProperty);
RegisterPropertyEditor(TypeInfo(string), TApdCustomProtocol,
'FileName', TApdGenericFileNameProperty);
RegisterPropertyEditor(TypeInfo(string), TApdProtocolLog,
'HistoryName', TApdHistoryNameProperty);
RegisterPropertyEditor(TypeInfo(string), TApdPagerLog,
'HistoryName', TApdHistoryNameProperty);
RegisterPropertyEditor(TypeInfo(string), TAdCustomTerminal,
'CaptureFile', TApdCaptureNameProperty);
RegisterPropertyEditor(TypeInfo(string), TApdTapiLog,
'TapiHistoryName', TApdHistoryNameProperty);
RegisterPropertyEditor(TypeInfo(string), TApdCustomFaxConverter,
'DocumentFile', TApdConverterNameProperty);
RegisterPropertyEditor(TypeInfo(string), TApdCustomFaxConverter,
'OutFileName', TApdAPFFileNameProperty);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -