SDC C-Project CF Review 프로그램
LYW
2021-08-23 f9623afb8161f603b14493bea20f6c640152d1ea
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
#pragma once
 
 
// CDlgDefectMap 대화 상자입니다.
#include "ModuleStatus.h"
#include "DefectMap.h"
#include "afxwin.h"
 
interface IDialogDefectMap2Parent
{
    virtual void DDM2P_SelectDefect(int nDefectPosX, int nDefectPosY, int nDefectMarginX, int nDefectMarginY) = 0;
    virtual void DDM2P_MoveGlassPos(double dGlassPosX, double dGlassPosY) = 0;
};
 
typedef std::vector<SMotorPosition>                    VectorMotorPosition;
typedef std::vector<SMotorPosition>::iterator        VectorMotorPositionIt;
 
class CDlgDefectMap    :    public CDialog,
                        public IUpdateDefectFilter, 
                        public IUpdateProcessStatus,
                        public IUpdateMotorPosition,
                        public IUpdateReviewResult
{
    DECLARE_DYNAMIC(CDlgDefectMap)
 
public:
    CDlgDefectMap(CWnd* pParent = NULL);   // 표준 생성자입니다.
    virtual ~CDlgDefectMap();
    void SetDDM2P(IDialogDefectMap2Parent* pDDM2P)        { m_pDDM2P = pDDM2P; }
    CDefectMap* GetDefectMap()                            { return m_pDefectMap; }
 
    virtual void UpdateDefectFilter(const SDefectFilter* pDefectFilter);
    virtual void UpdateProcessStatus(int nLineType, int nMachineType, int nProcessStatus, const CGlassResult* pGlassResult);
    virtual void UpdateMotorPosition(int nModuleIndex, BOOL bSelected, const SMotorPosition* pMotorPosition);
    virtual void UpdateReviewResult(int nModuleIndex, const CGlassResult* pGlassResult,int nPlanIdex);
 
    void UpdateSelectDefectMap(CDefectResult* pDefectResult);
    void SetDefaultGlassType(const CGlassResult* pGlassResult);
 
    BOOL SaveDefectMap(const CString &strPath);
 
// 대화 상자 데이터입니다.
    enum { IDD = IDD_DLG_DEFECT_MAP };
 
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    OnDBLCLKDefectMap(WPARAM wParam, LPARAM lParam);
    afx_msg    LRESULT    OnDBRCLKDefectMap(WPARAM wParam, LPARAM lParam);
    afx_msg    LRESULT    OnLBDOWNDefectMap(WPARAM wParam, LPARAM lParam);
 
protected:
    IDialogDefectMap2Parent*    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;
 
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);
};