SDC C-Project CF Review 프로그램
LYW
2021-10-14 e8ba1e78e72f3f7ec2841f55fd90253b4dc414df
ReviewSystem/ReviewRecipeEditor/DlgReview.cpp
@@ -1,4 +1,4 @@
// DlgReview_FIC.cpp : 구현 파일입니다.
// DlgReview_FIC.cpp : ���� �����Դϴ�.
//
#include "stdafx.h"
@@ -8,7 +8,7 @@
#include "ReviewRecipeEditorDlg.h"
#include "DlgFilterSizeOption.h"
// CDlgReview 대화 상자입니다.
// CDlgReview ��ȭ �����Դϴ�.
IMPLEMENT_DYNAMIC(CDlgReview, CDialog)
@@ -65,12 +65,12 @@
END_MESSAGE_MAP()
// CDlgReview 메시지 처리기입니다.
// CDlgReview �޽��� ó�����Դϴ�.
BOOL CDlgReview::OnInitDialog()
{
   CDialog::OnInitDialog();
   // TODO:  여기에 추가 초기화 작업을 추가합니다.
   // TODO:  ���⿡ �߰� �ʱ�ȭ �۾��� �߰��մϴ�.
   InitFilterGridControl();
   InitLightInfoGridControl();
   InitAFMRecipeGridControl();
@@ -82,9 +82,9 @@
void CDlgReview::OnBnClickedButtonReviewReset()
{
   // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다.
   // TODO: ���⿡ ��Ʈ�� �˸� ó���� �ڵ带 �߰��մϴ�.
   //CDialog::OnOK();
   // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다.
   // TODO: ���⿡ ��Ʈ�� �˸� ó���� �ڵ带 �߰��մϴ�.
   //CDialog::OnOK();
   UpdateData(FALSE);
}
@@ -92,7 +92,7 @@
void CDlgReview::OnBnClickedButtonReviewApply()
{
   // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다.
   // TODO: ���⿡ ��Ʈ�� �˸� ó���� �ڵ带 �߰��մϴ�.
   //CDialog::OnCancel();
   SetFilterInfo(m_nType);
@@ -159,7 +159,7 @@
   nDataColumnWidth = (rect.Width() - 35 - nMargin) / (PRIORITY_INFO_GRID_COL_COUNT-1);
   Item.col = nColIdx;
   strTemp.Format(_T("Defect Type"));
   strTemp.Format(_T("Defect Code"));
   Item.strText = strTemp;
   m_ctrlGridFilterinfo.SetItem(&Item);
   m_ctrlGridFilterinfo.SetColumnWidth(nColIdx++, nDataColumnWidth+30);
@@ -236,18 +236,24 @@
         const CRcpPriorityInfo* pRcpPriorityInfo = pRsRcpReviewInfo->GetRcpWsiPriorityInfo(i);
         if (pRcpPriorityInfo == NULL) continue;
         pCellCombo = (CGridCellCombo*)m_ctrlGridFilterinfo.GetCell(nRowIdx, nColIdx);
         /*pCellCombo = (CGridCellCombo*)m_ctrlGridFilterinfo.GetCell(nRowIdx, nColIdx);
         if(pCellCombo)
         {
            strArrayOption.RemoveAll();
            pCellCombo->GetOptions(strArrayOption);
            if(strArrayOption.GetSize() > 0)
            {
               strItemText = strArrayOption.GetAt(pRcpPriorityInfo->GetPriorityOpticData());
            {*/
               //strItemText = strArrayOption.GetAt(pRcpPriorityInfo->GetPriorityOpticData());
               //strItemText = strArrayOption.GetAt(pRcpPriorityInfo->GetPriorityDefectCode()); //WSI ������ //20210608
               //m_ctrlGridFilterinfo.SetItemText(nRowIdx, nColIdx++, strItemText);
               //LYW #3428 CF AOI Review Recipe Editor 리뷰 우선순위 조건 타입 변경기능 적용 및 검증 MOD START
               strItemText.Format(_T("%s"), pRcpPriorityInfo->GetPriorityDefectCode());
               m_ctrlGridFilterinfo.SetItemText(nRowIdx, nColIdx++, strItemText);
            }
         }
               //LYW #3428 CF AOI Review Recipe Editor 리뷰 우선순위 조건 타입 변경기능 적용 및 검증 MOD END
         //   }
         //}
         pCellCombo = (CGridCellCombo*)m_ctrlGridFilterinfo.GetCell(nRowIdx, nColIdx);
