Delphi 最简单的专家包 示例( 二) 继承自IOTAMenuWizard

来源:互联网 发布:php上传文件到ftp 编辑:程序博客网 时间:2024/05/18 03:31
unit MyWizard2;


interface




uses Windows,Classes,SysUtils,ToolsAPI,Menus,Registry, Unit1CCNato;


type TMywizardIdeMenu2 = class( TNotifierObject,IOTAWizard,IOTAMenuWizard)
private


public
  function GetIDString : String;
  function GetName : String;
  function GetState : TWizardState;
  procedure Execute;
  function GetMenuText : String;


end;
{ TMywizardIdeMenu2 }
procedure Register;
implementation
uses  Dialogs;
procedure Register;
begin
    RegisterPackageWizard(TMywizardIdeMenu2.Create);
end;


procedure TMywizardIdeMenu2.Execute;
begin
   ShowMessage('hello');
end;


function TMywizardIdeMenu2.GetIDString: String;
begin
  result := 'SoftConcepts.DummyWizard';
end;


function TMywizardIdeMenu2.GetMenuText: String;
begin
   result := 'WizardDemo2';
end;


function TMywizardIdeMenu2.GetName: String;
begin
  result := 'Dummy Wizard';
end;


function TMywizardIdeMenu2.GetState: TWizardState;
begin
  result := [wsEnabled];
end;


end.