SDC C-Project CF Review 프로그램
LYW
2021-10-14 26e2541b87ca76e16cf69399eb9a3cce62d2e864
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
// DlgAFMInfo_Non_VisionAlign.cpp : ±¸Çö ÆÄÀÏÀÔ´Ï´Ù.
//
 
#include "stdafx.h"
#include "ReviewSystem.h"
#include "DlgAFMInfo_Non_VisionAlign.h"
#include "afxdialogex.h"
 
 
// CDlgAFMInfo ´ëÈ­ »óÀÚÀÔ´Ï´Ù.
 
IMPLEMENT_DYNAMIC(CDlgAFMInfo_Non_VisionAlign, CDialog)
 
    CDlgAFMInfo_Non_VisionAlign::CDlgAFMInfo_Non_VisionAlign(CWnd* pParent /*=NULL*/)
{
    m_pSignalIOStatus = NULL;
}
 
CDlgAFMInfo_Non_VisionAlign::~CDlgAFMInfo_Non_VisionAlign()
{
}
 
BEGIN_MESSAGE_MAP(CDlgAFMInfo_Non_VisionAlign, CDialog)
    ON_MESSAGE(UM_SIGNAL_IO_SIGNAL_UPDATE,        &CDlgAFMInfo_Non_VisionAlign::OnPCControlIOSignalUpdate)
END_MESSAGE_MAP()
 
 
// CDlgAFMInfo ¸Þ½ÃÁö Ã³¸®±âÀÔ´Ï´Ù.
 
 
void CDlgAFMInfo_Non_VisionAlign::InitGridPCControlInfo()
{
    enum { PCControl_INFO_GRID_ROW_COUNT = 15, PCControl_INFO_GRID_COL_COUNT = 4 };
 
    int nRowIdx, nColIdx, nRows, nCols, nFixRows, nFixCols, nWidth, nFixWidth;
    CString strTemp;
    CRect rt;
 
    nRows = PCControl_INFO_GRID_ROW_COUNT;
    nCols = PCControl_INFO_GRID_COL_COUNT;
    nFixRows = 1;
    nFixCols = 1;
    nRowIdx = 0;
    nColIdx = 0;
 
    m_ctrlAFMInfo.GetClientRect(&rt);
    //    m_ctrlGridAFMStateInfo.GetDefaultCell(FALSE, FALSE)->SetBackClr(RGB(0xFF, 0xFF, 0xFF));
 
    m_ctrlAFMInfo.GetDefaultCell(TRUE, FALSE)->SetBackClr(RGB(248, 218, 169));
    m_ctrlAFMInfo.GetDefaultCell(FALSE, TRUE)->SetBackClr(RGB(248, 218, 169));
    m_ctrlAFMInfo.GetDefaultCell(FALSE, FALSE)->SetBackClr(RGB(255, 255, 255));
 
    m_ctrlAFMInfo.SetRowCount(nRows);
    m_ctrlAFMInfo.SetColumnCount(nCols);
    m_ctrlAFMInfo.SetFixedRowCount(0);
    m_ctrlAFMInfo.SetFixedColumnCount(0);
    m_ctrlAFMInfo.SetEditable(FALSE);
    m_ctrlAFMInfo.SetSelectedRange(0, 0, 0, 0, FALSE, FALSE);
    nFixWidth = 90;
    nWidth = (rt.Width() - (nFixWidth*2)) / (PCControl_INFO_GRID_COL_COUNT - 2);
    nWidth -= 2;
 
    GV_ITEM Item;
 
    //col
    Item.mask = GVIF_TEXT;
    Item.row = nRowIdx;
    Item.col = nColIdx;
    strTemp.Format(_T("BYPASS"));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetColumnWidth(nColIdx++, nFixWidth);
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.col = nColIdx;
    strTemp.Format(_T(""));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetColumnWidth(nColIdx++, nWidth);
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(255, 255, 255));
 
    Item.col = nColIdx;
    strTemp.Format(_T("LoadSuccess"));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetColumnWidth(nColIdx++, nFixWidth);
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.col = nColIdx;
    strTemp.Format(_T(""));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetColumnWidth(nColIdx++, nWidth);
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(255, 255, 255));
 
    //row
    nRowIdx = 1;
    nColIdx = 0;
    Item.col = nColIdx;
    Item.row = nRowIdx++;
    strTemp.Format(_T("AUTO"));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T("MANUAL"));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T("REVIEW"));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T("Loading"));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T("ReviewStart"));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T("ReviewEnd"));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T("Unloading"));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T(""));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T(""));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T(""));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T(""));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T(""));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T(""));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T(""));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
 
    //row2
    nRowIdx = 1;
    nColIdx = 2;
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("LoadFail"));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T("ReviewSuccess"));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T("ReviewFail"));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T("Light_Error"));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T("A/F_Error"));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T(""));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T(""));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T(""));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T(""));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T(""));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T(""));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T(""));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T(""));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    Item.row = nRowIdx++;
    strTemp.Format(_T(""));
    Item.strText = strTemp;
    m_ctrlAFMInfo.SetItem(&Item);
    m_ctrlAFMInfo.SetItemBkColour(Item.row, Item.col, RGB(248, 218, 169));
 
    for(int rowIdx = 0; rowIdx < PCControl_INFO_GRID_ROW_COUNT; rowIdx++)
    {
        m_ctrlAFMInfo.SetRowHeight(rowIdx, 21);
    }
 
}