?? unitcommset.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}; //"端口設(shè)置"
__property AnsiString MsgPort = { read = fGetMsg, index = 3}; //"端口"
__property AnsiString MsgBaud = { read = fGetMsg, index = 4}; //"波特率"
__property AnsiString MsgCheck = { read = fGetMsg, index = 5}; //"校驗(yàn)"
__property AnsiString MsgBits = { read = fGetMsg, index = 6}; //"數(shù)據(jù)位"
__property AnsiString MsgStops = { read = fGetMsg, index = 7}; //"停止位"
__property AnsiString MsgFlow = { read = fGetMsg, index = 8}; //"數(shù)據(jù)流控"
__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 (標(biāo)記)"
__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}; //"必須選擇數(shù)據(jù)位"
__property AnsiString ErrSelCheck = { read = fGetMsg, index = 21}; //"必須選擇奇偶校驗(yàn)"
__property AnsiString ErrSelStops = { read = fGetMsg, index = 22}; //"必須選擇停止位"
__property AnsiString ErrSelFlow = { read = fGetMsg, index = 23}; //"必須選擇數(shù)據(jù)流控制"
__property AnsiString MsgAbout = { read = fGetMsg, index = 24}; //"關(guān)于"
__property AnsiString MsgDefault = { read = fGetMsg, index = 25}; //"默認(rèn)"
__property AnsiString StrGbxBase = { read = fGetMsg, index = 26}; //"端口選項(xiàng)"
__property AnsiString StrGbxModem = { read = fGetMsg, index = 27}; //"調(diào)制解調(diào)器選項(xiàng)"
__property AnsiString StrGbxBuffer= { read = fGetMsg, index = 28}; //"緩存容量"
__property AnsiString MsgAAns = { read = fGetMsg, index = 29}; //"自動(dòng)應(yīng)答"
__property AnsiString MsgInBuf = { read = fGetMsg, index = 30}; //"輸入緩存"
__property AnsiString MsgOutBuf = { read = fGetMsg, index = 31}; //"輸出緩存"
__property AnsiString ErrInvAAns = { read = fGetMsg, index = 32}; //"自動(dòng)應(yīng)答必須是 0 - 255 的整數(shù)"
__property AnsiString ErrInvInBuf = { read = fGetMsg, index = 33}; //"輸入緩存容量錯(cuò)誤"
__property AnsiString ErrInvOutBuf= { read = fGetMsg, index = 34}; //"輸出緩存容量錯(cuò)誤"
__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
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -