📄 dllexper.pas
字号:
unit DLLExper;
interface
uses
ShareMem, Windows, ExptIntf, ToolIntf, FileCtrl, SysUtils;
type
// standard expert
TPrjInfoExpert = class (TIExpert)
public
function GetStyle: TExpertStyle; override;
function GetName: string; override;
function GetAuthor: string; override;
function GetComment: string; override;
function GetPage: string; override;
function GetGlyph: HICON; override;
function GetState: TExpertState; override;
function GetIDString: string; override;
function GetMenuText: string; override;
procedure Execute; override;
end;
function InitExpert(ToolServices: TIToolServices;
RegisterProc: TExpertRegisterProc;
var Terminate: TExpertTerminateProc): Boolean; stdcall;
implementation
uses
Forms, VirtIntf, PrjForm, AddInExp;
// *****************************
// standard expert: project info
// *****************************
function TPrjInfoExpert.GetStyle: TExpertStyle;
begin
Result := esStandard;
end;
function TPrjInfoExpert.GetName: string;
begin
Result := 'Project Information Wizard';
end;
function TPrjInfoExpert.GetAuthor: string;
begin
Result := 'Marco and Tim';
end;
function TPrjInfoExpert.GetComment: string;
begin
Result := '';
end;
function TPrjInfoExpert.GetPage: string;
begin
Result := '';
end;
function TPrjInfoExpert.GetGlyph: HICON;
begin
Result := 0;
end;
function TPrjInfoExpert.GetState: TExpertState;
begin
// conditional code
if ToolServices.GetProjectName <> '' then
Result := [esEnabled]
else
Result := [];
end;
function TPrjInfoExpert.GetIDString: string;
begin
Result := 'DDHandbook.PrjInfoWizard';
end;
function TPrjInfoExpert.GetMenuText: string;
begin
Result := 'Project &Info Wizard...';
end;
procedure TPrjInfoExpert.Execute;
begin
try
PrjInfoForm := TPrjInfoForm.Create (Application);
PrjInfoForm.UpdateTree;
PrjInfoForm.ShowModal;
PrjInfoForm.Free;
except
ToolServices.RaiseException(ReleaseException);
end;
end;
function InitExpert (ToolServices: TIToolServices;
RegisterProc: TExpertRegisterProc;
var Terminate: TExpertTerminateProc): Boolean;
begin
Result := True;
try
ExptIntf.ToolServices := ToolServices;
Application.Handle := ToolServices.GetParentHandle;
RegisterProc (TPrjInfoExpert.Create);
RegisterProc (TReloadExpert.Create);
except
ToolServices.RaiseException(ReleaseException);
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -