創建一個簡單的"專家"

sssssd518

sssssd518

2016-02-19 21:30

人生本是一个不断学习的过程,在这个过程中,图老师就是你们的好帮手,下面分享的創建一個簡單的"專家"懂设计的网友们快点来了解吧!

  這個單元可以編譯到一個包中,之後它可以出現在Delphi的幫助菜單中。

(本文来源于图老师网站,更多请访问https://m.tulaoshi.com/bianchengyuyan/)

  注:在Interface的uses 語句中加入ToolsApi.

  type
    
TSDCSimpleExpert = class(TNotifierObject, IOTAMenuWizard, IOTAWizard)
    public
      function 
GetIDString: string;
      function GetName: string;
      function GetState: TWizardState;
      procedure Execute;
      function GetMenuText: string;
    end;
  
  procedure Register;
  
  implementation
  
  uses 
Dialogs;
  
  procedure Register;
  begin
    
RegisterPackageWizard(TSDCSimpleExpert.Create);注冊"專家}
  
end;
  
  { TSDCSimpleExpert }"}
  
  
procedure TSDCSimpleExpert.Execute;
  begin
    
{當單擊菜單項時,執行這段代碼}
    
ShowMessage('Hello SwissDelphiCenter Simple Expert.');
  end;
  
  function TSDCSimpleExpert.GetIDString: string;
  begin
    
{唯一"專家"標識符}
    
Result := 'SwissDelphiCenter.SimpleExpert';
  end;
  
  function TSDCSimpleExpert.GetMenuText: string;
  begin
    
{菜單項的標題}
    
Result := 'SwissDelphiCenter Simple Expert';
  end;
  
  function TSDCSimpleExpert.GetName: string;
  begin
    
{“專家”的名字}
    
Result := 'SwissDelphiCenter Simple Expert';
  end;
  
  function TSDCSimpleExpert.GetState: TWizardState;
  begin
    
Result := [wsEnabled];
  end;
  

(本文来源于图老师网站,更多请访问https://m.tulaoshi.com/bianchengyuyan/)
展开更多 50%)
分享

猜你喜欢

創建一個簡單的"專家"

编程语言 网络编程
創建一個簡單的"專家"

饮茶的"宜"与"忌"

养生 健康
饮茶的"宜"与"忌"

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

"萝卜腿"和"大象腿"的巧妙塑法

瘦腿
"萝卜腿"和"大象腿"的巧妙塑法

利用"委托"实现对象实例按"多字段嵌套"排序

电脑网络
利用"委托"实现对象实例按"多字段嵌套"排序

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

彝族的"老鼠嫁女节"

彝族 少数民族
彝族的"老鼠嫁女节"

大揭秘 "人临死的感受"

电脑网络
大揭秘 "人临死的感受"

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

WPS文档保护技巧 教你如何给文档加密

WPS文档保护技巧 教你如何给文档加密

伤感沉默的爱情签名 无知者无痛无畏无忧伤

伤感沉默的爱情签名 无知者无痛无畏无忧伤
下拉加载更多内容 ↓