//--------------------------------------------------------------------------- #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 *gbData; TLabel *Label6; TEdit *eDataSend; TEdit *eDataRece; TButton *btnDataSend; TGroupBox *gbCOM1; TGroupBox *GroupBox3; TEdit *eBaud1; TLabel *Label8; TLabel *Label9; TComboBox *cbDataBits1; TComboBox *cbParityBits1; TLabel *Label10; TComboBox *cbStopBits1; TLabel *Label11; TButton *btnSetCOM1; TGroupBox *gbCOM2; TGroupBox *GroupBox5; TLabel *Label14; TLabel *Label15; TLabel *Label16; TLabel *Label17; TEdit *eBaud2; TComboBox *cbDataBits2; TComboBox *cbParityBits2; TComboBox *cbStopBits2; TButton *btnSetCOM2; TTimer *tmInitialize; 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 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 btnSetCOM1Click(TObject *Sender); void __fastcall tmInitializeTimer(TObject *Sender); void __fastcall cs7188EError(TObject *Sender, TCustomWinSocket *Socket, TErrorEvent ErrorEvent, int &ErrorCode); 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