?? unit1.h
字號:
//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <sysutils.HPP>
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ComCtrls.hpp>
#include <ExtCtrls.hpp>
#include <ImgList.hpp>
#include <TabNotBk.hpp>
#include <Buttons.hpp>
#include <Dialogs.hpp>
#include <Graphics.hpp>
#include "COMM.h"
#include <Grids.hpp>
#include "CSPIN.h"
//---------------------------------------------------------------------------
class TFormPort : public TForm
{
__published: // IDE-managed Components
TComm *CommUart;
TTimer *TimerSend;
TTabbedNotebook *TabbedNotebookPORT;
TGroupBox *GroupBoxSet;
TLabel *LabelPort;
TLabel *LabelBaud;
TLabel *LabelDataBit;
TLabel *LabelParity;
TCheckBox *CheckBoxUserBaud;
TEdit *EditBaud;
TLabel *LabelStopBits;
TComboBox *ComboBoxPort;
TComboBox *ComboBoxBaudrate;
TComboBox *ComboBoxDataBits;
TComboBox *ComboBoxStopBits;
TComboBox *ComboBoxParity;
TBitBtn *BitBtnOpen;
TImage *ImagePortState;
TGroupBox *GroupBoxReceive;
TButton *ButtonDisplay;
TButton *ButtonClear;
TButton *ButtonSave;
TSaveDialog *SaveDialogReceive;
TCheckBox *CheckBoxHexReceive;
TGroupBox *GroupBoxFunction;
TCheckBox *CheckBoxDTR;
TCheckBox *CheckBoxRTS;
TCheckBox *CheckBoxSetBreak;
TComboBox *ComboBoxDTRControl;
TComboBox *ComboBoxRTSControl;
TButton *ButtonSet;
TGroupBox *GroupBoxOut;
TGroupBox *GroupBoxSendData;
TLabel *LabelSendData;
TEdit *EditSendData;
TGroupBox *GroupBoxSendFiles;
TOpenDialog *OpenDialogSendFile;
TCheckBox *CheckBoxHexSend;
TCheckBox *CheckBoxReturnSend;
TButton *ButtonSendData;
TButton *ButtonAutoSend;
TEdit *EditFile;
TLabel *LabelFile;
TLabel *LabelProtocol;
TComboBox *ComboBoxProtocol;
TButton *ButtonSendFile;
TButton *ButtonReceiveFile;
TButton *ButtonStop;
TGroupBox *GroupBoxFormSet;
TCheckBox *CheckBoxGlass;
TImage *ImageButton1;
TImage *ImageButton3;
TImage *ImageButton2;
TTimer *TimerBlink;
TTrackBar *TrackBarAlpha;
TEdit *EditAutoSendTime;
TLabel *LabelTx;
TShape *ShapeCD;
TShape *ShapeRI;
TStaticText *StaticText1;
TStaticText *StaticText2;
TRichEdit *RichEditReceive;
TRichEdit *RichEditListenReceive;
TRichEdit *RichEditListenSend;
TGroupBox *GroupBoxTransfer;
TGroupBox *GroupBoxListen;
TLabel *Label1;
TLabel *Label2;
TCheckBox *CheckBoxTop;
TGroupBox *GroupBoxDriver;
TBitBtn *BitBtnInstallDriver;
TBitBtn *BitBtnTestDriver;
TShape *ShapeLCD;
TShape *ShapeLCTS;
TShape *Shape3;
TShape *Shape4;
TShape *Shape5;
TShape *Shape6;
TShape *Shape7;
TShape *Shape8;
TShape *Shape9;
TGroupBox *GroupBoxStatus;
TGroupBox *GroupBoxRealSend;
TComboBox *ComboBoxSend;
TShape *shpCTS;
TShape *shpDSR;
TLabel *LabelCTS;
TLabel *Label3;
TGroupBox *GroupBoxState;
TLabel *Label4;
TLabel *Label5;
TLabel *Label6;
TLabel *Label7;
TLabel *Label8;
TLabel *Label9;
TLabel *Label10;
TLabel *Label11;
TLabel *Label12;
void __fastcall ComboBoxBaudrateChange(TObject *Sender);
void __fastcall CheckBoxUserBaudClick(TObject *Sender);
void __fastcall BitBtnOpenClick(TObject *Sender);
void __fastcall ButtonClearClick(TObject *Sender);
void __fastcall EditBaudKeyPress(TObject *Sender, char &Key);
void __fastcall EditSendDataKeyPress(TObject *Sender, char &Key);
void __fastcall TimerBlinkTimer(TObject *Sender);
void __fastcall FormCreate(TObject *Sender);
void __fastcall ComboBoxPortChange(TObject *Sender);
//void __fastcall CheckBoxHexSendClick(TObject *Sender);
void __fastcall ButtonAutoSendClick(TObject *Sender);
void __fastcall ButtonSaveClick(TObject *Sender);
void __fastcall ButtonSendFileClick(TObject *Sender);
void __fastcall ButtonReceiveFileClick(TObject *Sender);
void __fastcall ButtonStopClick(TObject *Sender);
void __fastcall ComboBoxDataBitsChange(TObject *Sender);
void __fastcall ComboBoxStopBitsChange(TObject *Sender);
void __fastcall ComboBoxParityChange(TObject *Sender);
void __fastcall ButtonSendDataClick(TObject *Sender);
void __fastcall CommUartComStatEvent(TObject *Sender, DWORD Status,
COMSTAT ComStat);
void __fastcall TimerSendTimer(TObject *Sender);
void __fastcall EditAutoSendTimeClick(TObject *Sender);
void __fastcall EditAutoSendTimeKeyPress(TObject *Sender,
char &Key);
void __fastcall ButtonDisplayClick(TObject *Sender);
void __fastcall ButtonSetClick(TObject *Sender);
void __fastcall CheckBoxReturnSendClick(TObject *Sender);
void __fastcall CheckBoxTopClick(TObject *Sender);
void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
void __fastcall CheckBoxGlassClick(TObject *Sender);
void __fastcall TrackBarAlphaChange(TObject *Sender);
void __fastcall CheckBoxDTRClick(TObject *Sender);
void __fastcall CheckBoxRTSClick(TObject *Sender);
void __fastcall ComboBoxRTSControlChange(TObject *Sender);
void __fastcall EditSendDataDblClick(TObject *Sender);
void __fastcall CommUartRing(TObject *Sender);
void __fastcall ComboBoxDTRControlChange(TObject *Sender);
void __fastcall CommUartCts(TObject *Sender);
void __fastcall CommUartDsr(TObject *Sender);
private:
// User declarations
public: // User declarations
void __fastcall CreateParams(TCreateParams &Params);
//__fastcall FormTrans(TComponent* Owner):TForm(Owner);
__fastcall TFormPort(TComponent* Owner);
protected:
AnsiString Buffer;
AnsiString HexBuffer;
int BlinkTime;
};
//---------------------------------------------------------------------------
extern PACKAGE TFormPort *FormPort;
//---------------------------------------------------------------------------
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -