dkintsimp.pas

来自「EXE+BPL+DLL+Interface項目解決方案演示 經典」· PAS 代码 · 共 64 行

PAS
64
字号
{*******************************************************
{程 序 员:杨茂峰---(建立日期:2005-2-3)
{版  本:
{修改日期:2005-2-3
{说  明:DLL中实现项目中的接口
{*******************************************************}
unit dkIntsImp;


interface

uses
  dkInts, dkSystem, Forms;

type
  TModelService = class(TdkInterfacedObject, IModelInts)
  public
    constructor Create();
    function ExecuteCmd(CmdIndex: Integer; Param1, Param2: Integer): HResult;
  end;

implementation

uses uFDGroup;

{ TModelService }

constructor TModelService.Create;
begin

end;

function TModelService.ExecuteCmd(CmdIndex, Param1,
  Param2: Integer): HResult;
begin
  case CmdIndex of
    CMD_BEFORE_EXECUTE:
      begin
        if FDGroupForm = nil then result := S_OK else result := S_FALSE;
      end;
    CMD_CREATE_FORM:
      begin
        if FDGroupForm = nil then
        begin
          FDGroupForm := TFDGroupForm.Create(Application, Param1);
          FDGroupForm.Show;
        end;
        result := S_OK;
      end;
    CMD_CLOSE_FORM:
      begin
        if FDGroupForm <> nil then
          if FDGroupForm.dkClose then
          begin
            FDGroupForm := nil;
            result := S_OK;
          end;
      end;
  end;
end;

end.

⌨️ 快捷键说明

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