SDC C-Project CF Review 프로그램
LYW
2022-04-21 75c1317438374ab8555e85b491b36113b5aeb9c7
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
#pragma once
#include "CHCommonControls/GridCtrl.h"
#include "CHCommonControls/FontStatic.h"
#include "CHReviewSetting/MotorParameter.h"
#include "ModuleStatus.h"
//#include "akIPCNetAOISystem.h"
#include "akAOISharedSystem.h"
 
// CDlgModuleInfo 대화 상자입니다.
 
class CSys_SystemManager;
class CSystemInfo;
class CHeaderInfo;
class CMotorControlInfo;
class CRsRcpReviewInfo;
 
 
interface IDialogModuleInfo2Parent
{
    virtual const CSystemInfo*    DMI2P_GetSystemInfo() = 0;
    virtual const CMotorControlInfo*    DMI2P_GetMotorInfo() = 0;
    virtual const CGlassTypeInfo* DMI2P_StandardGlassTypeInfo() =0;
    virtual void DMI2P_SetSelectedModuleIndex(int nModuleIdx, BOOL bExcute=FALSE) = 0;
    virtual const CRsRcpReviewInfo* DMI2P_Recipe_GetRsRcpReviewInfo()=0;
    //virtual _ProtocolReview DMI2P_GetReviewProtocolMemory();
    virtual BOOL DMI2P_GetCenterCoordinate(double& dPosX, double& dPosY) = 0;
};
 
class CDlgModuleInfo :    public CDialog,
                        public IUpdateMotorPosition,
                        public IUpdateMotorStatus,
                        public IUpdateSelectedModuleIndex,
                        public IUpdateCameraControl,
                        public IUpdateThetaMotorInfo,
                        public IUpdateReviewResult
{
    DECLARE_DYNAMIC(CDlgModuleInfo)
 
public:
    CDlgModuleInfo(CWnd* pParent = NULL);   // 표준 생성자입니다.
    virtual ~CDlgModuleInfo();
 
    void SetDMI2P(IDialogModuleInfo2Parent* pDMI2P)    { m_pDMI2P = pDMI2P; }
 
    // theta motor info
    virtual void UpdateThetaMotorInfo(const SThetaMotorInfo* pThetaMotorInfo);
 
    // motor position
    virtual void UpdateMotorPosition(int nModuleIndex, BOOL bSelected, const SMotorPosition* pMotorPosition);
 
    // camera control
    virtual void UpdateCameraControl(int nModuleIndex, const SCameraControl *pCameraControl, const SCameraInfo* pCameraInfo);
 
    // motor status
    virtual void UpdateMotorStatus(int nModuleIndex, const SMotorStatus* pMotorStatus);
 
    //    selected module index
    virtual void UpdateSelectedModuleIndex(int nModuleIndex, const CModuleStatus* pModuleStatus);
 
    virtual void UpdateReviewResult(int nModuleIndex, const CGlassResult* pGlassResult,int nPlanIndex); //이놈
 
    int GetnModuleIndex()                            { return m_nModuleIndex; }
 
    virtual void OnBnClickedOk();
 
    virtual void OnBnClickedCancel();
 
    // 대화 상자 데이터입니다.
    enum { IDD = IDD_DLG_MODULE_INFO };
 
 
 
protected:
    IDialogModuleInfo2Parent*    m_pDMI2P;
 
    CGridCtrl    m_ctrlMotorInfo;
 
    int                        m_nGantryNumber;
    std::vector<int>        m_nVecHeaderNumber;
    std::vector<int>        m_nVecCameraNumber;
    int                        m_nTotalCameraNumb;
    int                        m_nModuleIndex;
    const CGlassResult*        m_pGlassResult;
 
    CFontStatic                m_ctrlReviewCount;
    CFontStatic                m_ctrlReviewedCount;
    
    int                        m_bUseThetaMotor;
    void InitGridMotorInfo();    
 
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 지원입니다.
 
    DECLARE_MESSAGE_MAP()
 
public:
    virtual BOOL  OnInitDialog();
    void SetCameraNumber(int nGantryNumber, std::vector<int>    nVecHeaderNumber, std::vector<int> nVecCameraNumber, int nTotalCameraNumb);
 
    afx_msg    LRESULT    OnMotorPositionUpdate(WPARAM wParam, LPARAM lParam);
    afx_msg LRESULT    OnCameraStatusUpdate(WPARAM wParam, LPARAM lParam);
    afx_msg LRESULT    OnUpdateSelectedModuleIndex(WPARAM wParam, LPARAM lParam);
    afx_msg LRESULT    OnUpdateThetaMotorInfo(WPARAM wParam, LPARAM lParam);
    afx_msg    LRESULT    OnReviewResultUpdate(WPARAM wParam, LPARAM lParam);
 
    afx_msg    LRESULT    OnGlassPositionUpdate(WPARAM wParam, LPARAM lParam);
 
    afx_msg void OnGridDoubleClick(NMHDR *pNotifyStruct, LRESULT* pResult);
};