CAP/Test/test.cpp
2021-09-01 18:53:06 +02:00

60 lines
1.8 KiB
C++

//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "test.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "LM2000"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
Lm2000->AbrePuerto("COM1");
}
//---------------------------------------------------------------------------
bool __fastcall TForm1::Lm2000BuscaTarjeta(int ID, int FGA, int TPA,
int CDA, int *TPR, int *PNR, char *message)
{
return CheckBox1->Checked;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormDestroy(TObject *Sender)
{
Lm2000->CierraPuerto();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Lm2000->PassageOpening( 1, 1 );
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
Lm2000->PassageOpening( 1, 2 );
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button3Click(TObject *Sender)
{
Lm2000->PassageOpening( 1, 3 );
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button4Click(TObject *Sender)
{
Lm2000->PassageOpening( 1, 4 );
}
//---------------------------------------------------------------------------
bool __fastcall TForm1::Lm2000VerboseMessage(AnsiString msg)
{
return true;
}
//---------------------------------------------------------------------------