P
poplarni
Unregistered / Unconfirmed
GUEST, unregistred user!
刚学一点delphi,毕业设计得用,求达人帮忙。我的QQ号317979087
我是用fastlinechart
在收发数据的窗口上点个按钮就出现接到数据的波形图,老出问题,看了Tchart的好多列子还是不会,我接受到的数据是0f 34 53 53 23格式的,谢谢!
我的程序,不要笑阿,这是弹出的窗口的程序,原窗口叫MAINFORM,单元名Serialcform,这个叫CFORM单元名SerialDebug
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, TeEngine, Series, ExtCtrls, TeeProcs, Chart,Serialcform;
type
TCForm = class(TForm)
Chart1: TChart;
Series1: TFastLineSeries;
Timer1: TTimer;
procedure Timer1Timer(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
CForm: TCForm;
value:Array of integer;
Len,x:integer;
output:string;
implementation
{$R *.dfm}
procedure TCForm.Timer1Timer(Sender: TObject);
begin
output:=mainform.mmSend.Text;
Len:=Length(output);
if x>Len then
exit;
Series1.AddXY(x,value[x],'',clRed);
inc(x);
end;
procedure TCForm.FormShow(Sender: TObject);
var
i:integer;
begin
output:=mainform.mmSend.Text;
Len:=Length(output);
for i:=0 to Len do
value:=strtoInt(output);
x:=0;
end;
end.
我是用fastlinechart
在收发数据的窗口上点个按钮就出现接到数据的波形图,老出问题,看了Tchart的好多列子还是不会,我接受到的数据是0f 34 53 53 23格式的,谢谢!
我的程序,不要笑阿,这是弹出的窗口的程序,原窗口叫MAINFORM,单元名Serialcform,这个叫CFORM单元名SerialDebug
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, TeEngine, Series, ExtCtrls, TeeProcs, Chart,Serialcform;
type
TCForm = class(TForm)
Chart1: TChart;
Series1: TFastLineSeries;
Timer1: TTimer;
procedure Timer1Timer(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
CForm: TCForm;
value:Array of integer;
Len,x:integer;
output:string;
implementation
{$R *.dfm}
procedure TCForm.Timer1Timer(Sender: TObject);
begin
output:=mainform.mmSend.Text;
Len:=Length(output);
if x>Len then
exit;
Series1.AddXY(x,value[x],'',clRed);
inc(x);
end;
procedure TCForm.FormShow(Sender: TObject);
var
i:integer;
begin
output:=mainform.mmSend.Text;
Len:=Length(output);
for i:=0 to Len do
value:=strtoInt(output);
x:=0;
end;
end.