pfgpalmsynceditor.pas

来自「delphi编写与Palm数据交换管道连接程序。」· PAS 代码 · 共 70 行

PAS
70
字号
unit pfgPalmSyncEditor;

interface

{$I pfgPalmConduits.inc}

{$IFDEF PFG_DELPHI6_UP}
uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, DesignIntf, DesignEditors;
{$ELSE}
uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, dsgnintf;
{$ENDIF}

type
  TpfgPalmSyncEditor = class(TComponentEditor)
  private
  protected
  public
    procedure ExecuteVerb(Index: Integer); override;
    function GetVerb(Index: Integer): string; override;
    function GetVerbCount: Integer; override;
  end;

procedure Register;

implementation
uses
  pfgPalmSyncWizzard,
  pfgPalmSyncComponent;

procedure Register;
begin
  RegisterComponentEditor(TpfgPalmSyncComponent, TpfgPalmSyncEditor);
end;

{ TpfgPalmSyncEditor }

procedure TpfgPalmSyncEditor.ExecuteVerb(Index: Integer);
begin
  case index of
    0: begin
        if ShowPalmSyncWizzard(TpfgPalmSyncComponent(Component)) = mrOk then
        begin
          Designer.Modified;
        end;
      end;
    1: begin
        TpfgPalmSyncComponent(Component).CheckObligatoryAssignments;
      end;
  end;
end;

function TpfgPalmSyncEditor.GetVerb(Index: Integer): string;
begin
  case index of
    0: Result := '&PalmSyncComponent Editor ..';
    1: Result := '&Check Obligatory Propertys';
  else Result := '';
  end;
end;

function TpfgPalmSyncEditor.GetVerbCount: Integer;
begin
  Result := 2;
end;

end.

 

⌨️ 快捷键说明

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