about.pas

来自「Delphi利用MVC开发的典型例子」· PAS 代码 · 共 53 行

PAS
53
字号
unit About;

interface

uses Windows, Classes, Graphics, Forms, Controls, StdCtrls,
  Buttons, patterns, ExtCtrls, commandlist;


type
  TAboutBox = class(TForm)
    Panel1: TPanel;
    ProgramIcon: TImage;
    ProductName: TLabel;
    Version: TLabel;
    Copyright: TLabel;
    Button1: TButton;
    Label1: TLabel;
    Label2: TLabel;
  private
    { Private declarations }
  public
    { Public declarations }
  end;

  TControllerAbout = class(TController)
  protected
    procedure DoCommand(Command: string; const args: string=''); override;
  public
  end;

var
  AboutBox: TAboutBox;

implementation

{$R *.DFM}

procedure TControllerAbout.DoCommand(Command: string; const args: string='');
begin
  if Command = CMD_SHOW_ABOUT then
    with TAboutBox.Create(nil) do
    begin
      showModal;
      free;
    end;
end;

initialization
  ControlCenter.RegController(TControllerAbout.Create);

end.

⌨️ 快捷键说明

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