umfstatustext.pas

来自「DelphiDoc is a program for automatic gen」· PAS 代码 · 共 71 行

PAS
71
字号
{  JADD - Just Another DelphiDoc: Documentation from Delphi Source Code

Copyright (C) 2002-2008   Gerold Veith

This file is part of JADD - Just Another DelphiDoc.

DelphiDoc is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 3 as
published by the Free Software Foundation.

DelphiDoc is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
}


unit UMFStatusText;

{Contains a page to show the status text of the generator after generating the
 documentation. }

interface

uses Classes, Forms, Controls, StdCtrls, ExtCtrls,
     UMainFormFrame,
     UJADDState;

type
  {A page to show the status text of the generator after generating the
   documentation. }
  TMFStatusText = class(TMainFormFrame)
    Memo: TMemo;
  private
  protected
    //Called when the generator changes.
    procedure StateGeneratorChanged(State: TJADDState); override;

  public
  end;


implementation

{$R *.dfm}

uses General;


{Called when the generator changes.
~param State the state that has been changed }
procedure TMFStatusText.StateGeneratorChanged(State: TJADDState);
begin
 if State.Generate.GeneratorAvailable then
  try
    //show the status text of the generator
    Memo.Text := State.Generate.GetGenerateStatusText;
  except
   Memo.Text := Copy(State.Generate.GetGenerateStatusText, 1, 30000) +
                LineDelimiter + 'Status text too long, truncated!';
  end
 else
  Memo.Text := '';
end;


end.
  

⌨️ 快捷键说明

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