⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usecplugmodule.pas

📁 一个基于不需引擎的文件管理系统,使用了许多界面比较好的控件
💻 PAS
字号:
unit uSecPlugModule;

interface

uses
  SysUtils, Classes, Dialogs, uSecPlugImp, uSecPlugInf, ImgList, Controls, Forms,
  uIAppInf;

type
  TSecPlugModule = class(TDataModule)
  private
    FSecPlug:TSecPlug;
    ASecPlug:ISecPlug;

    procedure SetOnExecute(const Value: TNotifyEvent);
    function GetOnExecute:TNotifyEvent;

    procedure SetOnLoad(const Value: TNotifyEvent);
    function GetOnLoad:TNotifyEvent;

    procedure SetOnUnLoad(const Value: TNotifyEvent);
    function GetOnUnLoad:TNotifyEvent;

    function GetOnGetContext: TNotifyEvent;
    procedure SetOnGetContext(const Value: TNotifyEvent);

    function GetVer: string;
    procedure SetVer(const Value: string);

    function GetPlugType: TPlugType;
    procedure SetPlugType(const Value: TPlugType);

    function GetAutoExec: Boolean;
    procedure SetAutoExec(const Value: Boolean);

    function GetDescription: string;
    procedure SetDescription(const Value: string);

    function GetFileName:string;
    procedure SetFileName(const value:string);

    function GetDrawMenu: Boolean;
    procedure SetDrawMenu(const Value: Boolean);    

    function GetPlugImages: TImageList;
    procedure SetPlugImages(const value:TImageList);
    function GetDisplayInMenu: Boolean;
    procedure SetDisplayInMenu(const Value: Boolean);
    function GetOnAction: TOnAction;
    procedure SetOnAction(const Value: TOnAction);
    function GetOnMenuPopUp: TOnMenuPopUp;
    procedure SetOnMenuPopUp(const Value: TOnMenuPopUp);
    function GetOnDrawMenuItem: TOnDrawMenuItem;
    procedure SetOnDrawMenuItem(const Value: TOnDrawMenuItem);
    function GetHostForm: TComponent;
    function GetHostID: integer;
    { Private declarations }
  protected
    procedure SetName(const NewName: TComponentName);override;
  public
    { Public declarations }
    App:IApp;
    ParentForm:TForm;

    constructor create(AOwner: TComponent); override;
    destructor destroy;override;
    property TheSecPlug:ISecPlug read ASecPlug;
    property FileName:string read GetFileName write SetFileName;
    property HostForm:TComponent read GetHostForm;
    property HostID:integer read GetHostID;     
  published
    property OnExecute:TNotifyEvent read GetOnExecute write SetOnExecute;
    property OnLoad:TNotifyEvent read GetOnLoad write SetOnLoad;
    property OnUnLoad:TNotifyEvent read GetOnUnLoad write SetOnUnLoad;
    property OnGetContext:TNotifyEvent read GetOnGetContext write SetOnGetContext;
    property OnAction:TOnAction read GetOnAction write SetOnAction;
    property OnMenuPopUp:TOnMenuPopUp read GetOnMenuPopUp write SetOnMenuPopUp;
    property OnDrawMenuItem:TOnDrawMenuItem read GetOnDrawMenuItem write SetOnDrawMenuItem;

    property Ver:string read GetVer write SetVer;
    property PlugType:TPlugType read GetPlugType write SetPlugType;
    property AutoExec:Boolean read GetAutoExec write SetAutoExec;
    property DisplayInMenu:Boolean read GetDisplayInMenu write SetDisplayInMenu;
    property DrawMenu:Boolean read GetDrawMenu write SetDrawMenu;
    property Description:string read GetDescription write SetDescription;
    property PlugImages:TImageList read GetPlugImages write SetPlugImages;
  end;


implementation

{ TSecPlugModule }

constructor TSecPlugModule.create(AOwner: TComponent);
begin
  FSecPlug:=TSecPlug.Create;
  ASecPlug:=FSecPlug;
  FileName:=ParamStr(0); 
  inherited create(AOwner);
end;

destructor TSecPlugModule.destroy;
begin
  ASecPlug:=nil;
  inherited;
end;

function TSecPlugModule.GetAutoExec: Boolean;
begin
  result:=FSecPlug.AutoExec;
end;

