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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#pragma once
 
#include "btnenh.h"
#include "ENRIT.h"
#include "GlassMap.h"
#include "History.h"
#include "General_Draw.h"
#include "MImageStatic.h"
#include "ViewMapSettings.h"
 
// CViewInsInformation ´ëÈ­ »óÀÚÀÔ´Ï´Ù.
 
#define            MAX_HISTORY_COUNT    1000
#define            _CURRENT_HISTORY_BACKUP_    _T("D:\\InspectionData\\History\\CurrentHistory.Bin")
 
typedef std::vector<CInspectDefect*>                LISTDefect;
typedef std::vector<CInspectDefect*>::iterator        LISTDefectit;
 
class CHardwareSettings;
class CGlassRecipe;
class CDefect;
class CGlass_Data;
class CTransfer_Data;
class CViewInsInformation : public CDialogEx
{
    DECLARE_DYNAMIC(CViewInsInformation)
 
public:
    CViewInsInformation(CWnd* pParent = NULL);   // Ç¥ÁØ »ý¼ºÀÚÀÔ´Ï´Ù.
    virtual ~CViewInsInformation();
 
// ´ëÈ­ »óÀÚ µ¥ÀÌÅÍÀÔ´Ï´Ù.
    enum { IDD = IDD_DLG_INSPECT_INFORMATION };
 
protected:
    virtual BOOL PreTranslateMessage(MSG* pMsg);
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV Áö¿øÀÔ´Ï´Ù.
    virtual BOOL OnInitDialog(void);
    afx_msg void OnPaint();
    afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);            
    afx_msg LRESULT OnMapDefectSelected(WPARAM wParam, LPARAM lParam);    
    DECLARE_MESSAGE_MAP()
    DECLARE_EVENTSINK_MAP()
 
public:
    void                SetView2Main(IViewInterface2Parent *pV2M){m_pV2M=pV2M;}
    void                SetRecipe(CHardwareSettings *pHard,CGlassRecipe *pRecipe);
    void                SetGlassData(CGlass_Data *pGlassData){m_pGlassData=pGlassData;}        
    void                SetTransferData(CTransfer_Data *pTrans);
    void                SetGlassSize(int nIdx,double dValue);
    void                SetCutAreaPointData(CAMERA_DIR Camdir,DimensionDir emDir ,double *dValue,double dAvgVal);
    void                SetDimenPointData(CAMERA_DIR Camdir,DimensionDir emDir ,double *dValue,double dAvgVal);
    void                SetSplineData(Disp_SplineLocation enDir,double dValue);
    void                SetCornerXData(Disp_SplineLocation enDir,double dValue);
    void                SetCornerYData(Disp_SplineLocation enDir,double dValue);
    void                AddHistoryData(HISTORY_RESULT Data);
    void                SetDefect(MapDefect* pMapDefect);
    BOOL                SetNotchImg(LPBYTE pImg,CSize szImg,int bPosDir);
    BOOL                SetSplineImg(LPBYTE pImg,CSize szImg,int iPosition);
 
    void                ViewRefresh(PROG_MSG ProcMsg);
    void                DrawMapRefresh();
    void                ResetView();
    void                Refresh();        
 
protected:
    void                SetControlData();    
 
#pragma region Defect Map
public:
    CGlassMap            *GetDefectMap(BOOL bTFT);
 
protected:
    void                Init_GlassMap();
    void                SetGlassMapIndex();
 
    CGlassMap            m_GlassMapCF;
    CGlassMap            m_GlassMapTFT;        
#pragma endregion Defect Map
 
#pragma region Measurement Result Grid
protected:
//#define MAX_VIEWINFO_GRD_CNT        7
    void                Init_MeasureGrid();
    void                Init_MeasureGridHeader(CGridCtrl *pGrid,int nCount,CString strTitle,int nLineIndex);
    void                Fill_MeasureGrid();
 
    CGridCtrl            m_GrdMeasureLine[MAX_VIEWINFO_GRD_CNT];    
#pragma endregion Measurement Result Grid
    
#pragma region Spline Image Display
protected:
    BOOL                FlipImage(LPBYTE pImg,CSize szImg);
    BOOL                ChangeLeftRight(LPBYTE pImg,CSize szImg);
    BOOL                RotateImage(LPBYTE pImg,CSize szImg);
    void                ShrinkImage(BYTE *pInBuff, LONG wSrcWidth, LONG wSrcHeight, BYTE *pOutBuff, LONG wDestWidth, LONG wDestHeight,double scale);    
 
    BOOL                m_bNotchInspect;
    LPBYTE                m_pSplineImg[4];
    CSize                m_szSplineImg[4];
    LPBYTE                m_pNotchImg;
    CSize                m_szNotchImg;    
#pragma region Spline Image Display
        
    void                UpdateTransferData();
    void                DrawUIControl();
    void                DrawUITitle();    
    void                OnBnClickedMapSettings();
 
protected:    
    _ST_MAPSETTINGS        m_MapSettingIndex;
    HISTORY_RESULT        m_HistoryData;
    IViewInterface2Parent    *m_pV2M;
    BOOL                m_bInitView;    
    CHardwareSettings    *m_pHardwareSetting;
    CGlassRecipe    *m_pGlassRecipe;    
    CFontControl        m_FontControl;
    CGlass_Data            *m_pGlassData;
    CTransfer_Data        *m_pTransData;
    BITMAPINFO            *m_pBMI;
 
    CBtnEnh                m_btnRecipeName;
    CBtnEnh                m_btnGlassID;
    CBtnEnh                m_btnRecipeInfo;
 
    CBtnEnh                m_btnEQPNo;
    CBtnEnh                m_btnUnitNo;
    CBtnEnh                m_btnIsGrind;
    CBtnEnh                m_btnStageNo;
    CBtnEnh                m_btnRoughPadLayer;
    CBtnEnh                m_btnRoughPadCount;
    CBtnEnh                m_btnRoughNPadLayer;
    CBtnEnh                m_btnRoughNPadCount;
    CBtnEnh                m_btnRoughPadLayer2;
    CBtnEnh                m_btnRoughPadCount2;
    CBtnEnh                m_btnRoughNPadLayer2;
    CBtnEnh                m_btnRoughNPadCount2;
public:
    afx_msg void OnBnClickedStaticInsinfoGrp2();
};