📄 umfdiagrams.pas
字号:
{ 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 UMFDiagrams;
{Contains a simple page with a button to show a dialog to create diagrams of
the parsed data, its classes and files.
}
interface
uses Classes, Forms, Controls, StdCtrls, ExtCtrls,
UMainFormFrame,
UJADDState;
type
{A simple page with a button to show a dialog to create diagrams of the
parsed data, its classes and files. }
TMFDiagrams = class(TMainFormFrame)
ButtonDiagrams: TButton;
procedure ButtonDiagramsClick(Sender: TObject);
private
protected
//Called when the list of parsed file changes.
procedure StateFileListChanged(State: TJADDState); override;
public
end;
implementation
{$R *.dfm}
uses Dialogs,
General,
UDiagramForm;
{Called when the list of parsed file changes.
~param State the state that has been changed }
procedure TMFDiagrams.StateFileListChanged(State: TJADDState);
begin //diagrams can only be created if data is avilable
ButtonDiagrams.Enabled := assigned(State.FileList);
end;
{Called when the button to create diagrams is clicked.
~param Sender the sender of the event, ~[link ButtonDiagrams] }
procedure TMFDiagrams.ButtonDiagramsClick(Sender: TObject);
begin
if State.CompletelyParsed or //data valid?
(MessageDlg('No data has been parsed validly. If parsing was aborted, this will probably result in faulty diagrams and may cause errors in the program.' + LineDelimiter +
'Are you sure, you want to create diagrams of the data?',
mtWarning, [mbYes, mbCancel],
ButtonDiagrams.HelpContext) = mrYes) then
ShowDiagramEditor(State.FileList); //show the window for the diagrams
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -