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

📄 untsmscontrol.h

📁 短信猫完整开发例子,里面包含全部的字节流码
💻 H
字号:
//---------------------------------------------------------------------------

#ifndef UntSMSControlH
#define UntSMSControlH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "sms.h"
#include <OleCtrls.hpp>
#include <ComCtrls.hpp>
#include <Buttons.hpp>
#include <ExtCtrls.hpp>
#include "SPComm.hpp"
#include "CSPIN.h"
#include <ActnList.hpp>
//---------------------------------------------------------------------------
class TfrmControl : public TForm
{
__published:	// IDE-managed Components
    TStatusBar *sbInfo;
    TPageControl *pcInfo;
    TTabSheet *TabSheet1;
    TListView *lvErrorInfo;
    TTabSheet *TabSheet2;
    TLabel *Label3;
    TEdit *edtPhone;
    TLabel *Label4;
    TMemo *meoContent;
    TLabel *lblCurCode;
    TButton *btnSend;
    TTabSheet *TabSheet3;
    TComboBox *cbComm;
    TLabel *Label1;
    TLabel *Label2;
    TEdit *edtSN;
    TSpeedButton *SpeedButton1;
    TLabel *Label5;
    TEdit *edtCenter;
    TSpeedButton *SpeedButton2;
    TTabSheet *TabSheet4;
    TLabel *Label7;
    TProgressBar *ProgressBar1;
    TTabSheet *TabSheet5;
    TGroupBox *GroupBox1;
    TEdit *edtAscII;
    TButton *Button1;
    TEdit *edtSource;
    TButton *Button2;
    TEdit *edtCode;
    TLabel *Label8;
    TLabel *Label9;
    TLabel *Label10;
    TGroupBox *GroupBox2;
    TLabel *Label11;
    TLabel *Label12;
    TLabel *Label13;
    TEdit *Edit2;
    TButton *Button8;
    TEdit *Edit3;
    TButton *Button9;
    TEdit *Edit4;
    TGroupBox *GroupBox3;
    TLabel *Label14;
    TLabel *Label15;
    TLabel *Label16;
    TEdit *Edit5;
    TButton *Button10;
    TEdit *Edit6;
    TButton *Button11;
    TEdit *Edit7;
    TGroupBox *GroupBox4;
    TRadioButton *rbText;
    TRadioButton *rbPdu;
    TSpeedButton *SpeedButton4;
    TGroupBox *GroupBox5;
    TSpeedButton *SpeedButton5;
    TRadioButton *rbFull;
    TRadioButton *rbReport;
    TBevel *Bevel1;
    TLabel *Label6;
    TTimer *timExecute;
    TMemo *Memo2;
    TCSpinEdit *CSpinEdit1;
    TTabSheet *TabSheet6;
    TListView *lvEvent;
    TSpeedButton *SpeedButton7;
    TSpeedButton *SpeedButton8;
    TButton *Button3;
    TActionList *ActionList1;
    TAction *ActSend;
    TAction *ActReadUnRead;
    TLabel *Label17;
    TEdit *edtNumber;
    TAction *ActGetModel;
    TAction *ActSetModel;
    TAction *ActGetReport;
    TAction *ActSetReport;
    TAction *ActGetSN;
    TAction *ActGetCenter;
    TAction *ActSetCenter;
    TAction *ActGetIntention;
    TMemo *Memo1;
    TButton *Button4;
    TAction *ActReadReRead;
    TLabel *Label18;
    TEdit *edtNumber2;
    TButton *Button5;
    TLabel *Label19;
    TEdit *Edit8;
    TAction *ActDelMessage;
    TSpeedButton *SpeedButton3;
    TLabel *Label20;
    TCSpinEdit *CSpinEdit2;
    TGroupBox *GroupBox6;
    TLabel *Label21;
    TComboBox *combaudrate;
    TLabel *Label22;
    TComboBox *combyte;
    TComboBox *comstop;
    TLabel *Label23;
    TComboBox *comcheck;
    TLabel *Label24;
    TGroupBox *GroupBox15;
    TRadioButton *YiDong_btn;
    TRadioButton *NianTong_btn;
    TLabel *Label25;
    TComboBox *area_comboBox;
    TEdit *CenterNumber;
    TComm *spComm;
    TButton *Button6;
    void __fastcall meoContentChange(TObject *Sender);
    void __fastcall FormShow(TObject *Sender);
    void __fastcall timExecuteTimer(TObject *Sender);
    void __fastcall cbCommChange(TObject *Sender);
    void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
    void __fastcall Button1Click(TObject *Sender);
    void __fastcall Button2Click(TObject *Sender);
    void __fastcall Button8Click(TObject *Sender);
    void __fastcall Button9Click(TObject *Sender);
    void __fastcall Button10Click(TObject *Sender);
    void __fastcall Button11Click(TObject *Sender);
    void __fastcall spCommReceiveData(TObject *Sender, Pointer Buffer,
          WORD BufferLength);
    void __fastcall FormCreate(TObject *Sender);
    void __fastcall ActSendExecute(TObject *Sender);
    void __fastcall ActReadUnReadExecute(TObject *Sender);
    void __fastcall ActGetSNExecute(TObject *Sender);
    void __fastcall ActGetCenterExecute(TObject *Sender);
    void __fastcall ActSetCenterExecute(TObject *Sender);
    void __fastcall ActGetIntentionExecute(TObject *Sender);
    void __fastcall ActSetReportExecute(TObject *Sender);
    void __fastcall ActSetModelExecute(TObject *Sender);
    void __fastcall ActDelMessageExecute(TObject *Sender);
    void __fastcall ActReadReReadExecute(TObject *Sender);
    void __fastcall ActGetModelExecute(TObject *Sender);
    void __fastcall ActionList1Update(TBasicAction *Action, bool &Handled);
    void __fastcall Button6Click(TObject *Sender);
private:	// User declarations
    AnsiString Message;
    AnsiString rec_msg;  //接收消息。
    AnsiString rec_tmp;  //接收临时值。
    bool com_open; //端口是否打开。
    bool can_next; //是否可以执行下一个操作。
    unsigned short wait_timeout; //等待超时数。
    at_return re_type;  //操作类型。
    unsigned int uid;

    AnsiString CodeStyle;
public:		// User declarations
    __fastcall TfrmControl(TComponent* Owner);

    bool __fastcall CheckStatus(void);

    void __fastcall LoadErrInfo(void);

    void __fastcall AddEventInfo(unsigned int id
        , AnsiString EventName, AnsiString result = "执行中...");

    void __fastcall SetEventResult(unsigned int id
        , AnsiString result = "成功");

    unsigned short GetPosDegree(AnsiString sub, AnsiString source);
    AnsiString GetCenter(AnsiString source);

    int GetSendModal(AnsiString source);

};
//---------------------------------------------------------------------------
extern PACKAGE TfrmControl *frmControl;
//---------------------------------------------------------------------------
#endif

⌨️ 快捷键说明

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