@@ -284,7 +290,8 @@
            if(strArrayOption.GetSize() > 0)
            {
               strItemText = strArrayOption.GetAt(pRcpPriorityInfo->GetPriorityStackData());
               //LYW ERR수정
               strItemText = strArrayOption.GetAt(pRcpPriorityInfo->GetPriorityGrayData());
               m_ctrlGridFilterinfo.SetItemText(nRowIdx, nColIdx++, strItemText);
            }
         }
@@ -356,18 +363,24 @@
         const CRcpPriorityInfo* pRcpPriorityInfo = pRsRcpReviewInfo->GetRcpPriorityInfo(i);
         if (pRcpPriorityInfo == NULL) continue;
         pCellCombo = (CGridCellCombo*)m_ctrlGridFilterinfo.GetCell(nRowIdx, nColIdx);
         /*pCellCombo = (CGridCellCombo*)m_ctrlGridFilterinfo.GetCell(nRowIdx, nColIdx);
         if(pCellCombo)
         {
            strArrayOption.RemoveAll();
            pCellCombo->GetOptions(strArrayOption);
            if(strArrayOption.GetSize() > 0)
            {
               strItemText = strArrayOption.GetAt(pRcpPriorityInfo->GetPriorityOpticData());
            {*/
               //strItemText = strArrayOption.GetAt(pRcpPriorityInfo->GetPriorityOpticData());
               //strItemText = strArrayOption.GetAt(pRcpPriorityInfo->GetPriorityDefectCode());//20210608 TRDF ������
               //m_ctrlGridFilterinfo.SetItemText(nRowIdx, nColIdx++, strItemText);
               //LYW #3428 CF AOI Review Recipe Editor 리뷰 우선순위 조건 타입 변경기능 적용 및 검증 MOD START
               strItemText.Format(_T("%s"), pRcpPriorityInfo->GetPriorityDefectCode());
               m_ctrlGridFilterinfo.SetItemText(nRowIdx, nColIdx++, strItemText);
            }
         }
               //LYW #3428 CF AOI Review Recipe Editor 리뷰 우선순위 조건 타입 변경기능 적용 및 검증 MOD END
         /*   }
         }*/
         pCellCombo = (CGridCellCombo*)m_ctrlGridFilterinfo.GetCell(nRowIdx, nColIdx);
         if(pCellCombo)
