Project

General

Profile

Feature #580 » ehrevtView.h

yufeng wu, 06/07/2020 08:48 PM

 
1
// ehrevtView.h : interface of the CehrevtView class
2
//
3
/////////////////////////////////////////////////////////////////////////////
4

    
5
#if !defined(AFX_ehrevtVIEW_H__A3E81827_4032_46B7_B2A6_1412B0DB3EBA__INCLUDED_)
6
#define AFX_ehrevtVIEW_H__A3E81827_4032_46B7_B2A6_1412B0DB3EBA__INCLUDED_
7

    
8
#if _MSC_VER > 1000
9
#pragma once
10
#endif // _MSC_VER > 1000
11

    
12
#include "GridCtrl_src/GridCtrl.h"
13
#include "Public.h"
14

    
15
class CMainFrame;
16

    
17
class CehrevtView : public CView
18
{
19
protected: // create from serialization only
20
	DECLARE_DYNCREATE(CehrevtView)
21

    
22
// Attributes
23
public:
24
	CMainFrame* m_pFrame;
25
	BOOL IsGridScroll()	{ if (this->GetSafeHwnd()) return m_bScroll; return TRUE; }
26

    
27
protected:
28
	int	m_nFixCols;
29
	int	m_nFixRows;
30

    
31
	COLORREF m_FixRowColor;
32
	COLORREF m_FixColColor;
33

    
34
	CGridCtrl* m_pGridCtrl;
35

    
36
	int m_nVisibleCol;
37
	int m_nSelectedCol;
38

    
39
	CEventList m_EvList;
40
	CEventList m_InternalList;
41
	char m_sDiv[3];	// ???ڷָ?? Added by WYF 20200605
42
	BOOL m_bSeq;	// ˳??????
43
	BOOL m_bScroll;	// ʵʱ????
44
	BOOL m_almOrderNumFlag;		//1??ʾ?澯??????,0????ʾ
45
	BOOL m_noEventFlag;	//ʵʱ?????־??TRUE ??ʾ????ʵʱ???FALSE??ʾ??ǰ??ʵʱ????
46
	
47

    
48
	// ??????˸
49
	BOOL m_bFlash;
50
	COLORREF m_FlashColor;
51
	COLORREF m_rstColor;
52

    
53
//     BOOL    m_bSelectAlarm[3]; // ֻ??ʾһ??????????
54

    
55
// Operations
56
public:
57
	BOOL m_bFilter;	// ?Ƿ????-----changed by sjw 2019.4.8 ״̬????ѯ??????Ҫʹ??
58
	COLORREF m_GridLineColor;
59
public:
60
	void ConfAndDelEvent(SBBD &sn);
61
	void AddEvent(SBBD &sn);
62
	void ResizingCol();
63
	void AddEventToList(SBBD &s);
64
	int  GetEventCount(BOOL bAll = TRUE);
65
	void LoadEventToList();
66
// Overrides
67
	// ClassWizard generated virtual function overrides
68
	//{{AFX_VIRTUAL(CehrevtView)
69
	public:
70
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
71
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
72
	virtual void OnInitialUpdate();
73
	virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
74
	protected:
75
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
76
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
77
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
78
	virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
79
	virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
80
	//}}AFX_VIRTUAL
81

    
82
// Implementation
83
public:
84
	CehrevtView();
85
	virtual ~CehrevtView();
86
#ifdef _DEBUG
87
	virtual void AssertValid() const;
88
	virtual void Dump(CDumpContext& dc) const;
89
#endif
90

    
91
protected:
92
	void SetGridColor();
93
	void SetAllColWidth();
94
	void FillInternal();
95
	BOOL GetColText(int nRow, int nCol, int &idx, int &ack, CString *str = NULL);
96

    
97
	void RefreshGrid();
98

    
99
	void GetFlashSetting();
100

    
101
	void SendConfAndDel(CArray<CSI_D_BBD, CSI_D_BBD&> &bbdAry, CUIntArray &rowAry, CStringArray &descAry);
102

    
103
private:
104
    void filterByAlarmPrior(int nPrior);
105
    void updateAlarm(CCmdUI* pCmdUI, int nPrior);
106

    
107
public:
108
	void OnFilter(BOOL m_filter);
109

    
110
// Generated message map functions
111
protected:
112
	//{{AFX_MSG(CehrevtView)
113
	afx_msg void OnSize(UINT nType, int cx, int cy);
114
	afx_msg void OnDel();
115
	afx_msg void OnConfirm();
116
	afx_msg void OnConfirmPage();
117
	afx_msg void OnConfig();
118
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
119
	afx_msg void OnSequence();
120
	afx_msg void OnUpdateSequence(CCmdUI* pCmdUI);
121
	afx_msg void OnScroll();
122
	afx_msg void OnUpdateScroll(CCmdUI* pCmdUI);
123
	afx_msg void OnUpdateFilter(CCmdUI* pCmdUI);
124
	afx_msg void OnTimer(UINT nIDEvent);
125
	afx_msg void OnDestroy();
126
	afx_msg void OnUpdateConfirm(CCmdUI* pCmdUI);
127
	afx_msg void OnUpdateConfirmPage(CCmdUI* pCmdUI);
128
	afx_msg void OnUpdateDel(CCmdUI* pCmdUI);
129
    afx_msg void OnSelAlarm1();
130
    afx_msg void OnSelAlarm2();
131
    afx_msg void OnSelAlarm3();
132
    afx_msg void OnUpdateAlarm1(CCmdUI* pCmdUI);
133
    afx_msg void OnUpdateAlarm2(CCmdUI* pCmdUI);
134
    afx_msg void OnUpdateAlarm3(CCmdUI* pCmdUI);
135
	afx_msg void OnBtnFilePrint();
136
	//}}AFX_MSG
137
    afx_msg void OnGridSizingCol();
138
	DECLARE_MESSAGE_MAP()
139
private:
140
	BOOL m_btnRefreshFlag;
141
	BOOL saveBtnToText(int nCol, int nIndex, SBBD &sn, CString *sz = NULL);
142
public:
143
	BOOL WriteToExcel(CString strFile);
144
	int GetFilterEventCount(BOOL bAll = TRUE);
145
public:
146
	CFont m_editFont;
147
	BOOL m_confirmBtnFlag;		//???ȫ??ȷ?ϰ?ť????????ť?????Ч??־
148
	uint8 m_fontNum;		//ʵʱ????ʵʱ????????ֺţ?Ĭ??15????
149
	CEventList *m_evtList;	//?澯?б? ȫ??ȷ???߳?ʹ??
150
	BOOL m_evtSeq;			//??????ʾ˳??????
151
	CWinThread * m_evtThread;
152
	BOOL m_stopEvtThreadFlag;		//????ʱ??????ֹ?߳?
153
protected:
154
	void OnConfirmDblClk(int row);
155
	CString almColMatch(int nCol, int nIndex, SBBD &sn);
156
	CString eventColMatch(int nCol, int nIndex, SBBD &sn);
157
	void GetViewSetting();
158
	static UINT RunConfirmAllPro(LPVOID lParam);
159
};
160

    
161
/////////////////////////////////////////////////////////////////////////////
162

    
163
//{{AFX_INSERT_LOCATION}}
164
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
165

    
166
#endif // !defined(AFX_ehrevtVIEW_H__A3E81827_4032_46B7_B2A6_1412B0DB3EBA__INCLUDED_)
(2-2/11)