提交 | 用户 | age
|
0ed438
|
1 |
|
Q |
2 |
#pragma once
|
|
3 |
|
|
4 |
#include "../MyLib/StaticEx.h"
|
|
5 |
// CMTerm2CommDevView 窗体视图
|
|
6 |
class CMTerm2CommDevView : public CFormView
|
|
7 |
{
|
|
8 |
DECLARE_DYNCREATE(CMTerm2CommDevView)
|
|
9 |
// 构造
|
|
10 |
public:
|
|
11 |
protected:
|
|
12 |
CMTerm2CommDevView(); // 动态创建所使用的受保护的构造函数
|
|
13 |
virtual ~CMTerm2CommDevView();
|
|
14 |
|
|
15 |
#ifdef AFX_DESIGN_TIME
|
|
16 |
enum { IDD = IDD_MTerm2CommDevView2 };
|
|
17 |
#endif
|
|
18 |
|
|
19 |
#ifdef _DEBUG
|
|
20 |
virtual void AssertValid() const;
|
|
21 |
CMTerm2Doc* CMTerm2CommDevView::GetDocument() const
|
|
22 |
{
|
|
23 |
return reinterpret_cast<CMTerm2Doc*>(m_pDocument);
|
|
24 |
}
|
|
25 |
|
|
26 |
#ifndef _WIN32_WCE
|
|
27 |
virtual void Dump(CDumpContext& dc) const;
|
|
28 |
#endif
|
|
29 |
#endif
|
|
30 |
|
|
31 |
protected:
|
|
32 |
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
|
|
33 |
DECLARE_MESSAGE_MAP()
|
|
34 |
public:
|
|
35 |
virtual void OnInitialUpdate();
|
|
36 |
|
|
37 |
// CStatusBar m_wndStatusBar;
|
|
38 |
// CToolBar m_wndToolBar;
|
|
39 |
// CImageList m_ColorTreeImages;
|
|
40 |
// CTreeCtrl m_treectrl1;
|
|
41 |
|
|
42 |
afx_msg void OnClose();
|
|
43 |
afx_msg void OnSize(UINT nType, int cx, int cy);
|
|
44 |
afx_msg void OnTimer(UINT_PTR nIDEvent);
|
|
45 |
afx_msg BOOL OnDeviceChange(UINT nEventType, DWORD_PTR dwData);
|
|
46 |
void FindComPort();
|
|
47 |
|
|
48 |
int BInited;
|
|
49 |
int m_bResourceOpened;
|
|
50 |
int m_bPause;
|
|
51 |
|
|
52 |
CString sComSelStr;
|
|
53 |
CString sBaudSelStr;
|
|
54 |
DWORD dComNum;
|
|
55 |
volatile int MyThreadProc1ToRun = 0;
|
|
56 |
volatile int MyThreadProc1Running = 0;
|
|
57 |
|
|
58 |
|
|
59 |
CRect MainClientRect;
|
|
60 |
CRect LeftRect;
|
|
61 |
CRect RightRect;
|
|
62 |
|
|
63 |
CRect ItemRect;
|
|
64 |
CRect OrgButtonRect;
|
|
65 |
CRect ButtonRect;
|
|
66 |
CRect PicRect;
|
|
67 |
CRect PicRectUp;
|
|
68 |
CRect PicRectDown;
|
|
69 |
|
|
70 |
CRect LogRect;
|
|
71 |
|
|
72 |
int calLayerOuts();
|
|
73 |
int DisplayParams();
|
|
74 |
int GetParams();
|
|
75 |
int DelayInit();
|
|
76 |
|
|
77 |
int LoadResourceList();
|
|
78 |
int SaveResourceList();
|
|
79 |
|
|
80 |
|
|
81 |
int LoadModel();
|
|
82 |
int SaveModel();
|
|
83 |
|
|
84 |
int OpenResource(CStringA ResourceStr);
|
|
85 |
int CloseResource();
|
|
86 |
|
|
87 |
int SaveData(CString sFilePathName);
|
|
88 |
int LoadData(CString sFilePathName);
|
|
89 |
|
|
90 |
int MonitorPLC();
|
|
91 |
|
|
92 |
int UpdateDataDisplay();
|
|
93 |
|
|
94 |
public:
|
|
95 |
static UINT MyJumper1(LPVOID pParam);
|
|
96 |
DWORD WINAPI MyThreadProc1(LPVOID pParam);
|
|
97 |
|
|
98 |
bool m_bOnline = false;
|
|
99 |
bool m_bRunning = false;
|
|
100 |
bool m_bMonitoring = false;
|
|
101 |
|
|
102 |
|
|
103 |
// Combo Com port select
|
|
104 |
CComboBox m_combo_comport;
|
|
105 |
// Combo Com Baud select
|
|
106 |
CComboBox m_combo_com_baud;
|
|
107 |
afx_msg void OnBnClickedButtonStart();
|
|
108 |
afx_msg void OnBnClickedButtonStop();
|
|
109 |
afx_msg void OnBnClickedButtonClrscr();
|
|
110 |
afx_msg void OnBnClickedButtonSend();
|
|
111 |
CEdit m_edit_display;
|
|
112 |
// Combo Input
|
|
113 |
CComboBox m_combo_input;
|
|
114 |
|
|
115 |
afx_msg void OnCbnEditchangeComboInput();
|
|
116 |
afx_msg void OnCbnSelchangeComboRes();
|
|
117 |
afx_msg void OnBnClickedButtonDo();
|
|
118 |
afx_msg void OnCbnSelchangeComboCmdType();
|
|
119 |
afx_msg void OnCbnSelchangeComboDcount();
|
|
120 |
afx_msg void OnBnClickedButtonStartBulkTest();
|
|
121 |
afx_msg void OnBnClickedButtonStopBulkTest();
|
|
122 |
afx_msg void OnMenuDownload();
|
|
123 |
afx_msg void OnMenuUpload();
|
|
124 |
afx_msg void OnMenuOnline();
|
|
125 |
afx_msg void OnMenuOffline();
|
|
126 |
afx_msg void OnMenuMonitor();
|
|
127 |
afx_msg void OnMenuRun();
|
|
128 |
afx_msg void OnUpdateMenuRun(CCmdUI *pCmdUI);
|
|
129 |
afx_msg void OnUpdateMenuMonitor(CCmdUI *pCmdUI);
|
|
130 |
afx_msg void OnUpdateMenuOffline(CCmdUI *pCmdUI);
|
|
131 |
afx_msg void OnUpdateMenuOnline(CCmdUI *pCmdUI);
|
|
132 |
CEdit m_edit_mon1;
|
|
133 |
CEdit m_edit_mon2;
|
|
134 |
afx_msg void OnMenuCommset();
|
|
135 |
afx_msg void OnMenuSysregSet();
|
|
136 |
afx_msg void OnMenuStatusShow();
|
|
137 |
afx_msg void OnMenuInfoDisplay();
|
|
138 |
afx_msg void OnMenuCoilMon();
|
|
139 |
afx_msg void OnMenuDataMon();
|
|
140 |
afx_msg void OnMenuCommTool();
|
|
141 |
afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
|
|
142 |
afx_msg void OnBnClickedButtonClearStat();
|
|
143 |
int Clear_COM_Stats();
|
|
144 |
afx_msg void OnBnClickedButtonRead();
|
|
145 |
afx_msg void OnBnClickedButtonConnect();
|
|
146 |
afx_msg void OnMenuEventLog();
|
|
147 |
afx_msg void OnMenuCommTest();
|
|
148 |
afx_msg void OnMenuForceIo();
|
|
149 |
afx_msg void OnMenuDatetime();
|
|
150 |
CStaticEx m_static_connect;
|
|
151 |
afx_msg void OnBnClickedButtonDisconnect();
|
|
152 |
afx_msg void OnBnClickedButton11();
|
|
153 |
afx_msg void OnBnClickedButton12();
|
|
154 |
afx_msg void OnBnClickedButton13();
|
|
155 |
|
65f713
|
156 |
afx_msg void OnBnClickedButton31();
|
Q |
157 |
afx_msg void OnBnClickedButton2();
|
|
158 |
afx_msg void OnBnClickedButton3();
|
|
159 |
int UpdateLEDDisplay();
|
0ed438
|
160 |
};
|