//---------------------------------------------------------------------------

#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <EasyPODDLL.H>
#include <Forms.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:	// IDE-managed Components
        TLabel *Label1;
        TLabel *Label2;
        TMemo *mmoWriteBuffer;
        TMemo *mmoReadBuffer;
        TGroupBox *GroupBox1;
        TEdit *edtStatus;
        TRadioButton *rdoString;
        TRadioButton *rdoHex;
        TButton *btnWriteBytes;
        TButton *btnReadBytes;
        TGroupBox *GroupBox2;
        TComboBox *cboDevice;
        TGroupBox *GroupBox3;
        TEdit *edtVID;
        TEdit *edtPID;
        TEdit *edtIndex;
        TLabel *lblVID;
        TLabel *lblPID;
        TLabel *lblIndex;
        TButton *btnConnect;
        TButton *btnDisconnect;
        TButton *btnExit;
        TGroupBox *GroupBox4;
        TComboBox *cboCOMPort;
        TComboBox *cboBaudRate;
        void __fastcall FormCreate(TObject *Sender);
        void __fastcall btnConnectClick(TObject *Sender);
        void __fastcall btnDisconnectClick(TObject *Sender);
        void __fastcall btnExitClick(TObject *Sender);
        void __fastcall btnReadBytesClick(TObject *Sender);
        void __fastcall btnWriteBytesClick(TObject *Sender);
        void __fastcall mmoWriteBufferKeyPress(TObject *Sender, char &Key);
        void __fastcall cboDeviceClick(TObject *Sender);
        void __fastcall rdoHexClick(TObject *Sender);
        void __fastcall rdoStringClick(TObject *Sender);
private:	// User declarations
public:		// User declarations
        __fastcall TForm1(TComponent* Owner);
        void ShowRxDataString(char* pBuffer, DWORD dwSize);
        void ShowRxDataHex(char* pBuffer, DWORD dwSize);
        unsigned char HexStringToHex(char * pBuffer);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
