SDC C-Project CF Review 프로그램
LYW
2021-07-01 668b40db8e394058c7e0abad2fbe539a631043c2
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
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
// DlgGlassAndNetworkInfo.cpp : 구현 파일입니다.
//
 
#include "stdafx.h"
#include "ReviewSystem.h"
#include "DlgGlassAndConnectionInfo.h"
#include "afxdialogex.h"
 
#include "CHReviewSetting/SystemInfo.h"
 
 
// CDlgGlassAndNetworkInfo 대화 상자입니다.
 
IMPLEMENT_DYNAMIC(CDlgGlassAndConnectionInfo, CDialog)
 
    CDlgGlassAndConnectionInfo::CDlgGlassAndConnectionInfo(CWnd* pParent /*=NULL*/)
    : CDialog(CDlgGlassAndConnectionInfo::IDD, pParent)
{
    m_pGlassResult = NULL;
    m_pConnectionStatus = NULL;
    m_nProcessStatus = 0;
    m_nLineType = -1;
}
 
CDlgGlassAndConnectionInfo::~CDlgGlassAndConnectionInfo()
{
}
 
void CDlgGlassAndConnectionInfo::DoDataExchange(CDataExchange* pDX)
{
    CDialog::DoDataExchange(pDX);
    DDX_Control(pDX, IDC_GRID_GLASS_INFO,    m_ctrlGlassInfo);
    DDX_Control(pDX, IDC_GRID_CONNECT_INFO, m_ctrlConnectInfo);
}
 
 
BEGIN_MESSAGE_MAP(CDlgGlassAndConnectionInfo, CDialog)
    ON_BN_CLICKED(IDOK, &CDlgGlassAndConnectionInfo::OnBnClickedOk)
    ON_BN_CLICKED(IDCANCEL, &CDlgGlassAndConnectionInfo::OnBnClickedCancel)
    ON_MESSAGE(UM_PROCESS_STATUS_UPDATE,    &CDlgGlassAndConnectionInfo::OnProcessStatusUpdate)
    ON_MESSAGE(UM_CONNECTION_STATUS_UPDATE, &CDlgGlassAndConnectionInfo::OnConnectionStatusUpdate)
    ON_WM_ERASEBKGND()
    ON_WM_CTLCOLOR()
END_MESSAGE_MAP()
 
 
// CDlgGlassAndNetworkInfo 메시지 처리기입니다.
 
void CDlgGlassAndConnectionInfo::OnBnClickedOk()
{
    // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다.
    //    OnOK();
}
 
void CDlgGlassAndConnectionInfo::OnBnClickedCancel()
{
    // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다.
    //    OnCancel();
}
 