@@ -477,11 +490,11 @@
{
   UpdateData(TRUE);
   //리뷰 dlg 가져오기
   //���� dlg ��������
   CReviewRecipeEditorDlg* pDlg = (CReviewRecipeEditorDlg*)AfxGetMainWnd();
   if(pDlg == NULL) return;
   //리뷰 매니져
   //���� �Ŵ���
   CRcp_RsReviewManager* pRcpRsReviewManager = NULL;
   pRcpRsReviewManager = pDlg->GetRsReviewManager();
   if(pRcpRsReviewManager == NULL) return;
@@ -490,11 +503,11 @@
   CString strTemp, strItemText;   
   CStringArray strArrayOption;
   // [2016:11:2]-[WEZASW] : WSI(1)/Review(0) Type 분리
   // [2016:11:2]-[WEZASW] : WSI(1)/Review(0) Type �и�
   if(nType)
   {
      //WSI
      //조명
      //����
      nColIdx = 1;
      pRcpRsReviewManager->GetRsRcpReviewInfo()->SetRcpWsiLightInfoCount(m_nLightCount); 
      pRcpRsReviewManager->GetRsRcpReviewInfo()->m_bAutoLightWsi = m_ctrlAutoLight.GetCheck();
@@ -520,7 +533,7 @@
         nColIdx++;            
      }
      //AFM 레시피
      //AFM ������
      nRowIdx = 1;
      nColIdx = 1;
      pRcpRsReviewManager->GetRsRcpReviewInfo()->SetRcpWsiAFMRecipeInfoCount(m_nAFMCount); 
@@ -564,7 +577,7 @@
   else
   {
      //Review
      //조명
      //����
      nColIdx = 1;
      pRcpRsReviewManager->GetRsRcpReviewInfo()->SetRcpLightInfoCount(m_nLightCount); 
      pRcpRsReviewManager->GetRsRcpReviewInfo()->m_bAutoLight = m_ctrlAutoLight.GetCheck();
@@ -590,7 +603,7 @@
         nColIdx++;            
      }
      //AFM 레시피
      //AFM ������
      nRowIdx = 1;
      nColIdx = 1;
      pRcpRsReviewManager->GetRsRcpReviewInfo()->SetRcpAFMRecipeInfoCount(m_nAFMCount); 
@@ -635,11 +648,11 @@
{
   UpdateData(TRUE);
   //리뷰 dlg 가져오기
   //���� dlg ��������
   CReviewRecipeEditorDlg* pDlg = (CReviewRecipeEditorDlg*)AfxGetMainWnd();
   if(pDlg == NULL) return;
   //리뷰 매니져
   //���� �Ŵ���
   CRcp_RsReviewManager* pRcpRsReviewManager = NULL;
   pRcpRsReviewManager = pDlg->GetRsReviewManager();
   if(pRcpRsReviewManager == NULL) return;
@@ -670,24 +683,30 @@
         if(pRcpPriorityInfo == NULL) continue;
         // optic
         pCellCombo = (CGridCellCombo*)m_ctrlGridFilterinfo.GetCell(nRowIdx, nColIdx++);
         if(pCellCombo)
         {
            strArrayOption.RemoveAll();
            strItemText = pCellCombo->GetText();
            pCellCombo->GetOptions(strArrayOption);
            nArrayCount = (int)strArrayOption.GetCount();
         //pCellCombo = (CGridCellCombo*)m_ctrlGridFilterinfo.GetCell(nRowIdx, nColIdx++);
         //if(pCellCombo)
         //{
         //   strArrayOption.RemoveAll();
         //   strItemText = pCellCombo->GetText();
         //   pCellCombo->GetOptions(strArrayOption);
         //   nArrayCount = (int)strArrayOption.GetCount();
            for(j = 0; j < nArrayCount; j++)
            {
               strTemp = strArrayOption.GetAt(j);
               if(strTemp.Compare(strItemText) == 0)
               {
                  pRcpPriorityInfo->SetPriorityOpticData(j);
                  break;
               }
            }
         }
         //   for(j = 0; j < nArrayCount; j++)
         //   {
         //      strTemp = strArrayOption.GetAt(j);
         //      if(strTemp.Compare(strItemText) == 0)
         //      {
         //         //pRcpPriorityInfo->SetPriorityOpticData(j);//20210608
         //         pRcpPriorityInfo->SetPriorityDefectCode(j);
         //         break;
         //      }
         //   }
         //}
         //LYW #3428 CF AOI Review Recipe Editor 리뷰 우선순위 조건 타입 변경기능 적용 및 검증 MOD START
         strItemText.Format(_T("%s"), m_ctrlGridFilterinfo.GetItemText(nRowIdx, nColIdx++));
         pRcpPriorityInfo->SetPriorityDefectCode(strItemText);
         //LYW #3428 CF AOI Review Recipe Editor 리뷰 우선순위 조건 타입 변경기능 적용 및 검증 MOD END
         pCellCombo = (CGridCellCombo*)m_ctrlGridFilterinfo.GetCell(nRowIdx, nColIdx++);
         if(pCellCombo)
@@ -783,24 +802,30 @@
         CRcpPriorityInfo* pRcpPriorityInfo = pRsRcpReviewInfo->GetRcpPriorityInfo(i);      
         if(pRcpPriorityInfo == NULL) continue;
         pCellCombo = (CGridCellCombo*)m_ctrlGridFilterinfo.GetCell(nRowIdx, nColIdx++);
         if(pCellCombo)
         {
            strArrayOption.RemoveAll();
            strItemText = pCellCombo->GetText();
            pCellCombo->GetOptions(strArrayOption);
            nArrayCount = (int)strArrayOption.GetCount();
         //pCellCombo = (CGridCellCombo*)m_ctrlGridFilterinfo.GetCell(nRowIdx, nColIdx++);
         //if(pCellCombo)
         //{
         //   strArrayOption.RemoveAll();
         //   strItemText = pCellCombo->GetText();
         //   pCellCombo->GetOptions(strArrayOption);
         //   nArrayCount = (int)strArrayOption.GetCount();
            for(j = 0; j < nArrayCount; j++)
            {
               strTemp = strArrayOption.GetAt(j);
               if(strTemp.Compare(strItemText) == 0)
               {
                  pRcpPriorityInfo->SetPriorityOpticData(j);
                  break;
               }
            }
         }
         //   for(j = 0; j < nArrayCount; j++)
         //   {
         //      strTemp = strArrayOption.GetAt(j);
         //      if(strTemp.Compare(strItemText) == 0)
         //      {
         //         //pRcpPriorityInfo->SetPriorityOpticData(j); //20210608
         //         pRcpPriorityInfo->SetPriorityDefectCode(j);
         //         break;
         //      }
         //   }
         //}
         //LYW #3428 CF AOI Review Recipe Editor 리뷰 우선순위 조건 타입 변경기능 적용 및 검증 MOD START
         strItemText.Format(_T("%s"), m_ctrlGridFilterinfo.GetItemText(nRowIdx, nColIdx++));
         pRcpPriorityInfo->SetPriorityDefectCode(strItemText);
         //LYW #3428 CF AOI Review Recipe Editor 리뷰 우선순위 조건 타입 변경기능 적용 및 검증 MOD END
         pCellCombo = (CGridCellCombo*)m_ctrlGridFilterinfo.GetCell(nRowIdx, nColIdx++);
         if(pCellCombo)
@@ -930,7 +955,7 @@
   const CSystemInfo *pSystemInfo = pDlg->GetSys_SystemInfo();
   if (pSystemInfo==NULL) return;
   int nLightCount = 0; // 헤더 갯수가 조명 설정 갯수임
   int nLightCount = 0; // ��� ������ ���� ���� ������
   int nGantryCount = pSystemInfo->GetGantryInfoCount();
   for(int nGantryIdx=0; nGantryIdx<nGantryCount; nGantryIdx++)
   {
@@ -961,7 +986,7 @@
   Item.mask = GVIF_TEXT;
   Item.row = nRowIdx;
   Item.col = nColIdx;
   strTemp.Format(_T("Index"));//_T("인덱스"));
   strTemp.Format(_T("Index"));//_T("�ε���"));
   Item.strText = strTemp;
   m_ctrlGridLightInfo.SetItem(&Item);
   m_ctrlGridLightInfo.SetColumnWidth(nColIdx, 100);
@@ -969,28 +994,28 @@
   nRowIdx++;
   Item.row = nRowIdx;
   Item.col = nColIdx;
   strTemp.Format(_T("Light Level (gLv)"));//_T("광량 값"));
   strTemp.Format(_T("Light Level (gLv)"));//_T("���� ��"));
   Item.strText = strTemp;
   m_ctrlGridLightInfo.SetItem(&Item);
   nRowIdx++;
   Item.row = nRowIdx;
   Item.col = nColIdx;
   strTemp.Format(_T("Min Level (gLv)"));//_T("최소 광량 값"));
   strTemp.Format(_T("Min Level (gLv)"));//_T("�ּ� ���� ��"));
   Item.strText = strTemp;
   m_ctrlGridLightInfo.SetItem(&Item);
   nRowIdx++;
   Item.row = nRowIdx;
   Item.col = nColIdx;
   strTemp.Format(_T("Max Level (gLv)"));//_T("최대 광량 값"));
   strTemp.Format(_T("Max Level (gLv)"));//_T("�ִ� ���� ��"));
   Item.strText = strTemp;
   m_ctrlGridLightInfo.SetItem(&Item);
   nRowIdx++;
   Item.row = nRowIdx;
   Item.col = nColIdx;
   strTemp.Format(_T("Auto Light (gLv)"));//_T("자동 변경 값"));
   strTemp.Format(_T("Auto Light (gLv)"));//_T("�ڵ� ���� ��"));
   Item.strText = strTemp;
   m_ctrlGridLightInfo.SetItem(&Item);
@@ -1026,7 +1051,7 @@
   if(pRcpRsReviewManager == NULL) return;
   // [2016:11:2]-[WEZASW] : WSI(1)/Review(0) Type 분리
   // [2016:11:2]-[WEZASW] : WSI(1)/Review(0) Type �и�
   if(nType)
   {
      m_ctrlAutoLight.SetCheck(pRcpRsReviewManager->GetRsRcpReviewInfo()->GetWsiAutoLight());
@@ -1114,7 +1139,7 @@
         if (pHeaderInfo==NULL) continue;
         nAFMCount += pHeaderInfo->GetAFMInfoCount();
         //[2017:6:2]-[WEZASW] : SystemSetting의 배율정보 기준으로 적용(셋팅된 렌즈 배율만 선택)
         //[2017:6:2]-[WEZASW] : SystemSetting�� �������� �������� ����(���õ� ���� ������ ����)
         nLensCount = pHeaderInfo->GetMagnificInfoCount();
         for (int nLensIdx=0; nLensIdx<nLensCount; nLensIdx++)
@@ -1122,7 +1147,7 @@
            const CMagnificInfo* pMagnificInfo = pHeaderInfo->GetMagnificInfo(nLensIdx);
            if (pMagnificInfo==NULL) continue;
            // 2017.12.21 smok. 두 개 이상의 gantry / header 시 AFM 배율 표시 이상.
            // 2017.12.21 smok. �� �� �̻��� gantry / header �� AFM ���� ǥ�� �̻�.
            //            strArrayOption[nHeaderIdx].Add(pMagnificInfo->m_strMagnificName);
            strArrayOption[nGantryIdx].Add(pMagnificInfo->m_strMagnificName);
         }
@@ -1153,7 +1178,7 @@
      Item.mask = GVIF_TEXT;
      Item.row = nRowIdx;
      Item.col = nColIdx;
      strTemp.Format(_T("Index"));//_T("인덱스"));
      strTemp.Format(_T("Index"));//_T("�ε���"));
      Item.strText = strTemp;
      m_ctrlGridAFMRecipeInfo.SetItem(&Item);
      m_ctrlGridAFMRecipeInfo.SetColumnWidth(nColIdx, 100);
@@ -1161,14 +1186,14 @@
      nRowIdx++;
      Item.row = nRowIdx;
      Item.col = nColIdx;
      strTemp.Format(_T("Recipe Index"));//_T("레시피 인덱스"));
      strTemp.Format(_T("Recipe Index"));//_T("������ �ε���"));
      Item.strText = strTemp;
      m_ctrlGridAFMRecipeInfo.SetItem(&Item);
      nRowIdx++;
      Item.row = nRowIdx;
      Item.col = nColIdx;
      strTemp.Format(_T("Magnific Index"));//_T("배율 인덱스"));
      strTemp.Format(_T("Magnific Index"));//_T("���� �ε���"));
      Item.strText = strTemp;
      m_ctrlGridAFMRecipeInfo.SetItem(&Item);
@@ -1240,7 +1265,7 @@
   pRcpRsReviewManager = pDlg->GetRsReviewManager();
   if(pRcpRsReviewManager == NULL) return;
   // [2016:11:2]-[WEZASW] : WSI(1)/Review(0) Type 분리
   // [2016:11:2]-[WEZASW] : WSI(1)/Review(0) Type �и�
   if(nType)
   {
      nAFMCount = pRcpRsReviewManager->GetRsRcpReviewInfo()->GetRcpWsiAFMRecipeInfoCount();
@@ -1356,7 +1381,7 @@
      for (int nResultIdx=0; nResultIdx<m_nFilterCount; nResultIdx++)
      {
         //인덱스
         //�ε���
         nColIdx = 0;
         Item.mask = GVIF_TEXT;
         Item.row = nRowIdx;
@@ -1368,7 +1393,7 @@
         // optic
         nColIdx++;
         strArrayOption.RemoveAll();
         for(j = 0; j < RCP_PRIORITY_ORDER_COUNT; j++)
         /*for(j = 0; j < RCP_PRIORITY_ORDER_COUNT; j++)
         {
            switch(j)
            {
@@ -1401,11 +1426,44 @@
               break;
            }
            strArrayOption.Add(strTemp);
         }
         m_ctrlGridFilterinfo.SetCellType(nRowIdx, nColIdx, RUNTIME_CLASS(CGridCellCombo));
         pCellCombo = (CGridCellCombo*)m_ctrlGridFilterinfo.GetCell(nRowIdx, nColIdx++);
         pCellCombo->SetOptions(strArrayOption);
         pCellCombo->SetStyle(CBS_DROPDOWN);
         }*/
         //for (j = 0; j < RCP_PRIORITY_DEFECTCODE_COUNT; j++)//20210608
         //{
         //   switch (j)
         //   {
         //   case RCP_PRIORITY_DEFECT_CODE_ALL:
         //      strTemp.Format(_T("ALL"));
         //      break;
         //   case RCP_PRIORITY_DEFECT_CODE_TRDF:
         //      strTemp.Format(_T("TRDF"));
         //      break;
         //   case RCP_PRIORITY_DEFECT_CODE_BATR:
         //      strTemp.Format(_T("BATR"));
         //      break;
         //   case RCP_PRIORITY_DEFECT_CODE_DOBB:
         //      strTemp.Format(_T("DOBB"));
         //      break;
         //   case RCP_PRIORITY_DEFECT_CODE_DOBS:
         //      strTemp.Format(_T("DOBS"));
         //      break;
         //   case RCP_PRIORITY_DEFECT_CODE_DOWW:
         //      strTemp.Format(_T("DOWW"));
         //      break;
         //   case RCP_PRIORITY_DEFECT_CODE_DOWB:
         //      strTemp.Format(_T("DOWB"));
         //      break;
         //   case RCP_PRIORITY_DEFECT_CODE_DOWS:
         //      strTemp.Format(_T("DOWS"));
         //      break;
         //   }
         //   strArrayOption.Add(strTemp);
         //}
         //m_ctrlGridFilterinfo.SetCellType(nRowIdx, nColIdx, RUNTIME_CLASS(CGridCellCombo));
         //pCellCombo = (CGridCellCombo*)m_ctrlGridFilterinfo.GetCell(nRowIdx, nColIdx++);
         //pCellCombo->SetOptions(strArrayOption);
         //pCellCombo->SetStyle(CBS_DROPDOWN);
         nColIdx++;
         strArrayOption.RemoveAll();
         for (j = 0; j < RCP_PRIORITY_GRADE_COUNT; j++)
@@ -1587,11 +1645,11 @@
void CDlgReview::SizeOptionSetting(int nIndex)
{
   //리뷰 dlg 가져오기
   //���� dlg ��������
   CReviewRecipeEditorDlg* pDlg = (CReviewRecipeEditorDlg*)AfxGetMainWnd();
   if(pDlg == NULL) return;
   //리뷰 매니져
   //���� �Ŵ���
   CRcp_RsReviewManager* pRcpRsReviewManager = pDlg->GetRsReviewManager();
   if(pRcpRsReviewManager == NULL) return;