SDC C-Project CF Review 프로그램
LYW
2021-06-07 b785acb6a38b295544c03f83caccf99368d1b598
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
#pragma once
#include "ModuleStatus.h"
#include "DefectMap.h"
#include "afxwin.h"
 
interface IDialogDefectHistoryMap2Parent
{
    virtual void SelectDefect(int nDefectPosX, int nDefectPosY, int nDefectMarginX, int nDefectMarginY) = 0;
};
 
typedef std::vector<SMotorPosition>                    VectorMotorPosition;
typedef std::vector<SMotorPosition>::iterator        VectorMotorPositionIt;
 
class CDlgDefectHistoryMap :
    public CDialog,
    public IUpdateDefectFilter,
    //public IUpdateProcessStatus,
    public IUpdateReviewResult
{
    DECLARE_DYNAMIC(CDlgDefectHistoryMap)
 
public:
    CDlgDefectHistoryMap(CWnd* pParent = NULL);   // Ç¥ÁØ »ý¼ºÀÚÀÔ´Ï´Ù.
    virtual ~CDlgDefectHistoryMap();
    void SetDDM2P(IDialogDefectHistoryMap2Parent* pDDM2P) { m_pDDM2P = pDDM2P; }
    CDefectMap* GetDefectMap() { return m_pDefectMap; }
 
    virtual void UpdateDefectFilter(const SDefectFilter* pDefectFilter);
    virtual void UpdateProcessStatus(const CGlassResult* pGlassResult);
    virtual void SetHistoryDefect(BOOL bDefectUse) { m_bDefectUse = bDefectUse; }
    virtual BOOL GetHistoryDefect() { return m_bDefectUse; }
    
    virtual void UpdateMotorPosition(int nModuleIndex, BOOL bSelected, const SMotorPosition* pMotorPosition);
    virtual void UpdateReviewResult(int nModuleIndex, const CGlassResult* pGlassResult, int nPlanIdex);
 
    void UpdateReviewResult2(const CGlassResult * pGlassResult);
 
    void UpdateSelectDefectMap(CDefectResult* pDefectResult);
    void SetDefaultGlassType(const CGlassResult* pGlassResult);
 
    BOOL SaveDefectMap(const CString &strPath);
 
    void SetDefectZoom(double dDefectZoom) { m_dDefectZoom = dDefectZoom; }
    void SetrevDefectZoom(double drevDefectZoom) { m_drevDefectZoom = drevDefectZoom; }
 
    DOUBLE    GetDefectZoom() { return m_dDefectZoom; }
    DOUBLE    GetrevDefectZoom() { return m_drevDefectZoom; }
 
    // ´ëÈ­ »óÀÚ µ¥ÀÌÅÍÀÔ´Ï´Ù.
    enum { IDD = IDD_DLG_DEFECT_MAP_TAB };
 
protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV Áö¿øÀÔ´Ï´Ù.
 
    DECLARE_MESSAGE_MAP()
public:
    virtual BOOL OnInitDialog();
    virtual BOOL PreTranslateMessage(MSG* pMsg);
 
 
    afx_msg    LRESULT    OnMotorPositionUpdate(WPARAM wParam, LPARAM lParam);
    afx_msg LRESULT    OnDefectFilterUpdate(WPARAM wParam, LPARAM lParam);
    afx_msg    LRESULT    OnProcessStatusUpdate(WPARAM wParam, LPARAM lParam);
    afx_msg    LRESULT    OnReviewResultUpdate(WPARAM wParam, LPARAM lParam);
    afx_msg    LRESULT    OnLBDOWNDefectMap(WPARAM wParam, LPARAM lParam);
    afx_msg    LRESULT    OnDBLCLKDefectMap(WPARAM wParam, LPARAM lParam);
    afx_msg LRESULT OnMouseWheelDefectMap(WPARAM wParam, LPARAM lParam);
 
 
protected:
    IDialogDefectHistoryMap2Parent*    m_pDDM2P;
 
    int                            m_nProcessStatus;
    CDefectMap*                    m_pDefectMap;
    const SDefectFilter*        m_pDefectFilter;
    const CGlassResult*            m_pGlassResult;
    int                            m_nSelectedIndex;
    VectorMotorPosition            m_vecMotorPos;
    BOOL                        m_bTimerColor;
    CDefectResult                m_measurePoint;
    CDefectResult*                m_pSelectDefectResult;
    BOOL                        m_bDefectUse;
 
    DOUBLE m_dDefectZoom;
    DOUBLE m_drevDefectZoom;
 
public:
    virtual BOOL DestroyWindow();
    afx_msg void OnTimer(UINT_PTR nIDEvent);
    afx_msg BOOL OnEraseBkgnd(CDC* pDC);
    afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
protected:
    afx_msg LRESULT OnLCLKDefectMap(WPARAM wParam, LPARAM lParam);
};