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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#pragma once
 
#include "ENRIT.h"
#include "Global_Define.h"
#include "General_Draw.h"
#include "GlassRecipe.h"
#include "HardwareSettings.h"
// CViewException dialog
 
class CViewException : public CDialogEx
{
    DECLARE_DYNAMIC(CViewException)
 
public:
    CViewException(CWnd* pParent = NULL);   // standard constructor
    virtual ~CViewException();
 
// Dialog Data
    enum { IDD = IDD_DLG_EXCEPTION };
protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
 
    DECLARE_MESSAGE_MAP()
public:
    virtual BOOL OnInitDialog();
    afx_msg void OnBnClickedBtnAdd();
    afx_msg void OnBnClickedBtnModify();
    afx_msg void OnBnClickedBtnDelete();
    afx_msg void OnBnClickedBtnDeleteAll();        
    afx_msg void OnBnClickedBtnClose();    
    afx_msg void OnPaint();
    afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
    afx_msg void OnGridDBClick(NMHDR *pNotifyStruct, LRESULT* pResult);
 
public:    
    void            SetRecipe(CHardwareSettings *pHard,CGlassRecipe *pRecipe);    
    void            SetIndex(int index);
    void            SetIU2P(IUserDefectInterface2Parent *pIE2P){m_pIE2P=pIE2P;}
    void            SetGlassData(CGlass_Data *pGlass){m_pGlassData=pGlass;}
 
    void            Init_ExpAreaGrid();
    void            Init_ExpAreaGridHeader();        
    void            FillExpAreaGrid();    
 
    EXECPTION_AREA    *GetExpArea(){return m_pExpArea;}
 
    void            SetAreaChange(EXECPTION_AREA *pExp);
    void            SetAreaModify(EXECPTION_AREA *pExp);
 
protected:
    void            SetControlData();
    void            GetResolution(double &dH,double &dV);
 
private:
    int                m_nExceptionType;    
    int                m_nCam;
 
    CGridCtrl            m_GrdExpList;
    CHardwareSettings    *m_pHardwareSetting;
    CGlassRecipe    *m_pGlassRecipe;    
    CGlass_Data            *m_pGlassData;
    int                    m_index;    
    IUserDefectInterface2Parent    *m_pIE2P;
    CFontControl        m_FontControl;
 
    CPoint            m_ptOrg;
    EXECPTION_AREA  *m_pExpArea;
    int                m_nSelectRow;
    CMFCButton        m_chk_AppDefect[7];    
    CMFCButton        m_rdo_AreaType[3];        
        
    double            m_dEditPX;
    double            m_dEditPY;
    double            m_dEditROIWidth;
    double            m_dEditROIHeight;
    int                m_nErrorDx;
    int                m_nErrorDy;    
    
};