//--------------------------------------------------------------------------- #ifndef Unit1H #define Unit1H //--------------------------------------------------------------------------- #include #include #include #include #include #include //--------------------------------------------------------------------------- class TForm1 : public TForm { __published: // IDE-managed Components TGroupBox *GroupBox1; TEdit *eHostIP; TButton *btnSetIP; TButton *btnExit; TButton *btnConnect; TClientSocket *cs7188E; TGroupBox *GroupBox2; TLabel *Label2; TLabel *Label3; TEdit *eVer; TEdit *eServerName; TTimer *tm7188E; TLabel *Label1; TGroupBox *gbConfig; TLabel *Label4; TLabel *Label5; TEdit *eGateway; TEdit *eMask; TButton *btnSetGateway; TButton *btnSetMask; TGroupBox *gbEcho; TLabel *Label7; TEdit *eEchoSend; TEdit *eEchoRece; TButton *btnEchoSend; TGroupBox *gbData; TLabel *Label6; TEdit *eDataSend; TEdit *eDataRece; TButton *btnDataSend; TGroupBox *gbCOM1; TGroupBox *GroupBox3; TButton *btnSendCOM1; TLabel *Label12; TEdit *eReceCOM1; TEdit *eSendCOM1; TEdit *eBaud1; TLabel *Label8; TLabel *Label9; TComboBox *cbDataBits1; TComboBox *cbParityBits1; TLabel *Label10; TComboBox *cbStopBits1; TLabel *Label11; TButton *btnSetCOM1; TCheckBox *cbCR1; TCheckBox *cbLF1; TTimer *tmCOM1; TClientSocket *csCOM1; TGroupBox *gbCOM2; TLabel *Label13; TGroupBox *GroupBox5; TLabel *Label14; TLabel *Label15; TLabel *Label16; TLabel *Label17; TEdit *eBaud2; TComboBox *cbDataBits2; TComboBox *cbParityBits2; TComboBox *cbStopBits2; TButton *btnSetCOM2; TButton *btnSendCOM2; TEdit *eReceCOM2; TEdit *eSendCOM2; TCheckBox *cbCR2; TCheckBox *cbLF2; TTimer *tmCOM2; TClientSocket *csCOM2; TTimer *tmInitialize; TCheckBox *CheckBox1; TCheckBox *CheckBox2; void __fastcall btnConnectClick(TObject *Sender); void __fastcall btnExitClick(TObject *Sender); void __fastcall cs7188EConnect(TObject *Sender, TCustomWinSocket *Socket); void __fastcall cs7188EDisconnect(TObject *Sender, TCustomWinSocket *Socket); void __fastcall tm7188ETimer(TObject *Sender); void __fastcall cs7188ERead(TObject *Sender, TCustomWinSocket *Socket); void __fastcall btnEchoSendClick(TObject *Sender); void __fastcall btnDataSendClick(TObject *Sender); void __fastcall FormCreate(TObject *Sender); void __fastcall btnSetIPClick(TObject *Sender); void __fastcall btnSetGatewayClick(TObject *Sender); void __fastcall btnSetMaskClick(TObject *Sender); void __fastcall tmCOM1Timer(TObject *Sender); void __fastcall btnSetCOM1Click(TObject *Sender); void __fastcall btnSendCOM1Click(TObject *Sender); void __fastcall csCOM1Connect(TObject *Sender, TCustomWinSocket *Socket); void __fastcall csCOM1Disconnect(TObject *Sender, TCustomWinSocket *Socket); void __fastcall csCOM1Read(TObject *Sender, TCustomWinSocket *Socket); void __fastcall tmInitializeTimer(TObject *Sender); void __fastcall cs7188EError(TObject *Sender, TCustomWinSocket *Socket, TErrorEvent ErrorEvent, int &ErrorCode); void __fastcall csCOM1Error(TObject *Sender, TCustomWinSocket *Socket, TErrorEvent ErrorEvent, int &ErrorCode); void __fastcall csCOM2Error(TObject *Sender, TCustomWinSocket *Socket, TErrorEvent ErrorEvent, int &ErrorCode); void __fastcall CheckBox1Click(TObject *Sender); private: // User declarations void __fastcall GetServerInformation(void); void __fastcall SetCOMString(AnsiString sData, int index); public: // User declarations __fastcall TForm1(TComponent* Owner); }; //--------------------------------------------------------------------------- extern PACKAGE TForm1 *Form1; //--------------------------------------------------------------------------- #endif