⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unitcommset.h

📁 C++BUILDER 6.0 delphi 7 串口控件 由www.cppfans.com網站所提供 內涵說明 非常好用
💻 H
字号:
//---------------------------------------------------------------------------

#ifndef UnitCommSetH
#define UnitCommSetH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Buttons.hpp>
#include "YbCommDevice.h"
//---------------------------------------------------------------------------
class TFormCommSettings : public TForm
{
__published:	// IDE-managed Components
    TGroupBox *GBoxBuffer;
    TLabel *lbInbs;
    TLabel *lbOutbs;
    TEdit *EditInBufSize;
    TEdit *EditOutBufSize;
    TBitBtn *BnDefault;
    TBitBtn *BnOK;
    TBitBtn *BnCancel;
    TGroupBox *GboxBase;
    TLabel *lbPort;
    TLabel *lbBaud;
    TLabel *lbCheck;
    TLabel *lbBits;
    TLabel *lbStops;
    TComboBox *CbStopBits;
    TComboBox *CbSelBaud;
    TComboBox *CbParity;
    TComboBox *CbByteSize;
    TComboBox *CbPort;
    TGroupBox *GBoxModem;
    TLabel *lbFlow;
    TLabel *lbAAns;
    TComboBox *CbFlow;
    TEdit *EditAutoAns;
    void __fastcall BnDefaultClick(TObject *Sender);
    void __fastcall BnOKClick(TObject *Sender);
    void __fastcall BnCancelClick(TObject *Sender);
public:		// User declarations
    class TMsgStrings
     {
       public:
         __property AnsiString MsgOK       = { read = fGetMsg, index =  0}; //"确定"
         __property AnsiString MsgCancel   = { read = fGetMsg, index =  1}; //"取消"
         __property AnsiString MsgPortSet  = { read = fGetMsg, index =  2}; //"端口设置"
         __property AnsiString MsgPort     = { read = fGetMsg, index =  3}; //"端口"
         __property AnsiString MsgBaud     = { read = fGetMsg, index =  4}; //"波特率"
         __property AnsiString MsgCheck    = { read = fGetMsg, index =  5}; //"校验"
         __property AnsiString MsgBits     = { read = fGetMsg, index =  6}; //"数据位"
         __property AnsiString MsgStops    = { read = fGetMsg, index =  7}; //"停止位"
         __property AnsiString MsgFlow     = { read = fGetMsg, index =  8}; //"数据流控"
         __property AnsiString MsgNoParity = { read = fGetMsg, index =  9}; //"No parity (无)"
         __property AnsiString MsgOdd      = { read = fGetMsg, index = 10}; //"Odd (奇)"
         __property AnsiString MsgEven     = { read = fGetMsg, index = 11}; //"Even (偶)"
         __property AnsiString MsgMark     = { read = fGetMsg, index = 12}; //"Mark (标记)"
         __property AnsiString MsgNone     = { read = fGetMsg, index = 13}; //"None (无)"
         __property AnsiString MsgRtsCts   = { read = fGetMsg, index = 14}; //"RTS/CTS (硬件)"
         __property AnsiString MsgXonXoff  = { read = fGetMsg, index = 15}; //"Xon/Xoff (软件)"
         __property AnsiString MsgRtsXon   = { read = fGetMsg, index = 16}; //"RTS/CTS & Xon/Xoff (硬&软)"
         __property AnsiString ErrSelPort  = { read = fGetMsg, index = 17}; //"必须选择端口"
         __property AnsiString ErrSelBaud  = { read = fGetMsg, index = 18}; //"必须输入/选择波特率"
         __property AnsiString ErrInvBaud  = { read = fGetMsg, index = 19}; //"无效的波特率"
         __property AnsiString ErrSelBits  = { read = fGetMsg, index = 20}; //"必须选择数据位"
         __property AnsiString ErrSelCheck = { read = fGetMsg, index = 21}; //"必须选择奇偶校验"
         __property AnsiString ErrSelStops = { read = fGetMsg, index = 22}; //"必须选择停止位"
         __property AnsiString ErrSelFlow  = { read = fGetMsg, index = 23}; //"必须选择数据流控制"
         __property AnsiString MsgAbout    = { read = fGetMsg, index = 24}; //"关于"
         __property AnsiString MsgDefault  = { read = fGetMsg, index = 25}; //"默认"
         __property AnsiString StrGbxBase  = { read = fGetMsg, index = 26}; //"端口选项"
         __property AnsiString StrGbxModem = { read = fGetMsg, index = 27}; //"调制解调器选项"
         __property AnsiString StrGbxBuffer= { read = fGetMsg, index = 28}; //"缓存容量"
         __property AnsiString MsgAAns     = { read = fGetMsg, index = 29}; //"自动应答"
         __property AnsiString MsgInBuf    = { read = fGetMsg, index = 30}; //"输入缓存"
         __property AnsiString MsgOutBuf   = { read = fGetMsg, index = 31}; //"输出缓存"
         __property AnsiString ErrInvAAns  = { read = fGetMsg, index = 32}; //"自动应答必须是 0 - 255 的整数"
         __property AnsiString ErrInvInBuf = { read = fGetMsg, index = 33}; //"输入缓存容量错误"
         __property AnsiString ErrInvOutBuf= { read = fGetMsg, index = 34}; //"输出缓存容量错误"
         __property AnsiString MsgSpacePty = { read = fGetMsg, index = 35}; //"Space Parity"
         __fastcall TMsgStrings();

       private:
         char **_Msg;
         static char *_Msg_Chs[];
         static char *_Msg_Cht[];
         static char *_Msg_Enu[];
         AnsiString __fastcall fGetMsg(int);
     };
    __fastcall TFormCommSettings(TComponent *Owner, TYbCustomCommDevice *lpCommDevice, bool FActive);
private:	// User declarations
    bool __fastcall MoveCtrlFocus(void);
    TYbCustomCommDevice *_YbCommDevice;
    bool  _OldActive, _ForceActive;
    int   _OldPortNo, _OldByteSize, _OldAutoAAns;
    long  _OldInBufSize, _OldOutBufSize;
    TYbCommDevice::TBaudRate    _OldBaud;
    TYbCommDevice::TParity      _OldParity;
    TYbCommDevice::TStopBits    _OldStopBits;
    TYbCommDevice::TFlowControl _OldFlowControl;
};
//---------------------------------------------------------------------------
extern PACKAGE TFormCommSettings *FormCommSettings;
//---------------------------------------------------------------------------
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -