tntunicodevcl2_register.pas

来自「TntExUpdate 是 流行的 TntUnicodeControls控件的扩」· PAS 代码 · 共 75 行

PAS
75 行
字号
unit TntUnicodeVcl2_Register;

interface

procedure Register;

implementation

uses
  DesignIntf, Classes, SysUtils,
  TntVer, TntAbout,
  TntStdCtrls2, TntButtons2, TntDBCtrls2, TntFileCtrl2, TntDialogsEx;

type
  TAboutTntH = class(TAboutTnt)
  protected
    function DialogTitle: string; override;
    function DialogMess: string; override;
    function PropertyTitle: string; override;
  end;

{--------------------------------------}
{-PROTECTED--------}

function TAboutTntH.DialogMess: string;
begin
  Result := Format ('Adapted by'#13#10'%s'#13#10#13#10'Used:'#13#10'%s',
   [JMNMess, TntWareStr]);
end;

function TAboutTntH.DialogTitle: string;
begin
  Result := 'Tnt-Ex';
end;

function TAboutTntH.PropertyTitle: string;
begin
  Result := Concat ('Tnt-Ex, Version ', TntJVCL_VersionString);
end;

{--------------------------------------}

const
  TNT_STANDARD      = 'Tnt Standard';
  TNT_ADDITIONAL    = 'Tnt Additional';
  TNT_DATA_CONTROLS = 'Tnt Data Controls';

procedure Register;
procedure RegH (CC: TClass);
begin
  RegisterPropertyEditor(TypeInfo(TAboutInfo), CC, 'About', TAboutTntH);
end;
begin
  // ------- Standard -------
  RegisterComponents(TNT_STANDARD, [TTntEdit2]);
  RegisterComponents(TNT_STANDARD, [TTntLabel2]);
  // ------- Additional -------
  RegisterComponents(TNT_ADDITIONAL, [TTntBitBtn2]);
  // ------- Data Controls -------
  RegisterComponents(TNT_DATA_CONTROLS, [TTntDBEdit2]);
  // ------- Win 3.1 -------
  RegisterComponents('Tnt Win 3.1', [TTntFileListBox,
    TTntDirectoryListBox,
    TTntDriveComboBox]);
  // ------- Tnt Dialogs -------
  RegisterComponents('Tnt Dialogs', [TTntOpenDialogEx,
    TTntSaveDialogEx]);
  RegH (TTntEdit2);
  RegH (TTntLabel2);
  RegH (TTntBitBtn2);
  RegH (TTntDBEdit2);
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?