//---------------------------------------------------------------------------
#ifndef ReadIndH
#define ReadIndH
//---------------------------------------------------------------------------
#include <vcl\Classes.hpp>
#include <vcl\Controls.hpp>
#include <vcl\StdCtrls.hpp>
#include <vcl\Forms.hpp>
#include <vcl\ExtCtrls.hpp>
#include <vcl\Buttons.hpp>
#include <vcl\Mask.hpp>
#include <ComCtrls.hpp>
//---------------------------------------------------------------------------


class TFormConfBal : public TForm
{
__published:	// IDE-managed Components
    TPageControl *PageControl1;
    TTabSheet *TabSheet1;
    TTabSheet *TabSheet2;
    TTabSheet *TabSheet3;
    TGroupBox *GBConexao;
    TComboBox *CBConexao;
    TRadioGroup *RGBaudRate;
    TRadioGroup *RGStopBit;
    TLabel *LabelLiquido;
    TLabel *Label1;
    TLabel *Label2;
    TLabel *LabelStatus;
    TShape *ShapeStable;
    TShape *ShapeMotion;
    TLabel *Label3;
    TShape *ShapeOvercap;
    TLabel *Label4;
    TShape *ShapeError;
    TLabel *Label5;
    TTimer *TimerConfBal;
    TTimer *TimerReabilita;
    TLabel *LPeso;
    TLabel *LUnitario;
    TLabel *LTotal;
    TLabel *LCodigo;
    TLabel *Label6;
    TMaskEdit *MEPreco;
    TLabel *Label7;
    TButton *btnEnviar;
    TRadioGroup *RGDataBits;
    TRadioGroup *RGParity;
    TButton *btnPorta;
    TLabel *LStatus;
	void __fastcall TimerConfBalTimer(TObject *Sender);
	bool __fastcall CheckParametersComm(void);
	void __fastcall RGBaudRateClick(TObject *Sender);
	void __fastcall RGParityClick(TObject *Sender);
	void __fastcall RGStopBitClick(TObject *Sender);
	void __fastcall RGDataBitsClick(TObject *Sender);
	void __fastcall ClearFields(void);
	void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
	void __fastcall ClearAllFields(void);
	bool __fastcall InicializaBalanca(void);
	void __fastcall TimerReabilitaTimer(TObject *Sender);
    void __fastcall btnEnviarClick(TObject *Sender);
    void __fastcall TabSheet2Exit(TObject *Sender);
    void __fastcall btnPortaClick(TObject *Sender);
    void __fastcall TabSheet2Show(TObject *Sender);
private:	// User declarations
	int		status;
	char	peso[7],vunit[7],vtotal[7],codigo[5];
    HANDLE	hScale;
public:		// User declarations
	__fastcall TFormConfBal(TComponent* Owner);


};
//---------------------------------------------------------------------------
extern TFormConfBal *FormConfBal;
//---------------------------------------------------------------------------
#endif
