📄 gateagentdlg.h
字号:
// GateAgentDlg.h : header file
//
//{{AFX_INCLUDES()
//}}AFX_INCLUDES
#include "PublicBase.h"
#include "SQLBase.h"
#include "systemTray.h"
//#include "SmsOperater.h"
#include <iostream>
#include <deque>
#include "SmsOper.h"
#define WM_USER_TRAY_NOTIFICATION (WM_USER+0x107)
#if !defined(AFX_GATEAGENTDLG_H__52A73511_1398_4A50_B9B1_E328D038F6F1__INCLUDED_)
#define AFX_GATEAGENTDLG_H__52A73511_1398_4A50_B9B1_E328D038F6F1__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
using namespace std;
/////////////////////////////////////////////////////////////////////////////
// CGateAgentDlg dialog
#define MAX_SMS 200 //接收保存最大短信
#define MAX_LIST 1000//最大队列数目接收
#define SCTS_LEN 16
#define TPA_LEN 16
#define UD_LEN 160
#define MAX_COM 10//最大接端口号码为10
struct st_smsCom{
int iCom; //从哪个端口号码
char chSca[16]; //短消息中心号码
char chCom[10];//串口标识符号
};
class CGateAgentDlg : public CDialog
{
// Construction
public:
int OnDeleteReadAndSend(int hCom);
int OnDoSendSms(int nHandle, CString strTel, CString strSms,CString strState,CString strId);
int OnExistSend(int &nHandle, CString &strTel, CString &strBack,CString &strState,CString &strId);
int OnDeleteAppointed(int hCom,int nIndex);
int OnRecvSms(int hCom,SM_PARAM* pMsg);
int OnSetInit(int hCom);
int OnGetSmsCenterNum(int hCom,char *pchOut);
int OnOpenCom(char *pPort, int nBaudRate, int nParity, int nByteSize, int nStopBits);
int OnPublicMess(CString strMess,CString strName);
int OnAgainConnectDb();
int OnIsWhole(CString strMess,char *pchDiv);
int OnIsEnd(CString strMess);
int OnCheckIsLogin(int nSmsType,char *pchTelNo,CString &strEmpcode,CString &strTerm,CString &strBelong2,CString &strName);
//收到消息的函数
int OnRecv(int nHandle, char *pchSendMnum, char *pchTime, char *pchText, char *pchFlag);
//发送消息的函数
int OnSend(int nHandle, char *pchDestMnum, char *pchText, char *pchFlag,int nTextLen);
// int OnSend();
int OnReadBase();
void OnInsertMess(char *strShow, bool bShow=true ,bool bWritelog = true);
int OnDoWith(int nHandle,char *pchTelNum,char *pchTime,char *pchText,char *pchFlag);
int OnPreSend(int iSendNum,int nHandle,char *pchFlag);
CGateAgentDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CGateAgentDlg)
enum { IDD = IDD_GATEAGENT_DIALOG };
CListCtrl m_clcView;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CGateAgentDlg)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
afx_msg LONG OnTrayNotification( WPARAM wparam, LPARAM lparam );
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CGateAgentDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnMenuRun();
afx_msg void OnMenuExit();
afx_msg void OnMenuLog();
afx_msg void OnMenuConfig();
afx_msg void OnMenuTest();
afx_msg void OnMenuAbout();
afx_msg void OnClose();
afx_msg void OnShow();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnMenuShut();
afx_msg void OnTrayClose();
afx_msg void OnMenuClear();
afx_msg void OnUpdateMenuTest(CCmdUI* pCmdUI);
afx_msg void OnMenuCal();
afx_msg void OnMenuParam();
afx_msg void OnMenuHelp();
afx_msg void OnMenuClearsim();
DECLARE_EVENTSINK_MAP()
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
int OnStartMainThread();
int OnReadSysCfg();
int OnReportTotal(int nHandle,char *pchInput,char *pchTelNum,char *pchTime,char *pchFlag);
int OnInsertSend(int nHandle,char *pchTelNum,char *pchTime,char *pchText,char *pFlag);
int OnPromptSaler(int nHandle,char *pchTime);
int OnWhole(int nHandle,char *pchEmpcode,char *pchTerm,char *pchBelong2,char *pchTelNum,char *pchTime,char *pchText,char *pchFlag);
int OnDoFind(int nHandle,char *pchCode, char *pchTelNum, char *pchTime);
int OnDoSpecific(int nHandle,int nType,CString strMess,CString strTel,char *pchTime,CString strName);
int OnAnalyzeFindSms(int nHandle,char *pchInput,char *pchDiv,char *pchCongrats,char *pchTime,char *pchTelNum);
//主要用来处理对于数据库插入、更新、修改、删除等操作
int OnDbDoWith(char *pchSql);
bool m_bRun;
CPublicBase m_CPubBase;
CString m_sDBServer;
CString m_sDBUser;
CString m_sDBPwd;
CString m_sDataBaseName;
CString m_sDiv;
CString m_strNoDiv;//客户分隔符号
CString m_strBkInfo;
int m_nSmsType;
int m_nIsNode;//是否带有网点
bool m_bWrite;
int m_iSendNum;//重新发送次数
int m_iIsSucceedBack;//如果售货员发送消息给中心,成功了,是否要回送给售货员,0则表示不回送
int m_nIsCard;//0表示不带有客户号码,1表示带有客户卡号码
int m_nIsCustCard;//判断带有客户号码,比如说一条记录没有发送完成,第二个没有带客户号码。
//或者本来记录就没有带客户号码,系统能够自动识别
CString m_chEnd;
CSqlDB m_sqlDB;
CSystemTray m_trayIcon;//定义一个托盘变量类型
int m_iMobileType;//手机类型
int m_iComPort;//串口类型
int m_iTest;//测试标志
int m_iSendTime;//
int m_DogPort;//加密狗的端口号码
CString m_sNumFront;
bool m_bTest;//如果是演示版本则为true
bool m_bDel;//是否已经清空了临时表格
CSmsOper m_cSmsOper; //测试数据
//CSmsOperater m_cSmsOper;
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_GATEAGENTDLG_H__52A73511_1398_4A50_B9B1_E328D038F6F1__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -