提交 | 用户 | age
|
418cb3
|
1 |
|
Q |
2 |
// ConfigToolView.h: CConfigToolView 类的接口
|
|
3 |
//
|
|
4 |
|
|
5 |
#pragma once
|
|
6 |
|
|
7 |
#include "CChidSysCfg1.h"
|
|
8 |
#include "../MTerm1/KDefine.h"
|
|
9 |
|
|
10 |
class CConfigToolView : public CFormView
|
|
11 |
{
|
|
12 |
protected: // 仅从序列化创建
|
|
13 |
CConfigToolView() noexcept;
|
|
14 |
DECLARE_DYNCREATE(CConfigToolView)
|
|
15 |
|
|
16 |
public:
|
|
17 |
#ifdef AFX_DESIGN_TIME
|
|
18 |
enum{ IDD = IDD_CONFIGTOOL_FORM };
|
|
19 |
#endif
|
|
20 |
|
|
21 |
// 特性
|
|
22 |
public:
|
|
23 |
CConfigToolDoc* GetDocument() const;
|
|
24 |
|
|
25 |
// 操作
|
|
26 |
public:
|
|
27 |
|
|
28 |
// 重写
|
|
29 |
public:
|
|
30 |
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
|
|
31 |
protected:
|
|
32 |
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
|
|
33 |
virtual void OnInitialUpdate(); // 构造后第一次调用
|
|
34 |
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
|
|
35 |
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
|
|
36 |
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
|
|
37 |
virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
|
|
38 |
|
|
39 |
// 实现
|
|
40 |
public:
|
|
41 |
virtual ~CConfigToolView();
|
|
42 |
#ifdef _DEBUG
|
|
43 |
virtual void AssertValid() const;
|
|
44 |
virtual void Dump(CDumpContext& dc) const;
|
|
45 |
#endif
|
|
46 |
|
|
47 |
protected:
|
|
48 |
|
|
49 |
// 生成的消息映射函数
|
|
50 |
protected:
|
|
51 |
DECLARE_MESSAGE_MAP()
|
|
52 |
public:
|
|
53 |
|
|
54 |
CRect rect0;
|
|
55 |
CRect rect1;
|
|
56 |
int m_nFrameheight;
|
|
57 |
int m_nPropHeight;
|
|
58 |
int m_nScrollPos = 0;
|
|
59 |
|
|
60 |
CChidSysCfg1 m_propsyscfg1;
|
|
61 |
|
|
62 |
unsigned short m_InfoBlockbuf[256];
|
|
63 |
pKMInfoBlock pInfoBlock;
|
|
64 |
|
|
65 |
unsigned char uuidbuf[256];
|
|
66 |
|
|
67 |
CString struuid;
|
|
68 |
|
|
69 |
unsigned short m_factorydataBuf[256];
|
|
70 |
stFactoryData * pfactorydata;
|
|
71 |
|
|
72 |
unsigned short m_cfgdatabuf[256];
|
|
73 |
pKMSysCfg psyscfg;
|
|
74 |
|
|
75 |
bool m_bOpened = false;
|
|
76 |
bool m_bConnected = false;
|
|
77 |
afx_msg void OnClose();
|
|
78 |
afx_msg void OnDestroy();
|
|
79 |
|
|
80 |
int AddDlgItems();
|
|
81 |
afx_msg void OnBnClickedButtonCommSet();
|
|
82 |
afx_msg void OnBnClickedButtonConnect();
|
|
83 |
afx_msg void OnBnClickedButtonDisconnect();
|
|
84 |
afx_msg void OnBnClickedButtonUpload();
|
|
85 |
afx_msg void OnBnClickedButtonDownload();
|
|
86 |
afx_msg void OnBnClickedButtonEventlog();
|
|
87 |
afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
|
|
88 |
CEdit m_edit_log1;
|
|
89 |
afx_msg void OnTimer(UINT_PTR nIDEvent);
|
|
90 |
int DelayInit();
|
|
91 |
afx_msg void OnBnClickedButtonWritedata();
|
|
92 |
int ShowParams();
|
|
93 |
int GetParams();
|
|
94 |
afx_msg void OnBnClickedButtonTimeNow();
|
|
95 |
afx_msg void OnBnClickedButtonLoadSyscfgFile();
|
|
96 |
afx_msg void OnBnClickedButtonSaveSyscfgFile();
|
|
97 |
int ShowInfoBlockParams();
|
|
98 |
int ShowFactoryDataParams();
|
|
99 |
int GetFactoryDataParams();
|
|
100 |
int ClearInfoBlockParams();
|
|
101 |
int TestAutoConnect();
|
|
102 |
CString GetDeviceNameStr(int DeviceTypeVer);
|
|
103 |
};
|
|
104 |
|
|
105 |
#ifndef _DEBUG // ConfigToolView.cpp 中的调试版本
|
|
106 |
inline CConfigToolDoc* CConfigToolView::GetDocument() const
|
|
107 |
{ return reinterpret_cast<CConfigToolDoc*>(m_pDocument); }
|
|
108 |
#endif
|
|
109 |
|