1
|
#if !defined(AFX_TOOLVIEW_H__51C75F00_4904_4456_B18B_34CA4504BEAD__INCLUDED_)
|
2
|
#define AFX_TOOLVIEW_H__51C75F00_4904_4456_B18B_34CA4504BEAD__INCLUDED_
|
3
|
|
4
|
#if _MSC_VER > 1000
|
5
|
#pragma once
|
6
|
#endif // _MSC_VER > 1000
|
7
|
// ToolView.h : header file
|
8
|
//
|
9
|
|
10
|
/////////////////////////////////////////////////////////////////////////////
|
11
|
// CToolView form view
|
12
|
|
13
|
#ifndef __AFXEXT_H__
|
14
|
#include <afxext.h>
|
15
|
#endif
|
16
|
|
17
|
#include "ImgWnd.h"
|
18
|
#include "Public.h"
|
19
|
#include "CheckComboBox.h"
|
20
|
|
21
|
//??λ???? ??ȷ?? 2???ѻָ? 4
|
22
|
#define BeConfirm 0x2
|
23
|
#define BeResume 0x4
|
24
|
|
25
|
#define SQL_ArrayLength 10240
|
26
|
#define SQL_LimitLength 4095
|
27
|
|
28
|
class CMainFrame;
|
29
|
class CToolView : public CDialogBar
|
30
|
{
|
31
|
public:
|
32
|
BOOL IsAlreadyQueryed;
|
33
|
CToolView(); // protected constructor used by dynamic creation
|
34
|
virtual ~CToolView();
|
35
|
//DECLARE_DYNCREATE(CToolView)
|
36
|
protected:
|
37
|
char m_szSql[SQL_ArrayLength]; //????????sql???
|
38
|
char m_filterSql[SQL_ArrayLength]; //ֻ????ȥ????ҳ??sql??䣬??ҳʱʹ??
|
39
|
|
40
|
// Form Data
|
41
|
public:
|
42
|
//{{AFX_DATA(CToolView)
|
43
|
//enum { IDD = IDD_FORMVIEW };
|
44
|
CCheckComboBox m_ctrlDev;
|
45
|
CCheckComboBox m_ctrlAppSys;
|
46
|
CComboBox m_ctrlAoj;
|
47
|
CCheckComboBox m_ctrlType;
|
48
|
CCheckComboBox m_ctrlPrio;
|
49
|
CComboBox m_ctrlUser;
|
50
|
CImgWnd m_UserImg;
|
51
|
BOOL m_bStation;
|
52
|
CON m_con;
|
53
|
CTime m_startTime;
|
54
|
CTime m_endTime;
|
55
|
CTime m_endHour;
|
56
|
CTime m_startHour;
|
57
|
int m_nSRadio;
|
58
|
|
59
|
CSE_DBOption m_dbOption;
|
60
|
long m_lCount;
|
61
|
long m_lLimitCount; // ???ݼ???
|
62
|
CCheckComboBox m_ctrlGroup;//wyf 20181008
|
63
|
//}}AFX_DATA
|
64
|
|
65
|
// Attributes
|
66
|
public:
|
67
|
long lCount, nLastPage;
|
68
|
int m_nCols, m_nRows, nPageIdx;
|
69
|
CStringArray m_userStr;
|
70
|
CStringArray m_userDesStr;
|
71
|
CArray<ETYPE, ETYPE&> m_group;//wyf 20181008
|
72
|
|
73
|
CArray<ALMPRI, ALMPRI&> m_priType;
|
74
|
CArray<ETYPE, ETYPE&> m_evtType;
|
75
|
CArray<ATYPE, ATYPE&> m_aojType;
|
76
|
CArray<APPTYPE, APPTYPE&> m_appSysType;
|
77
|
CArray<DTYPE, DTYPE&> m_devType;
|
78
|
CArray<COLTYPE, COLTYPE&> m_colType;
|
79
|
|
80
|
CMap<CString, const char*, short, short> m_TypeMap;
|
81
|
CMap<short, short, short, short> m_aojMap;
|
82
|
CMap<short, short, short, short> m_devMap;
|
83
|
CMap<short, short, short, short> m_appSysMap;
|
84
|
// Operations
|
85
|
public:
|
86
|
void Page(int nFlags, int nSkip=0);
|
87
|
CString GetGridText(int row, int col, long& lData);
|
88
|
int GetPriorityNo(int pri);
|
89
|
BOOL GetSqlText(bool bCount = false, int nPageIdx = 0);
|
90
|
void InitCombo();
|
91
|
BOOL InitAllData();
|
92
|
void RefreshChildCtrl();//ˢ??ʱ??ؼ???ť״̬ Weizx 2020-04-16
|
93
|
|
94
|
// Overrides
|
95
|
// ClassWizard generated virtual function overrides
|
96
|
//{{AFX_VIRTUAL(CToolView)
|
97
|
public:
|
98
|
//virtual void OnInitialUpdate();
|
99
|
virtual BOOL Create(CWnd* pParentWnd, UINT nIDTemplate, UINT nStyle, UINT nID);
|
100
|
virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
|
101
|
virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
|
102
|
protected:
|
103
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
104
|
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
|
105
|
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
|
106
|
//virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
|
107
|
virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
|
108
|
virtual void OnInitDialog();
|
109
|
//}}AFX_VIRTUAL
|
110
|
|
111
|
// Implementation
|
112
|
protected:
|
113
|
//virtual ~CToolView();
|
114
|
#ifdef _DEBUG
|
115
|
virtual void AssertValid() const;
|
116
|
virtual void Dump(CDumpContext& dc) const;
|
117
|
#endif
|
118
|
|
119
|
// Generated message map functions
|
120
|
//{{AFX_MSG(CToolView)
|
121
|
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
|
122
|
afx_msg void OnPaint();
|
123
|
afx_msg void OnRadio1();
|
124
|
afx_msg void OnRadio2();
|
125
|
afx_msg void OnStation();
|
126
|
//afx_msg void OnQuery();
|
127
|
afx_msg void OnGroup();//wyf 20181008
|
128
|
afx_msg void OnBtnPrint();//wyf 20181008
|
129
|
afx_msg void OnChkGroup();
|
130
|
afx_msg void OnChkSys();
|
131
|
afx_msg void OnChkDevType();
|
132
|
afx_msg void OnChkPrior();
|
133
|
afx_msg void OnChkEvtType();
|
134
|
afx_msg void OnChkTime();
|
135
|
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
|
136
|
afx_msg void OnLButtonDown(UINT nFlags, CPoint pt );
|
137
|
afx_msg void OnSize(UINT nType, int cx, int cy);
|
138
|
afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
|
139
|
afx_msg void OnStaticGroup();
|
140
|
afx_msg void OnStaticSys();
|
141
|
afx_msg void OnStaticDevType();
|
142
|
afx_msg void OnStaticPrior();
|
143
|
afx_msg void OnStaticEvtType();
|
144
|
afx_msg void OnStaticTime();
|
145
|
//}}AFX_MSG
|
146
|
public:
|
147
|
//{{AFX_MSG(CToolView)
|
148
|
afx_msg void OnQuery();
|
149
|
//}}AFX_MSG
|
150
|
DECLARE_MESSAGE_MAP()
|
151
|
//private:
|
152
|
void ResetGridContext();
|
153
|
private:
|
154
|
BOOL m_chkGroup;
|
155
|
BOOL m_chkSys;
|
156
|
BOOL m_chkDevType;
|
157
|
BOOL m_chkPrior;
|
158
|
BOOL m_chkEvtType;
|
159
|
BOOL m_chkTime;
|
160
|
CBrush m_brush1;
|
161
|
CBrush m_brush2;
|
162
|
int m_sortOrder; //????ʽ 1:asc???? 0:desc????
|
163
|
BOOL m_bAlarmClr; //?Ƿ?ʹ?ø澯?ȼ???ɫ Feature#471 Weizx 2020-04-10
|
164
|
char m_sDiv[3]; // ???ڷָ?? Added by WYF 20200605
|
165
|
public:
|
166
|
CMainFrame * m_pMain;
|
167
|
CWinThread * m_queryThread;
|
168
|
CWinThread * m_queryNextThread;
|
169
|
BOOL m_stopQueryThreadFlag; //????ʱ??????ֹ?߳?
|
170
|
BOOL StopRunQueryPro();
|
171
|
bool m_bBusy;
|
172
|
int m_nFlags;
|
173
|
int m_nSkip;
|
174
|
private:
|
175
|
static UINT RunQueryPro(LPVOID lParam);
|
176
|
static UINT RunPreNextQueryPro(LPVOID lParam);
|
177
|
};
|
178
|
|
179
|
/////////////////////////////////////////////////////////////////////////////
|
180
|
|
181
|
//{{AFX_INSERT_LOCATION}}
|
182
|
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
183
|
|
184
|
#endif // !defined(AFX_TOOLVIEW_H__51C75F00_4904_4456_B18B_34CA4504BEAD__INCLUDED_)
|