usurrogateview.pas

来自「一整套的源代码」· PAS 代码 · 共 58 行

PAS
58
字号
unit USurrogateView;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, UView, RzCommon, jpeg, RzBckgnd, ExtCtrls, RzPanel,
  MyTools, MyView, UModel, MyFactory; 

type
  TSurrogateView = class(TView, ISurrogate)
  private
    Surrogate: IView;
{---------------------------------------- ISurrogate ----------------------------------------}
  public
    procedure SetSurrogate(Surrogate: IView); virtual;
    function GetSurrogate: IView; virtual;
  public
    function GetModel: TModel; override;
    function GetModelFactory: TModelFactory; override;
    procedure Refresh(Parameters: IParameters); override;
  end;

implementation

{$R *.dfm}

{ TSurrogateView }

function TSurrogateView.GetModel: TModel;
begin
  Result := GetSurrogate.GetModel;
end;

function TSurrogateView.GetModelFactory: TModelFactory;
begin
  Result := GetSurrogate.GetModelFactory;
end;

function TSurrogateView.GetSurrogate: IView;
begin
  Result := Surrogate;
end;

procedure TSurrogateView.Refresh(Parameters: IParameters);
begin
  inherited;
  GetSurrogate.Refresh(Parameters);
end;

procedure TSurrogateView.SetSurrogate(Surrogate: IView);
begin
  Self.Surrogate := Surrogate;
end;

end.

⌨️ 快捷键说明

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