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

#ifndef UWatchMainH
#define UWatchMainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <IdBaseComponent.hpp>
#include <IdComponent.hpp>
#include <IdTCPServer.hpp>
#include <stdio.h>
#include <ExtCtrls.hpp>
#include <DB.hpp>
#include <DBTables.hpp>
#include "UWatchMain.h"
#include <IdIcmpClient.hpp>
#include <IdRawBase.hpp>
#include <IdRawClient.hpp>
#define MAX_MACHINE 64
//---------------------------------------------------------------------------
class TMainForm : public TForm
{
__published:	// IDE-managed Components
        TIdTCPServer *IdTCPServer1;
        TDatabase *Database1;
        TListBox *ListBox1;
        void __fastcall IdTCPServer1Execute(TIdPeerThread *AThread);
        void __fastcall FormCreate(TObject *Sender);

private:	// User declarations
public:		// User declarations
        __fastcall TMainForm(TComponent* Owner);

        void __fastcall LogWrite(AnsiString Check);
    char* __fastcall analPacket(AnsiString recvTelNum);
};
struct Msg {
    char Check[3] ;
    char SMsg[80] ;
} ;

struct TThreadCk {
    TThread *ThreadHandle  ;
    AnsiString MachineNum ;
    AnsiString SMessage ;
    char* SICountUse ;
    char* SUse ;
    int iCount;
} ;
//---------------------------------------------------------------------------
extern PACKAGE TMainForm *MainForm;
extern TThreadCk ThreadCk[MAX_MACHINE]  ;

extern TListBox *ListBox1;
extern TMainForm *MainForm;

//---------------------------------------------------------------------------
#endif


