untfindcompwizard.pas

来自「简单好用的Delphi专家一个简单好用的Delphi专家 安装后Delph」· PAS 代码 · 共 69 行

PAS
69
字号
unit unTFindCompWizard;

interface

uses ToolsAPI, unTBaseExpert, Forms, Controls, Variants, unTActionReplacer;

type
  TFindCompWizard = class(TBaseExpert)
    private
      actFindReplacer: TActionReplacer;
    public
      function GetIDString(): String; override;
      function GetName(): String; override;
      function GetState(): TWizardState; override;
      procedure Execute(); override;
      { IOTAMenuWizard }
      function GetMenuText(): String; override;

    public
      constructor Create;
      destructor Destroy; override;

      //琩тㄆン
      procedure OnFindExecute(Sender: TObject); 
  end;


  procedure Register;

implementation

uses unToolsAPI, unFrmFindComp, SysUtils;


procedure Register;
begin
  ToolsAPI.RegisterPackageWizard( TFindCompWizard.Create() );
end;

{ TFindCompWizard }

constructor TFindCompWizard.Create;
begin
  inherited;

  TRY
    actFindReplacer:= TActionReplacer.Create('SearchFindCommand', OnFindExecute);
  EXCEPT
    actFindReplacer:= nil;
  END;
end;

destructor TFindCompWizard.Destroy;
begin
  if actFindReplacer<>nil then
    actFindReplacer.Free;

  inherited;
end;

procedure TFindCompWizard.Execute;
var
  iFormEditor: IOTAFormEditor;
  i: Integer;
  sName, sCaption: String;
  bSelFirst: Boolean;
begin
  inherited;
  //陪ボ琩т

⌨️ 快捷键说明

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