void CDlgGlassAndConnectionInfo::InitGridGlassInfo()
{
    enum { GLASS_GRID_ROW_COUNT = 28, GLASS_GRID_COL_COUNT = 2 };
 
    int nRowIdx, nColIdx, nRows, nCols, nFixRows, nFixCols;
    CString strTemp;
    CRect rt;
 
    nRows = GLASS_GRID_ROW_COUNT;
    nCols = GLASS_GRID_COL_COUNT;
    nFixRows = 1;
    nFixCols = 1;
    nRowIdx = 0;
    nColIdx = 0;
 
 
    //     CFont font;
    //     VERIFY(font.CreateFont(
    //         15,                        // nHeight
    //         4,                         // nWidth
    //         0,                         // nEscapement
    //         0,                         // nOrientation
    //         FW_NORMAL,                 // nWeight
    //         FALSE,                     // bItalic
    //         FALSE,                     // bUnderline
    //         0,                         // cStrikeOut
    //         ANSI_CHARSET,              // nCharSet
    //         OUT_DEFAULT_PRECIS,        // nOutPrecision
    //         CLIP_DEFAULT_PRECIS,       // nClipPrecision
    //         DEFAULT_QUALITY,           // nQuality
    //         DEFAULT_PITCH | FF_SWISS,  // nPitchAndFamily
    //         _T("MS Shell Dlg")));      // lpszFacename
    // 
    //     m_ctrlGlassInfo.SetFont(&font);
 
 
    m_ctrlGlassInfo.GetClientRect(&rt);
    m_ctrlGlassInfo.GetDefaultCell(TRUE, FALSE)->SetBackClr(RGB(180, 210, 247));
    m_ctrlGlassInfo.GetDefaultCell(FALSE, TRUE)->SetBackClr(RGB(180, 210, 247));
    m_ctrlGlassInfo.GetDefaultCell(FALSE, FALSE)->SetBackClr(RGB(255, 255, 255));
 
    m_ctrlGlassInfo.SetRowCount(nRows);
    m_ctrlGlassInfo.SetColumnCount(nCols);
    m_ctrlGlassInfo.SetFixedRowCount(nFixRows);
    m_ctrlGlassInfo.SetFixedColumnCount(nFixCols);
 
    m_ctrlGlassInfo.SetColumnWidth(0, 64);
    m_ctrlGlassInfo.SetColumnWidth(1, 64);
 
    m_ctrlGlassInfo.SetRowHeight(0,25);
    m_ctrlGlassInfo.SetRowHeight(1,25);
    m_ctrlGlassInfo.SetRowHeight(2,25);
    m_ctrlGlassInfo.SetRowHeight(3,25);
    m_ctrlGlassInfo.SetRowHeight(4,25);
    m_ctrlGlassInfo.SetRowHeight(5,25);
 
    GV_ITEM Item;
 
    nRowIdx = 0;
    nColIdx = 0;
 
    //col
    Item.mask = GVIF_TEXT;
    Item.row = nRowIdx;
    Item.col = nColIdx;
    strTemp.Format(_T("Name"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.mask = GVIF_TEXT;
    Item.row = nRowIdx++;
    Item.col = nColIdx + 1;
    strTemp.Format(_T("PCControl"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
#if 1
 
    //col
    Item.mask = GVIF_TEXT;
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("PROD_ID"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    //row
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("OPER_ID"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("LOT_ID"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("PPID"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("JOB_TYPE"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("JOB_ID"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
 
    ////////////////////////////////////////
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("LOT_SEQUENCE_NUMBER"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("SLOT_SEQUENCE_NUMBER"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("PROPERTY_CODE"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("JOB_JUDGE_CODE"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("JOB_GRADE_CODE"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("SUBSTRATE_TYPE"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("PROCESSING_FLAG"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("INSPECTION_FLAG"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("SKIP_FLAG"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("JOB_SIZE"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("GLASS_THICKNESS"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("JOB_ANGLE"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("JOB_FLIP"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("CUTTING_GLASS_TYPE"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("PROCESSING_COUNT"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("INSPECTION_JUDGE_DATA"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("PAIR_JOB_ID"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("PAIR_FLAG"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("OPTION_VALUE"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("RESERVED"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("Glass_Scan_Schedule")); //분판정보
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
#else
    //col
    Item.mask = GVIF_TEXT;
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("GLASSID"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    //row
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("LOTID"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    strTemp.Format(_T("SLOT"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    strTemp.Format(_T("STEPID"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    strTemp.Format(_T("PPID"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    strTemp.Format(_T("FLOWID"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    strTemp.Format(_T("FLOWHIS"));
    Item.strText = strTemp;
    m_ctrlGlassInfo.SetItem(&Item);
#endif
 
    for(int rowIdx = 0; rowIdx < GLASS_GRID_ROW_COUNT; rowIdx++)
        m_ctrlGlassInfo.SetRowHeight(rowIdx, 21);
}
 
void CDlgGlassAndConnectionInfo::InitGridConnectInfo()
{
    enum { CONNECT_INFO_GRID_ROW_COUNT = 10, CONNECT_INFO_GRID_COL_COUNT = 2 };
 
    int nRowIdx, nColIdx, nRows, nCols, nFixRows, nFixCols, nWidth, nFixWidth;
    CString strTemp;
    CRect rt;
 
    nRows = CONNECT_INFO_GRID_ROW_COUNT;
    nCols = CONNECT_INFO_GRID_COL_COUNT;
    nFixRows = 1;
    nFixCols = 1;
    nRowIdx = 0;
    nColIdx = 0;
 
    m_ctrlConnectInfo.GetClientRect(&rt);
    m_ctrlConnectInfo.GetDefaultCell(TRUE, FALSE)->SetBackClr(RGB(248, 218, 169));
    m_ctrlConnectInfo.GetDefaultCell(FALSE, TRUE)->SetBackClr(RGB(248, 218, 169));
    m_ctrlConnectInfo.GetDefaultCell(FALSE, FALSE)->SetBackClr(RGB(255, 255, 255));
 
    m_ctrlConnectInfo.SetRowCount(nRows);
    m_ctrlConnectInfo.SetColumnCount(nCols);
    m_ctrlConnectInfo.SetFixedRowCount(nFixRows);
    m_ctrlConnectInfo.SetFixedColumnCount(nFixCols);
    m_ctrlConnectInfo.SetEditable(FALSE);
    m_ctrlConnectInfo.SetSelectedRange(0, 0, 0, 0, FALSE, FALSE);
    nFixWidth = 86;
    nWidth = (rt.Width() - nFixWidth) / (CONNECT_INFO_GRID_COL_COUNT - 1);
 
    GV_ITEM Item;
 
    //col
    Item.mask = GVIF_TEXT;
    Item.row = nRowIdx;
    Item.col = nColIdx;
    strTemp.Format(_T("Item"));//strTemp.Format(_T("Connect"));
    Item.strText = strTemp;
    m_ctrlConnectInfo.SetColumnWidth(nColIdx++, nFixWidth);
    m_ctrlConnectInfo.SetItem(&Item);
 
    Item.col = nColIdx;
    strTemp.Format(_T("Status"));
    Item.strText = strTemp;
    m_ctrlConnectInfo.SetColumnWidth(nColIdx++, nWidth);
    m_ctrlConnectInfo.SetItem(&Item);
 
 
    //row
    nRowIdx = 1;
    nColIdx = 0;
    Item.row = nRowIdx++;
    Item.col = nColIdx;
    strTemp.Format(_T("PCControl"));
    Item.strText = strTemp;
    m_ctrlConnectInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    strTemp.Format(_T("Motor"));
    Item.strText = strTemp;
    m_ctrlConnectInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    strTemp.Format(_T("AFM"));
    Item.strText = strTemp;
    m_ctrlConnectInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    strTemp.Format(_T("RCam"));//strTemp.Format(_T("ReviewCam"));
    Item.strText = strTemp;
    m_ctrlConnectInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    strTemp.Format(_T("RLight"));//strTemp.Format(_T("ReviewLight"));
    Item.strText = strTemp;
    m_ctrlConnectInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    strTemp.Format(_T("Turret"));
    Item.strText = strTemp;
    m_ctrlConnectInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    strTemp.Format(_T("ACam1"));//strTemp.Format(_T("AlignCam1"));
    Item.strText = strTemp;
    m_ctrlConnectInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    strTemp.Format(_T("ACam2"));//strTemp.Format(_T("AlignCam2"));
    Item.strText = strTemp;
    m_ctrlConnectInfo.SetItem(&Item);
 
    Item.row = nRowIdx++;
    strTemp.Format(_T("ALight"));//strTemp.Format(_T("AlignLight"));
    Item.strText = strTemp;
    m_ctrlConnectInfo.SetItem(&Item);
 
}
 
BOOL CDlgGlassAndConnectionInfo::OnInitDialog()
{
    CDialog::OnInitDialog();
 
    InitGridGlassInfo();
 
    InitGridConnectInfo();
 
    return TRUE;  // return TRUE unless you set the focus to a control
    // 예외: OCX 속성 페이지는 FALSE를 반환해야 합니다.
}
 
void CDlgGlassAndConnectionInfo::UpdateProcessStatus(int nLineType, int nMachineType, int nProcessStatus, const CGlassResult* pGlassResult)
{
    if (pGlassResult==NULL) return;
 
    m_nProcessStatus = nProcessStatus;
 
    m_pGlassResult = pGlassResult;
 
    m_nLineType = nLineType;
 
    this->SendMessage(UM_PROCESS_STATUS_UPDATE);
}
 
void CDlgGlassAndConnectionInfo::UpdateConnectionStatus(const CConnectionStatus* pConnectionStatus)
{
    if (pConnectionStatus==NULL) return;
 
    m_pConnectionStatus = pConnectionStatus;
 
    this->PostMessage(UM_CONNECTION_STATUS_UPDATE);
}
 
LRESULT    CDlgGlassAndConnectionInfo::OnProcessStatusUpdate(WPARAM wParam, LPARAM lParam)
{
    if (m_pGlassResult==NULL) return 0;
 
    g_pLog->DisplayMessage(_T("[DlgGlassAndConnectionInfo] m_pGlassResult = %d"), m_pGlassResult);
 
    int nRowIdx = 1;
    int nColIdx = 1;
 
    // [2017:1:9]-[WEZASW] : PCControl GlassData 항목 재정의.
#if 1
    // PROD_ID
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strProdID);
    nRowIdx++;
 
    // OPER_ID
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strOperID);
    nRowIdx++;
 
    // LOT_ID
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strLotID);
    nRowIdx++;
 
    // PPID
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strPPID);
    nRowIdx++;
 
    // JOB_TYPE
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strJobType);
    nRowIdx++;
 
    // JOB_ID
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strJobID);
    nRowIdx++;
 
    // LOT_SEQUENCE_NUMBER
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strLotSeqNum);
    nRowIdx++;
 
    // SLOT_SEQUENCE_NUMBER
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strSlotSeqNum);
    nRowIdx++;
 
    // PROPERTY_CODE
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strPropertyCode);
    nRowIdx++;
 
    // JOB_JUDGE_CODE
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strJobJudgeCode);
    nRowIdx++;
 
    // JOB_GRADE_CODE
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strJobGradeCode);
    nRowIdx++;
 
    // SUBSTRATE_TYPE
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strSubstrateType);
    nRowIdx++;
 
    // PROCESSING_FLAG
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strProcessingFlag);
    nRowIdx++;
 
    // INSPECTION_FLAG
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strInspectionFlag);
    nRowIdx++;
 
 
    // SKIP_FLAG
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strSkipFlag);
    nRowIdx++;
 
    // JOB_SIZE
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strJobSize);
    nRowIdx++;
 
    // GLASS_THICKNESS
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strGlassThickness);
    nRowIdx++;
 
    // JOB_ANGLE
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strJobAngle);
    nRowIdx++;
 
    // JOB_FLIP
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strJobFlip);
    nRowIdx++;
 
    // CUTTING_GLASS_TYPE
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strCuttingGlassType);
    nRowIdx++;
 
    // PROCESSING_COUNT
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strProcessingCount);
    nRowIdx++;
 
    // INSPECTION_JUDGE_DATA
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strInspectionJudgeData);
    nRowIdx++;
 
    // PAIR_JOB_ID
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strPairJobID);
    nRowIdx++;
 
    // PAIR_FLAG
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strPairFlag);
    nRowIdx++;
 
    // OPTION_VALUE
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strOptionValue);
    nRowIdx++;
 
    // RESERVED
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strReserved);
    nRowIdx++;
 
    // Glass Scan Schedule
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->strGlassScanSchedule); //분판 정보
    nRowIdx++;
 
    // PPID_RC (레시피 이름)
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strPPID_RC); //분판 정보
    nRowIdx++;
 
 
#else
    // GlassID
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strGlassID);
    nRowIdx++;
 
    // LotID
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strLotID);
    nRowIdx++;
 
    // slot num
    CString strValue = _T("");
    strValue.Format(_T("%d"), m_pGlassResult->m_nSlotNum);
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, strValue);
    nRowIdx++;
 
    // step
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strStepID);
    nRowIdx++;
 
    // ppid
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strPPID);
    nRowIdx++;
 
    // flow id
    m_ctrlGlassInfo.SetItemText(nRowIdx, nColIdx, m_pGlassResult->m_strFlowID);
    nRowIdx++;    
#endif
    m_ctrlGlassInfo.Invalidate(FALSE);
 
    return 1;
}
 
LRESULT    CDlgGlassAndConnectionInfo::OnConnectionStatusUpdate(WPARAM wParam, LPARAM lParam)
{
    if (m_pConnectionStatus==NULL) return 0;
 
    int nRowIdx = 1;
    int nColIdx = 1;
 
    COLORREF nConnColor = RGB(150,255,150);
    COLORREF nDisconnColor = RGB(255,150,150);
 
    // PCControl
    if (m_pConnectionStatus->m_bSignalStatus)
    {
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nConnColor);
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Connect"));
    }
    else
    {
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nDisconnColor);
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Disconnect"));
    }
    nRowIdx++;
 
    // Motor
    if (m_pConnectionStatus->m_bMotorStatus)
    {
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nConnColor);
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Connect"));
    }
    else
    {
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nDisconnColor);
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Disconnect"));
    }
    nRowIdx++;
 
    // Review AFM
    if (m_pConnectionStatus->m_vecReviewAFMStatus.size()>=1 && m_pConnectionStatus->m_vecReviewAFMStatus[0])
    {
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nConnColor);
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Connect"));
    }
    else
    {
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nDisconnColor);
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Disconnect"));
    }
    nRowIdx++;
 
    // Review Camera
    if (m_pConnectionStatus->m_vecReviewCameraStatus.size()>=1 && m_pConnectionStatus->m_vecReviewCameraStatus[0])
    {
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nConnColor);
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Connect"));
    }
    else
    {
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nDisconnColor);
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Disconnect"));
    }
    nRowIdx++;
 
    // Review Light
    if (m_pConnectionStatus->m_vecReviewLightStatus.size()>=1 && m_pConnectionStatus->m_vecReviewLightStatus[0])
    {
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nConnColor);
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Connect"));
    }
    else
    {
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nDisconnColor);
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Disconnect"));
    }
    nRowIdx++;
 
    // Review Revolver
    if (m_pConnectionStatus->m_vecReviewRevolverStatus.size()>=1 && m_pConnectionStatus->m_vecReviewRevolverStatus[0])
    {
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nConnColor);
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Connect"));
    }
    else
    {
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nDisconnColor);
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Disconnect"));
    }
    nRowIdx++;
 
    // Align Camera 1
    if (m_pConnectionStatus->m_vecAlignCameraStatus.size()>=1 && m_pConnectionStatus->m_vecAlignCameraStatus[0])
    {
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nConnColor);
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Connect"));
    }
    else
    {
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nDisconnColor);
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Disconnect"));
    }
    nRowIdx++;
 
    // Align Camera 2
    if (m_pConnectionStatus->m_vecAlignCameraStatus.size()>=2 && m_pConnectionStatus->m_vecAlignCameraStatus[1])
    {
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nConnColor);
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Connect"));
    }
    else
    {
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nDisconnColor);
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Disconnect"));
    }
    nRowIdx++;
 
    // Align Light
    if (m_pConnectionStatus->m_vecAlignLightStatus.size()>=1 && m_pConnectionStatus->m_vecAlignLightStatus[0])
    {
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nConnColor);
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Connect"));
    }
    else
    {
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(nDisconnColor);
        m_ctrlConnectInfo.GetCell(nRowIdx, nColIdx)->SetText(_T("Disconnect"));
    }
    nRowIdx++;
 
    return 0;
}
 
BOOL CDlgGlassAndConnectionInfo::SetLineType(int nType)
{
    m_nLineType = nType;
    return TRUE;
}
 
BOOL CDlgGlassAndConnectionInfo::OnEraseBkgnd(CDC* pDC)
{
    // TODO: 여기에 메시지 처리기 코드를 추가 및/또는 기본값을 호출합니다.
    CRect    rect;
    GetClientRect(&rect);
    __super::OnEraseBkgnd(pDC);
    pDC->FillSolidRect(rect, RGB(38,38,38) );
 
    return TRUE;
}
 
 
HBRUSH CDlgGlassAndConnectionInfo::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
    HBRUSH hbr = __super::OnCtlColor(pDC, pWnd, nCtlColor);
 
    CRect rect;
    CString strClass = _T("");
    UINT nID = pWnd->GetDlgCtrlID();
 
    if(nCtlColor == CTLCOLOR_STATIC)
    {
        pDC->SetTextColor(RGB(255,255,255));
        pDC->SetBkColor(RGB(38,38,38));
        hbr = (HBRUSH)GetStockObject(NULL_BRUSH);
    }
 
 
    // TODO:  기본값이 적당하지 않으면 다른 브러시를 반환합니다.
    return hbr;
 
}