SDC C-Project CF Review 프로그램
LYW
2021-07-08 e10b8c2a3f6ee6b639dbb49ff6635d0657531d1e
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
 
// DitGlassRawMessengerDlg.h : Çì´õ ÆÄÀÏ
//
 
#pragma once
 
#include "akGridCtrl/akGridCtrl.h"
#include "akCore/akFileDB.h"
 
#include "akGridData.h"
 
#include "akLoggerExt.h"
 
#include "DitGlassRawServer.h"
 
#include "GlassRawBase.h"
#include <vector>
#include <map>
#include "afxcmn.h"
 
#define UM_GLASSRAW_CLIENTMESSAGE WM_USER+0x1231
#define UM_TRAYICON_MSG WM_USER + 0x1230
 
// CDitGlassRawMessengerDlg ´ëÈ­ »óÀÚ
class CDitGlassRawMessengerDlg : public CDialog
{
// »ý¼ºÀÔ´Ï´Ù.
public:
    CDitGlassRawMessengerDlg(CWnd* pParent = NULL);    // Ç¥ÁØ »ý¼ºÀÚÀÔ´Ï´Ù.
 
// ´ëÈ­ »óÀÚ µ¥ÀÌÅÍÀÔ´Ï´Ù.
    enum { IDD = IDD_DitGlassRawMessenger_DIALOG };
 
protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV Áö¿øÀÔ´Ï´Ù.
protected:
    BOOL m_TrayIcon;
    void ResTrayIcon(void);
    void makeTrayIconMenu(HWND hWnd, int x, int y);
public:
    LRESULT TrayIconMSG(WPARAM wParam, LPARAM lParam);
public:
    struct _InitOption
    {
        int m_nMaxDataNumCell;
        int m_nMaxDataNumDefect;
 
        int m_nSelectRawType;
 
        char m_strLogFilePath[256];
 
        int  m_bUseStack;
        char m_strStackLocalPath[256];
        char m_strStackEquipID[32];
        char m_strStackParam1[32];
        char m_strStackParam2[32];
    }m_ConfigOption;
    void WriteConfigFile();
 
public:
    void MainProcess();
    int ProcessCommand(emGlassRawCommand nCmd, char* pParam);
    char* GetAOIProcStepToString(emAOIProcStep nCmd);
public:
    CDitGlassRawServer m_Server;
    CGlassRawBase* m_pGlassRawMaker;
    CgrmGlassRawData m_GlassRawDataBuffer;
 
public:
    static void threadMain(void* arg);
    int m_nThreadMainFlag;
 
public:
    CString m_strGlassID;
    char m_strConfigFile[MAX_PATH];
    
protected:
    void initGridGlassInfo(CakGridCtrl* pGrid, UINT nRectCtrlID);
    void initGridCellInfo(CakGridCtrl* pGrid, UINT nRectCtrlID);
    void initGridDefectInfo(CakGridCtrl* pGrid, UINT nRectCtrlID);
    void updateGridGlassInfo();
    void getDispInfoDefect(int nCol, int nRow, CString* pStrData);
    void getDispInfoCell(int nCol, int nRow, CString* pStrData);
    CakGridCtrl m_gridGlassInfo;
    CakGridCtrl m_gridCellInfo;
    CakGridCtrl m_gridDefectInfo;
    std::vector<CString> m_vecStrGridGlassHeader;
    std::vector<CString> m_vecStrGridCellHeader;
    std::vector<CString> m_vecStrGridDefectHeader;
 
protected:
    afx_msg LRESULT OnClientMessage(WPARAM wParam, LPARAM lParam);
 
protected:
    CListCtrl m_ctrlLoggerList;
    afx_msg LRESULT OnLoggerDataUpdate(WPARAM wParam, LPARAM lParam);
 
// ±¸ÇöÀÔ´Ï´Ù.
protected:
    HICON m_hIcon;
 
    // »ý¼ºµÈ ¸Þ½ÃÁö ¸Ê ÇÔ¼ö
    virtual BOOL OnInitDialog();
    afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
    afx_msg void OnPaint();
    afx_msg HCURSOR OnQueryDragIcon();
    DECLARE_MESSAGE_MAP()
public:
    afx_msg void OnDropFiles(HDROP hDropInfo);
    afx_msg void OnCbnSelchangeComboRawtype();
//    afx_msg void OnDestroy();
    virtual BOOL DestroyWindow();
    afx_msg void OnBnClickedOk();
protected:
    virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
public:
    
    afx_msg void OnBnClickedBtnExportRaw();
    afx_msg void OnLvnGetdispinfoListLog(NMHDR *pNMHDR, LRESULT *pResult);
    afx_msg void OnBnClickedTestLog1();
    afx_msg void OnBnClickedTestLog2();
    afx_msg void OnBnClickedLogClear();
    afx_msg void OnBnClickedLogFileopen();
    afx_msg void OnBnClickedChkAdminmode();
    afx_msg void OnBnClickedBtnRefresh();
    afx_msg void OnBnClickedBtnExportBin();
    afx_msg void OnBnClickedBtnImportBin();
    afx_msg void OnBnClickedBtnImportRaw();
    virtual BOOL PreTranslateMessage(MSG* pMsg);
    afx_msg void OnBnClickedTest1();
    afx_msg void OnBnClickedTest2();
    afx_msg void OnBnClickedBtnStackapply();
    afx_msg void OnBnClickedTestCmd();
    afx_msg void OnBnClickedBtnFtpManualupload();
};