赞
踩
unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, cxGraphics, cxControls, cxLookAndFeels,
cxLookAndFeelPainters, Vcl.StdCtrls, dxflchrt, System.ImageList, Vcl.ImgList;
type
TForm1 = class(TForm)
dxFlowChart1: TdxFlowChart;
Button1: TButton;
btnsave: TButton;
Button2: TButton;
btnLoad: TButton;
Button3: TButton;
ImageList1: TImageList;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure btnsaveClick(Sender: TObject);
procedure btnLoadClick(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses dxFcEditAdv,dxFlowChartDesigner;
//上面二个很关键,第一个引用才会弹出对话框,第二个才会弹出新的流程图设计窗口
{$R *.dfm}
procedure TForm1.btnLoadClick(Sender: TObject);
begin
dxFlowChart1.LoadFromFile('d:\a.txt');
end;
procedure TForm1.btnsaveClick(Sender: TObject);
begin
dxFlowChart1.SaveToFile('D:\a.txt');
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if ShowFlowChartEditor(dxFlowChart1,'') then
begin
self.Caption:='a';
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
dxFlowChart1.Clear;
end;
procedure TForm1.Button3Click(Sender: TObject);
var
PFlowchar:TdxFlowChartEditorOptions;
begin
PFlowchar:= TdxFlowChartEditorOptions.create;
PFlowchar.UseAdvancedShapesOnly:=true;
if ShowFlowChartEditor(dxFlowChart1,'',PFlowchar) then
begin
self.Caption:='a';
end;
end;
end.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。