chenluhua1980
6 天以前 d400f022161ff47f02cd0ea95a5076d0187ecd4d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#pragma once
#include "BlButton.h"
#include "Alarm.h"
 
 
// CAlarmPopupDlg ¶Ô»°¿ò
 
class CAlarmPopupDlg : public CDialogEx
{
    DECLARE_DYNAMIC(CAlarmPopupDlg)
 
public:
    CAlarmPopupDlg(CWnd* pParent = NULL);   // ±ê×¼¹¹Ô캯Êý
    virtual ~CAlarmPopupDlg();
 
public:
    void SetPLC(CPLC* pPLC);
 
public:
    void AlarmOn();
    void AlarmOff();
 
private:
    void InitRxWindows();
    void ShowFirstAlarm();
    void SetButtonBackgroundColors(bool bMute);
 
private:
    COLORREF m_crBkgnd;
    HBRUSH m_hbrBkgnd;
    CFont m_fontTitle;
    CFont m_fontLevel;
    CFont m_fontName;
    CFont m_fontDescription;
 
private:
    IObserver* m_pObserver;
    CPLC* m_pPLC;
    CAlarm* m_pActiveAlarm;
    CBlButton m_btnClose;
    CBlButton m_btnSoundOff;
    CBlButton m_btnAlarmOff;
 
// ¶Ô»°¿òÊý¾Ý
#ifdef AFX_DESIGN_TIME
    enum { IDD = IDD_DIALOG_POPUP_ALARM };
#endif
 
protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV Ö§³Ö
 
    DECLARE_MESSAGE_MAP()
public:
    virtual BOOL OnInitDialog();
    afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
    afx_msg void OnDestroy();
    afx_msg void OnSize(UINT nType, int cx, int cy);
    afx_msg void OnBnClickedButtonClose();
    afx_msg void OnBnClickedButtonSoundOff();
    afx_msg void OnBnClickedButtonAlarmOff();
};