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

#ifndef audioH
#define audioH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <NMUDP.hpp>
#include <Sockets.hpp>
#include <ComCtrls.hpp>
#include <Buttons.hpp>
#include <ScktComp.hpp>
//---------------------------------------------------------------------------
typedef struct
{
TSpeedButton *binGo;
}mapButton;
class TForm1 : public TForm
{
__published:	// IDE-managed Components
	TMemo *Memo1;
	TButton *Button1;
	TButton *Button2;
	TButton *Button3;
	TNMUDP *NMUDP1;
        TNMUDP *NMUDP2;
        TTrackBar *TrackBar1;
        TLabel *Label1;
        TSpeedButton *SpeedButton1;
        TEdit *Edit1;
        TClientSocket *ClientSocket1;
        TServerSocket *ServerSocket1;
        TSpeedButton *SpeedButton2;
        TLabel *Label2;
        TSpeedButton *SpeedButton3;
        TEdit *Edit2;
        TSpeedButton *SpeedButton4;
        TNMUDP *NMUDP3;
        TNMUDP *NMUDP4;
        TButton *Button4;
        TButton *Button5;
        TButton *Button6;
        TButton *Button7;
        TButton *Button8;
        TButton *Button9;
	void __fastcall FormCreate(TObject *Sender);
	void __fastcall Button1Click(TObject *Sender);
	void __fastcall Button2Click(TObject *Sender);
	void __fastcall Button3Click(TObject *Sender);
        void __fastcall NMUDP1DataSend(TObject *Sender);
        void __fastcall NMUDP2DataReceived(TComponent *Sender,
          int NumberBytes, AnsiString FromIP, int Port);
        void __fastcall TrackBar1Change(TObject *Sender);
        void __fastcall SpeedButton1Click(TObject *Sender);
        void __fastcall ServerSocket1Accept(TObject *Sender,
          TCustomWinSocket *Socket);
        void __fastcall ClientSocket1Disconnect(TObject *Sender,
          TCustomWinSocket *Socket);
        void __fastcall ClientSocket1Connect(TObject *Sender,
          TCustomWinSocket *Socket);
        void __fastcall ServerSocket1ClientDisconnect(TObject *Sender,
          TCustomWinSocket *Socket);
        void __fastcall SpeedButton2Click(TObject *Sender);
        void __fastcall Edit1KeyPress(TObject *Sender, char &Key);
        void __fastcall ClientSocket1Error(TObject *Sender,
          TCustomWinSocket *Socket, TErrorEvent ErrorEvent,
          int &ErrorCode);
        void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
        void __fastcall SpeedButton3Click(TObject *Sender);
        void __fastcall ServerSocket1ClientWrite(TObject *Sender,
          TCustomWinSocket *Socket);
        void __fastcall ClientSocket1Read(TObject *Sender,
          TCustomWinSocket *Socket);
        void __fastcall Edit2Change(TObject *Sender);
        void __fastcall Edit2KeyPress(TObject *Sender, char &Key);
        void __fastcall SpeedButton4Click(TObject *Sender);
        void __fastcall Button4Click(TObject *Sender);
        void __fastcall NMUDP4DataReceived(TComponent *Sender,
          int NumberBytes, AnsiString FromIP, int Port);
        void __fastcall Button5Click(TObject *Sender);
        void __fastcall Button6Click(TObject *Sender);
        void __fastcall Button7Click(TObject *Sender);
        void __fastcall Button8Click(TObject *Sender);
        void __fastcall Button9Click(TObject *Sender);
private:	// User declarations
public:		// User declarations
	__fastcall TForm1(TComponent* Owner);
        int useSer;
        mapButton map[26];
        int counter;
        int num;
        int max;
        int cnum;
        bool listen;
        bool onconnectflag;
protected: // User declarations
	void __fastcall ApplicationOnMessage(tagMSG &Msg, bool &Handled);
};

//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