function TSecPlugModule.GetDescription: string;
begin
  result:=FSecPlug.Description;
end;

function TSecPlugModule.GetDisplayInMenu: Boolean;
begin
  result:=FSecPlug.DisplayInMenu;
end;

function TSecPlugModule.GetDrawMenu: Boolean;
begin
  result:=FSecPlug.DrawMenu;
end;

function TSecPlugModule.GetFileName: string;
begin
  result:=FSecPlug.FileName;
end;

function TSecPlugModule.GetHostForm: TComponent;
begin
  result:=FSecPlug.HostForm; 
end;

function TSecPlugModule.GetHostID: integer;
begin
  result:=FSecPlug.HostID; 
end;

function TSecPlugModule.GetOnAction: TOnAction;
begin
  result:=FSecPlug.OnAction;
end;

function TSecPlugModule.GetOnDrawMenuItem: TOnDrawMenuItem;
begin
  result:=FSecPlug.OnDrawMenuItem;
end;

function TSecPlugModule.GetOnExecute: TNotifyEvent;
begin 
  result:=FSecPlug.OnExecute;
end;

function TSecPlugModule.GetOnGetContext: TNotifyEvent;
begin
  result:=FSecPlug.OnGetContext; 
end;

function TSecPlugModule.GetOnLoad: TNotifyEvent;
begin
  result:=FSecPlug.OnLoad;
end;

function TSecPlugModule.GetOnMenuPopUp: TOnMenuPopUp;
begin
  result:=FSecPlug.OnMenuPopUp;
end;

function TSecPlugModule.GetOnUnLoad: TNotifyEvent;
begin
  result:=FSecPlug.OnUnLoad;
end;

function TSecPlugModule.GetPlugImages: TImageList;
begin
  result:=FSecPlug.PlugImages;
end;

function TSecPlugModule.GetPlugType: TPlugType;
begin
  result:=FSecPlug.PlugType; 
end;

function TSecPlugModule.GetVer: string;
begin
  result:=FSecPlug.Ver;
end;

procedure TSecPlugModule.SetAutoExec(const Value: Boolean);
begin
  FSecPlug.AutoExec:=value;  
end;

procedure TSecPlugModule.SetDescription(const Value: string);
begin
  FSecPlug.Description:=value;   
end;

procedure TSecPlugModule.SetDisplayInMenu(const Value: Boolean);
begin
  FSecPlug.DisplayInMenu:=value; 
end;

procedure TSecPlugModule.SetDrawMenu(const Value: Boolean);
begin
  FSecPlug.DrawMenu:=value; 
end;

procedure TSecPlugModule.SetFileName(const value: string);
begin
  FSecPlug.FileName:=value;
end;

procedure TSecPlugModule.SetName(const NewName: TComponentName);
begin
  inherited;
  FSecPlug.Name:=NewName;
end;

procedure TSecPlugModule.SetOnAction(const Value: TOnAction);
begin
  FSecPlug.OnAction:=value; 
end;

procedure TSecPlugModule.SetOnDrawMenuItem(const Value: TOnDrawMenuItem);
begin
  FSecPlug.OnDrawMenuItem:=Value;
end;

procedure TSecPlugModule.SetOnExecute(const Value: TNotifyEvent);
begin
  FSecPlug.OnExecute := Value;
end;

procedure TSecPlugModule.SetOnGetContext(const Value: TNotifyEvent);
begin
  FSecPlug.OnGetContext := Value;
end;

procedure TSecPlugModule.SetOnLoad(const Value: TNotifyEvent);
begin
  FSecPlug.OnLoad := Value;
end;

procedure TSecPlugModule.SetOnMenuPopUp(const Value: TOnMenuPopUp);
begin
  FSecPlug.OnMenuPopUp:=Value;
end;

procedure TSecPlugModule.SetOnUnLoad(const Value: TNotifyEvent);
begin
  FSecPlug.OnUnLoad := Value;
end;

procedure TSecPlugModule.SetPlugImages(const value: TImageList);
begin
  FSecPlug.PlugImages:=value;  
end;

procedure TSecPlugModule.SetPlugType(const Value: TPlugType);
begin
  FSecPlug.PlugType:=Value;  
end;

procedure TSecPlugModule.SetVer(const Value: string);
begin
  FSecPlug.Ver:=Value;
end;

end.

⌨️ 快捷键说明

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