大家来看看这段代码由那些错误?帮忙挑出来,谢谢(0分)

  • 主题发起人 主题发起人 ice4105
  • 开始时间 开始时间
I

ice4105

Unregistered / Unconfirmed
GUEST, unregistred user!
unit Main;

interface

uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs, StdCtrls, Buttons, ExtCtrls, Menus, About, Gauges, IniFiles,
Setpoint, Measure, Dlls, Tools, Plot, PrintPlt, Pldinfo, SingleIn, Statepar,
Fuzzypar, Calib, Timing, StState, StFuz, Fuz3D;

type
TMainForm = class(TForm)
MainMenu: TMainMenu;
FileMenu: TMenuItem;
ExitItem: TMenuItem;
N1: TMenuItem;
OpenDialog: TOpenDialog;
SaveDialog: TSaveDialog;
Help1: TMenuItem;
About1: TMenuItem;
StatusBar: TPanel;
Panel1: TPanel;
GroupBox1: TGroupBox;
MonitorLabel: TLabel;
GroupBox2: TGroupBox;
IOInterface1: TMenuItem;
View1: TMenuItem;
Run1: TMenuItem;
Edit1: TMenuItem;
LoadStateController1: TMenuItem;
LoadFuzzyController1: TMenuItem;
LoadPlotData1: TMenuItem;
SaveStateController1: TMenuItem;
SaveStateControlleras1: TMenuItem;
SaveFuzzyControlleras1: TMenuItem;
SavePlot1: TMenuItem;
StateControllerSetup: TMenuItem;
N2: TMenuItem;
FuzzyControllerSetup: TMenuItem;
StateController1: TMenuItem;
FuzzyController2: TMenuItem;
CalibrateSensors1: TMenuItem;
N5: TMenuItem;
StopController1: TMenuItem;
N6: TMenuItem;
StartMeasuring1: TMenuItem;
SetpointGenerator1: TMenuItem;
PlotMeasuredData1: TMenuItem;
PlotFileData1: TMenuItem;
Fuzzy3D1: TMenuItem;
Contents1: TMenuItem;
SearchforHelpon1: TMenuItem;
HowtoUseHelp1: TMenuItem;
N7: TMenuItem;
N8: TMenuItem;
Print1: TMenuItem;
PrintSetup1: TMenuItem;
PrinterSetupDialog: TPrinterSetupDialog;
PrintDialog: TPrintDialog;
GroupBox3: TGroupBox;
ControllerLabel: TLabel;
ParamLabel: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
measGauge: TGauge;
SetpointLabel: TLabel;
posLabel: TLabel;
angLabel: TLabel;
Dac98: TMenuItem;
DIC24: TMenuItem;
Setup1: TMenuItem;
MeasLabel: TLabel;
N9: TMenuItem;
N3: TMenuItem;
ParameterfromPLDFile1: TMenuItem;
N4: TMenuItem;
Timer1: TTimer;
Label1: TLabel;
outLabel: TLabel;
Label11: TLabel;
Label12: TLabel;
Label13: TLabel;
Label14: TLabel;
N10: TMenuItem;
N11: TMenuItem;
Timing1: TMenuItem;
PaintBox1: TPaintBox;
N12: TMenuItem;
N13: TMenuItem;
Bevel1: TBevel;
procedure ShowHint(Sender: TObject);
procedure ExitItemClick(Sender: TObject);
procedure OpenFuzzyClick(Sender: TObject);
procedure SaveStateClick(Sender: TObject);
procedure About1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure PrintSetup1Click(Sender: TObject);
procedure Print1Click(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure StartMeasuring1Click(Sender: TObject);
procedure SetpointGenerator1Click(Sender: TObject);
procedure FormClose(Sender: TObject
var Action: TCloseAction);
procedure DACSetupClick(Sender: TObject);
procedure DAC98Click(Sender: TObject);
procedure DIC24Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure ParameterfromPLDFile1Click(Sender: TObject);
procedure Contents1Click(Sender: TObject);
procedure SearchforHelpon1Click(Sender: TObject);
procedure HowtoUseHelp1Click(Sender: TObject);
procedure PlotMeasuredData1Click(Sender: TObject);
procedure PlotFileData1Click(Sender: TObject);
procedure StateController1Click(Sender: TObject);
procedure FuzzyController2Click(Sender: TObject);
procedure CalibrateSensors1Click(Sender: TObject);
procedure StopController1Click(Sender: TObject);
procedure Fuzzy3D1Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure LoadPlotData1Click(Sender: TObject);
procedure SavePlot1Click(Sender: TObject);
procedure FileMenuClick(Sender: TObject);
procedure Edit1Click(Sender: TObject);
procedure Run1Click(Sender: TObject);
procedure View1Click(Sender: TObject);
procedure IOInterface1Click(Sender: TObject);
procedure StateControllerSetupClick(Sender: TObject);
procedure FuzzyControllerSetupClick(Sender: TObject);
procedure SaveStateasClick(Sender: TObject);
procedure SaveFuzzyasClick(Sender: TObject);
procedure Timing1Click(Sender: TObject);
procedure OpenStateClick(Sender: TObject);
procedure PaintBox1Click(Sender: TObject);
procedure MeasLabelClick(Sender: TObject);

private
{ Private declarations }
single : TSingleInstance;
pict : TBitmap;
public
{ Public declarations }
Calibrated : Boolean;
FileStatus : Integer;
ExePath : TFilename;
WithFuzzy : Boolean;
HardTimer : Integer;
end;

var
MainForm: TMainForm;

const
SAMPLETIME = 0.05;

implementation

{$R *.DFM}

procedure TMainForm.FormCreate(Sender: TObject);
begin
if (0=IsDemo) and DetectNT then begin
MessageDlg( 'Windows NT is not supported by this 16 Bit software.',
mtError, [mbCancel], 0 );
Application.Terminate;
end;
Application.OnHint := ShowHint;
single := TSingleInstance.Create( Self );
Calibrated := False;
pict := TBitmap.Create;
pict.Height := 80;
pict.Width := 200;
pict.Canvas.Brush.Color := GroupBox1.Color;
pict.Canvas.FillRect( Rect(0,0,pict.Width,pict.Height) );
HardTimer := TERR_FAIL
{ Timer is not running at this time ! }
end;

procedure TMainForm.FormShow(Sender: TObject);
var
settings : TInifile;
driver : string;
card : string;
buffer : array[0..80] of char;
begin
ExePath := ExtractFilePath( Application.ExeName );
settings := TInifile.Create( ExePath+'BW500W16.INI');
driver := settings.ReadString( 'BW500', 'DRIVER', 'DAC98.DRV' );
{$IFDEF WIN32}
card := settings.ReadString( 'BW500', 'CARD', '1' )
{ only WIN32 !!!}
cardNo := StrToInt( card );
if ( 1 > cardNo ) or ( 4 < cardNo ) then
cardNo := 1;
SetService( 'bwserv32.dll' );
if 0<>IsDemo then driver := 'DUMMY.DRV';
StrPCopy( buffer, ExePath+driver );
SelectDriver( buffer, cardNo );
{$ELSE}
SetService( 'BWSERV16.DLL' );
if 0<>IsDemo then driver := 'DUMMY.DRV';
StrPCopy( buffer, ExePath+driver );
SelectDriver(buffer);
{$ENDIF}
SelectDriver(buffer);
if driver = 'DAC98.DRV' then DAC98.Checked := True;
if driver = 'DIC24.DRV' then DIC24.Checked := True;
settings.Free;

GetParameter( sizeof(param), @param );
if 99 = param.fuzzyError then
WithFuzzy := FALSE
else
WithFuzzy := TRUE;
param.controller := NONE;
param.spshape := 0;
param.spoffset := 0;
param.spamplitude := 0;
param.spperiode := 20;
FileStatus := -1;
SetParameter( sizeof(param), @param );

if 0<>IsDemo then begin
MonitorLabel.Caption := MonitorLabel.Caption + ' (Demo-Version)';
IOInterface1.Enabled := False;
Calibrated := True;
CalibrateSensors1.Checked := True;
CalibrateSensors1.Enabled := False;
if TERR_OK<>StartTimer( SAMPLETIME ) then
MessageDlg( 'StartTimer failed.', mtError, [mbCancel], 0 );
end else begin
HardTimer := StartTimer( SAMPLETIME );
if TERR_OK= HardTimer then
CalibrateSensors1Click(Self);
end;

Timer1.Enabled := True;
end;

procedure TMainForm.FormClose(Sender: TObject
var Action: TCloseAction);
begin
StopTimer;
end;

procedure TMainForm.FormDestroy(Sender: TObject);
begin
pict.free;
single.Free;
end;

procedure TMainForm.FileMenuClick(Sender: TObject);
begin
SavePlot1.Enabled := MeasureStatus<>0;
if not WithFuzzy then begin
LoadFuzzyController1.Enabled := FALSE;
SaveFuzzyControlleras1.Enabled := FALSE;
end;
end;

procedure TMainForm.OpenStateClick(Sender: TObject);
var
a : array[0..80] of char;
begin
OpenDialog.Title := 'Load State Controller';
OpenDialog.Filter := 'State Controller (*.STA)|*.sta';
if OpenDialog.Execute then begin
StrPCopy( a, OpenDialog.Filename );
if not ReadStatePar( @a[0] ) then
MessageDlg( 'Error reading file: '+ OpenDialog.Filename, mtError, [mbCancel],0);
end;
end;

procedure TMainForm.SaveStateClick(Sender: TObject);
begin
if not WriteStatePar( nil ) then
MessageDlg( 'Error writing file.', mtError, [mbCancel],0);
end;

procedure TMainForm.SaveStateasClick(Sender: TObject);
var
a : array[0..80] of char;
begin
SaveDialog.Title := 'Save State Controller';
SaveDialog.Filter := 'State Controller (*.STA)|*.sta';
if SaveDialog.Execute then begin
StrPCopy( a, SaveDialog.Filename );
if not WriteStatePar( @a[0] ) then
MessageDlg( 'Error writing file: '+ SaveDialog.Filename, mtError, [mbCancel],0);
end;
end;

procedure TMainForm.OpenFuzzyClick(Sender: TObject);
begin
OpenDialog.Title := 'Load Fuzzy Controller';
OpenDialog.Filter := 'Fuzzy Controller (*.FBW)|*.fbw';
if OpenDialog.Execute then begin
StrPCopy( param.name, OpenDialog.Filename );
SetParameter( sizeof(param), @param );
if not ReadFuzzy then
MessageDlg( 'Error reading file: '+ OpenDialog.Filename, mtError, [mbCancel],0);
end;
end;

procedure TMainForm.SaveFuzzyasClick(Sender: TObject);
var
fname : string;
begin
SaveDialog.Title := 'Save Fuzzy Controller as ...';
SaveDialog.Filter := 'Fuzzy Controller (*.FBW)|*.fbw';
if SaveDialog.Execute then begin
try
if FuzzyParameterDlg.FuzNames.count<>4 then begin
GetParameter( sizeof(param), @param );
fname := strpas( param.name );
FuzzyParameterDlg.FuzNames.LoadFromFile( fname );
end;

if FuzzyParameterDlg.FuzNames.count<>4 then
raise Exception.create('Invalid Fuzzy File Format');

FuzzyParameterDlg.FuzNames.SaveToFile( SaveDialog.Filename );
StrPCopy( param.name, SaveDialog.Filename );
SetParameter( sizeof(param), @param );
except
end;
end;
end;

procedure TMainForm.LoadPlotData1Click(Sender: TObject);
var
buffer : array[0..200] of char;
begin
OpenDialog.Title := 'Load Plot Data';
OpenDialog.Filter := 'Measured Data (*.PLD)|*.pld';
if OpenDialog.Execute then begin
StrPCopy( buffer, OpenDialog.Filename );
FileStatus := ReadPlot( buffer );
if FileStatus<>0 then
MessageDlg( 'Error reading file: '+ OpenDialog.Filename, mtError, [mbCancel],0);
end;
end;

procedure TMainForm.SavePlot1Click(Sender: TObject);
var
buffer : array[0..200] of char;
begin
SaveDialog.Title := 'Save Plot Data';
SaveDialog.Filter := 'Measured Data (*.PLD)|*.pld';
if SaveDialog.Execute then begin
StrPCopy( buffer, SaveDialog.Filename );
if WritePlot( buffer )<>0 then
MessageDlg( 'Error writing file: '+ SaveDialog.Filename, mtError, [mbCancel],0);
end;
end;

procedure TMainForm.Print1Click(Sender: TObject);
begin
PrintPlotDlg.ShowModal;
end;

procedure TMainForm.PrintSetup1Click(Sender: TObject);
begin
PrinterSetupDialog.Execute;
end;

procedure TMainForm.ExitItemClick(Sender: TObject);
begin
Close;
end;

procedure TMainForm.IOInterface1Click(Sender: TObject);
begin
DAC98.Enabled := FileExists('DAC98.DRV');
DIC24.Enabled := FileExists('DIC24.DRV');
Setup1.Enabled := DAC98.Checked or DIC24.Checked;
end;

procedure TMainForm.DAC98Click(Sender: TObject);
var
settings : TInifile;
cardStr : string;
begin
settings := TInifile.Create( ExePath+'BW500W16.INI');
settings.WriteString( 'BW500', 'DRIVER', 'DAC98.DRV' );
{$IFDEF WIN32}
cardStr := IntToStr( cardNo );
settings.WriteString( 'BW500', 'CARD', cardStr )
{ only WIN32 !!!}
{$ENDIF}
settings.Free;

HardTimer:=StopTimer;
if HardTimer = TERR_RUNNING then HardTimer := TERR_OK;
if TERR_OK<>HardTimer then
MessageDlg( 'Stop Timer failed. code:'+inttostr(HardTimer), mtError, [mbCancel], 0 );
{$IFDEF WIN32}
HardTimer:= SelectDriver('DAC98.DRV', cardNo );
{$ELSE}
HardTimer:= SelectDriver('DAC98.DRV');
{$ENDIF}
if TERR_OK<>HardTimer then
MessageDlg( 'Select Driver failed. code:'+inttostr(HardTimer), mtError, [mbCancel], 0 );
DAC98.Checked := True;
DIC24.Checked := False;
HardTimer := TERR_FAIL;
DACSetupClick(Self);
end;

procedure TMainForm.DIC24Click(Sender: TObject);
var
settings : TInifile;
cardStr : string;
begin
settings := TInifile.Create( ExePath+'BW500W16.INI');
settings.WriteString( 'BW500', 'DRIVER', 'DIC24.DRV' );
{$IFDEF WIN32}
cardStr := IntToStr( cardNo );
settings.WriteString( 'BW500', 'CARD', cardStr )
{ only WIN32 !!!}
{$ENDIF}
settings.Free;

HardTimer:=StopTimer;
if HardTimer = TERR_RUNNING then HardTimer := TERR_OK;
if TERR_OK<>HardTimer then
MessageDlg( 'StopTimer failed.', mtError, [mbCancel], 0 );
{$IFDEF WIN32}
HardTimer:= SelectDriver('DIC24.DRV', cardNo );
{$ELSE}
HardTimer:= SelectDriver('DIC24.DRV');
{$ENDIF}
if TERR_OK<>HardTimer then
MessageDlg( 'Select Driver failed.', mtError, [mbCancel], 0 );
DAC98.Checked := False;
DIC24.Checked := True;
HardTimer := TERR_FAIL;
DACSetupClick(Self);
end;


procedure TMainForm.DACSetupClick(Sender: TObject);
begin
HardTimer:=StopTimer;
if HardTimer = TERR_RUNNING then HardTimer := TERR_OK;
if TERR_OK<>HardTimer then
MessageDlg( 'Stop Timer failed. code:'+inttostr(HardTimer), mtError, [mbCancel], 0 );
{$IFDEF WIN32}
HardTimer:= SetupDriver( @cardNo );
{$ELSE}
HardTimer:= SetupDriver;
{$ENDIF}
if TERR_OK<>HardTimer then
MessageDlg( 'Setup Driver failed. code:'+inttostr(HardTimer), mtError, [mbCancel], 0 )
else
CalibrateSensors1Click(Self);
end;

procedure TMainForm.StateControllerSetupClick(Sender: TObject);
begin
StateParameterDlg.ShowModal;
end;

procedure TMainForm.FuzzyControllerSetupClick(Sender: TObject);
begin
FuzzyParameterDlg.ShowModal;
end;

procedure TMainForm.Edit1Click(Sender: TObject);
begin
FuzzyControllerSetup.Enabled := WithFuzzy;
end;

procedure TMainForm.Run1Click(Sender: TObject);
begin
if param.controller = NONE then begin
GetParameter( sizeof(param), @param );
if 0<> param.stateError then
StateController1.Enabled := False
else
StateController1.Enabled := True;
if 0<> param.fuzzyError then
FuzzyController2.Enabled := False
else
FuzzyController2.Enabled := True;
StopController1.Enabled := FALSE;
SetpointGenerator1.Enabled := FALSE;
end else begin
StopController1.Enabled := TRUE;
SetpointGenerator1.Enabled := TRUE;
end;
if not Calibrated then begin
StateController1.Enabled := FALSE;
FuzzyController2.Enabled := FALSE;
end;
end;

procedure TMainForm.StateController1Click(Sender: TObject);
begin
if mrOk=StartStateDlg.ShowModal then begin;
FuzzyController2.Checked := FALSE;
StateController1.Checked := TRUE;
param.controller := STATECONTROLLER;
SetParameter( sizeof(param), @param );
end;
end;

procedure TMainForm.FuzzyController2Click(Sender: TObject);
begin
if mrOk=StartFuzzDlg.ShowModal then begin;
FuzzyController2.Checked := TRUE;
StateController1.Checked := FALSE;
param.controller := FUZZYCONTROLLER;
SetParameter( sizeof(param), @param );
end;
end;

procedure TMainForm.StopController1Click(Sender: TObject);
begin
FuzzyController2.Checked := FALSE;
StateController1.Checked := FALSE;
param.controller := NONE;
SetParameter( sizeof(param), @param );
end;

procedure TMainForm.CalibrateSensors1Click(Sender: TObject);
begin
StopController1Click(Self);
if mrOK=CalibrateDlg.ShowModal then begin
Calibrated := True;
CalibrateSensors1.Checked := True;
HardTimer:=StartTimer( SAMPLETIME );
if HardTimer = TERR_RUNNING then HardTimer := TERR_OK;
if TERR_OK<>HardTimer then
MessageDlg( 'StartTimer failed.', mtError, [mbCancel], 0 );
end;
end;

procedure TMainForm.StartMeasuring1Click(Sender: TObject);
begin
MeasureDlg.ShowModal;
end;

procedure TMainForm.SetpointGenerator1Click(Sender: TObject);
begin
GeneratorDlg.ShowModal;
end;

procedure TMainForm.View1Click(Sender: TObject);
begin
PlotMeasuredData1.Enabled := MeasureStatus<>0;
PlotFileData1.Enabled := FileStatus=0;
ParameterfromPLDFile1.Enabled := FileStatus=0;
Fuzzy3D1.Enabled := WithFuzzy;
end;

procedure TMainForm.PlotMeasuredData1Click(Sender: TObject);
begin
PlotDlg.command := 1;
PlotDlg.ShowModal;
end;

procedure TMainForm.PlotFileData1Click(Sender: TObject);
begin
PlotDlg.command := 2;
PlotDlg.ShowModal;
end;

procedure TMainForm.ParameterfromPLDFile1Click(Sender: TObject);
begin
PLDInfoDlg.ShowModal;
end;

procedure TMainForm.Fuzzy3D1Click(Sender: TObject);
begin
Show3DFuzDlg.ShowModal;
end;

procedure TMainForm.Timing1Click(Sender: TObject);
begin
TimingForm.Visible := not TimingForm.Visible;
Timing1.Checked := TimingForm.Visible;
end;

procedure TMainForm.Contents1Click(Sender: TObject);
begin
Application.HelpCommand(HELP_CONTENTS, 0);
end;

procedure TMainForm.SearchforHelpon1Click(Sender: TObject);
const
EmptyString: PChar = '';
begin
Application.HelpCommand(HELP_PARTIALKEY, Longint(EmptyString));
end;

procedure TMainForm.HowtoUseHelp1Click(Sender: TObject);
begin
Application.HelpCommand(HELP_HELPONHELP, 0);
end;

procedure TMainForm.About1Click(Sender: TObject);
begin
AboutBox.ShowModal;
end;

procedure TMainForm.ShowHint(Sender: TObject);
begin
StatusBar.Caption := Application.Hint;
end;



procedure TMainForm.Timer1Timer(Sender: TObject);
var
d : double;
i,dx,dy : Integer;
s : string;
begin
{ 200ms timer }
GetData( sizeof(data), @data );

if (data.state and $0001)<>0 then begin
StopController1Click(Self);
HardTimer := TERR_FAIL;
HardTimer:=StartTimer( SAMPLETIME );
if HardTimer = TERR_RUNNING then HardTimer := TERR_OK;
if TERR_OK<>HardTimer then
MessageDlg( 'StartTimer failed.', mtError, [mbCancel], 0 );
{MessageDlg( 'Timer restarted...', mtInformation, [mbCancel], 0 );}
end;

{TextLabel.Caption := '';}
{ check system data for valid range }
if data.pos>0.4 then data.pos:=0.4;
if data.pos<-0.4 then data.pos:=-0.4;
if data.angle>0.2 then data.angle:=0.2;
if data.angle<-0.2 then data.angle:=-0.2;

if param.controller=STATECONTROLLER then ControllerLabel.Caption := 'State controller'
else if param.controller=FUZZYCONTROLLER then ControllerLabel.Caption := 'Fuzzy controller'
else if param.controller=CALIBRATION then ControllerLabel.Caption := 'Sensor calibration'
else ControllerLabel.Caption := 'No controller';

s := '';
if param.controller=STATECONTROLLER then begin
case (param.stateobserver mod 4) of
0: s := 'Observer disturbance comp. ';
1: s := 'Const. disturbance comp. ';
2: s := 'No disturbance comp. ';
end;
case (param.stateobserver shr 2) of
0: s := s + ', state observer';
1: s := s + ', difference quotient';
end;
end else if param.controller=FUZZYCONTROLLER then begin
s := 'Fuzzy Disturbance Compensation: ';
if (param.fuzzyobserver and 1) <> 0 then
s := s + 'ball friction ';
if (param.fuzzyobserver and 2) <> 0 then
s := s + 'beam friction ';
if param.fuzzyobserver=0 then
s := s + 'none ';
end;
ParamLabel.caption := s;

setpointLabel.caption := FloatToStr2(data.setpoint);
posLabel.caption := FloatToStr2(data.pos);
angLabel.caption := FloatToStr2(data.angle);
outLabel.caption := FloatToStr2(data.out);

{ measurement }
i := MeasureStatus;
if i<>4 then begin
measGauge.Visible := False;
end else begin
measGauge.Visible := True;
end;

case i of
0: MeasLabel.Caption :='Not active';
1: MeasLabel.Caption :='Waiting for prestore';
2,3: MeasLabel.Caption :='Waiting for trigger';
4: begin
MeasLabel.Caption :='Measuring';
measGauge.Progress := round(MeasureLevel);
end;
5: MeasLabel.Caption :='Buffer filled';
6: MeasLabel.Caption :='Measuring stopped';
end;

{ TimingForm update }
if TimingForm.Visible then TimingForm.UpdateData;

{ Grafic update }
with pict.Canvas do begin
Brush.Color := GroupBox1.Color;
FillRect( Rect(0,0,pict.Width,pict.Height) );

dy := round( 90 * sin(-data.angle) );
dx := round( 90 * cos(-data.angle) );
Pen.Color := clBlack;
Pen.Width := 3;
MoveTo( 100-dx, 45-dy );
LineTo( 100+dx, 45+dy );
Pen.Width := 1;

dy := round( (90 / 0.4) * -1 * data.pos * sin(-data.angle) );
dx := round( (90 / 0.4) * -1 * data.pos * cos(-data.angle) );
Brush.Color := clRed;
Ellipse( 95+dx, 35+dy, 105+dx, 45+dy );

Brush.Color := clGreen;
Polygon([Point(90,75),Point(100,45),Point(110,75)]);
end;
PaintBox1.Canvas.Draw( 0,0,pict );


end;

procedure TMainForm.PaintBox1Click(Sender: TObject);
begin
if param.controller <> NONE then
SetpointGenerator1Click(Self);
end;

procedure TMainForm.MeasLabelClick(Sender: TObject);
begin
if param.controller <> NONE then
StartMeasuring1Click(Self);
end;

end.

我是新手,没有价值分了,请大家帮帮忙。
 
看这个也太累了吧,干脆你把整个 Project 拿出来大家调试算了。
 
同意,建议你能把这个pas的功能说明一下,代码太长了
 
我也没弄懂啊,[:(],我也没有整个工程
 
接受答案了.
 
后退
顶部