SDC C-Project CF Review 프로그램
LYW
2021-10-14 e8ba1e78e72f3f7ec2841f55fd90253b4dc414df
ReviewSystem/ReviewSystem/DlgDeffectHistroy.cpp
@@ -18,9 +18,9 @@
int      Defect_Historywidth[DEFECTLISTCNT] = { 50,           80,             80, 50,         50,        40,         40,         45,          45,         50,        50,            80,             80 };
// [2017:6:7]-[WEZASW] : BOE향
#define B7_DEFECTLISTCNT      14
TCHAR*   B7_Defect_HistoryTitlelist[B7_DEFECTLISTCNT] = { _T("No"), _T("RV_X(mm)"), _T("RV_Y(mm)"), _T("DType"), _T("MType"),  _T("SType"), _T("DLength"), _T("Area"), _T("Peak"), _T("Cam"), _T("DType1"), _T("AOI_X(mm)"), _T("AOI_Y(mm)") };
int      B7_Defect_Historywidth[B7_DEFECTLISTCNT] = { 40,           75,             75,      75,         75,            50,         60,            45,         45,         40,         60,            80,            80 };
#define B7_DEFECTLISTCNT      15
TCHAR*   B7_Defect_HistoryTitlelist[B7_DEFECTLISTCNT] = { _T("No"), _T("RV_X(mm)"), _T("RV_Y(mm)"), _T("DType"), _T("DCode"), _T("MType"),  _T("SType"), _T("DLength"), _T("Area"), _T("Peak"), _T("Cam"), _T("DType1"), _T("AOI_X(mm)"), _T("AOI_Y(mm)") };
int      B7_Defect_Historywidth[B7_DEFECTLISTCNT] = { 40,           65,             65,      65,         50,    55,            50,         60,            45,         45,         40,         60,            80,            80 };
// CDlgDeffectHistroy 대화 상자
@@ -300,6 +300,7 @@
         case 0: nValue = pDefectResult->nDefectIdx; break;         // _T("No")
         case 1: nValue = pDefectResult->nUMOriginX; break;         // _T("RV_X(mm)")
         case 2: nValue = pDefectResult->nUMOriginY; break;         // _T("RV_Y(mm)")
         case 6: nValue = pDefectResult->nAOISizeLength; break;      // _T("DLength")
         case 7: nValue = pDefectResult->nAOIArea; break;            // _T("Area")
         case 8: nValue = pDefectResult->nAOIPeak; break;            // _T("Peak")
@@ -396,15 +397,16 @@
   case 1: strItem = _T("RV_X(mm)"); break;
   case 2: strItem = _T("RV_Y(mm)"); break;
   case 3: strItem = _T("DType"); break;
   case 4: strItem = _T("Judge"); break;
   case 5: strItem = _T("SType"); break;
   case 6: strItem = _T("DLength"); break;
   case 7: strItem = _T("Area"); break;
   case 8: strItem = _T("Peak"); break;
   case 9: strItem = _T("Cam"); break;
   case 10: strItem = _T("ScanN"); break;
   case 11: strItem = _T("AOI_X(mm)"); break;
   case 12: strItem = _T("AOI_Y(mm)"); break;
   case 4: strItem = _T("DCode"); break;
   case 5: strItem = _T("Judge"); break;
   case 6: strItem = _T("SType"); break;
   case 7: strItem = _T("DLength"); break;
   case 8: strItem = _T("Area"); break;
   case 9: strItem = _T("Peak"); break;
   case 10: strItem = _T("Cam"); break;
   case 11: strItem = _T("ScanN"); break;
   case 12: strItem = _T("AOI_X(mm)"); break;
   case 13: strItem = _T("AOI_Y(mm)"); break;
   default: break;
   }
}
@@ -517,47 +519,52 @@
   break;
   case 4:      //MType
   {
      strItem.Format(_T("%s"), pDefectResult->strDefectJudgeCode);
   }
   break;
   case 5:      //MType
   {
      strItem.Format(_T("%s"), pDefectResult->strJudgeType);
   }
   break;
   case 5:      //S_Type
   case 6:      //S_Type
   {
      strItem.Format(_T("%s"), pDefectResult->strSizeType);
   }
   break;
   case 6:      //DLength
   case 7:      //DLength
   {
      strItem.Format(_T("%d"), (int)pDefectResult->nAOISizeLength);
   }
   break;
   case 7:      //Area
   case 8:      //Area
   {
      strItem.Format(_T("%d"), (int)pDefectResult->nAOIArea);
   }
   break;
   case 8:      //Peak
   case 9:      //Peak
   {
      strItem.Format(_T("%d"), pDefectResult->nAOIPeak);
   }
   break;
   case 9:      //Cam
   case 10:      //Cam
   {
      strItem.Format(_T("%d"), pDefectResult->nAOICameraIdx);
   }
   break;
   case 10:   //D_Type1
   case 11:   //D_Type1
   {
      //   strItem.Format(_T("%s"), pDefectResult->strDefectType1);
      strItem.Format(_T("%d"), pDefectResult->nAOIScanIdx);
   }
   break;
   case 11:   //AOI_X(mm)
   case 12:   //AOI_X(mm)
   {
      strItem.Format(_T("%.03lf"), pDefectResult->dUMCenterOriginX / 1000.);
   }
   break;
   case 12:   //AOI_Y(mm)
   case 13:   //AOI_Y(mm)
   {
      strItem.Format(_T("%.03lf"), pDefectResult->dUMCenterOriginY / 1000.);
   }
@@ -568,23 +575,34 @@
void CDlgDeffectHistroy::OnDblclkListHistoryDefect(NMHDR *pNMHDR, LRESULT *pResult)
{
   LPNMITEMACTIVATE pNMItemActivate = reinterpret_cast<LPNMITEMACTIVATE>(pNMHDR);
   // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다.
   int nPos = m_ctrlListDefectHistory.GetSelectionMark();
   if (nPos >= 0)
   /*< LYW 20211005 - #3662 ADD Start >*/
   try
   {
      CString strText;
      strText = m_ctrlListDefectHistory.GetItemText(nPos, 0);
      int nDefectIdx = _ttoi(strText);
      if (nDefectIdx < 0)
         return;
      LPNMITEMACTIVATE pNMItemActivate = reinterpret_cast<LPNMITEMACTIVATE>(pNMHDR);
      // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다.
      //History tool 에 인덱스 번호 넘기기
      m_pDDL2P->UpdateSelectDefectInfoMap2(nDefectIdx);
      int nPos = m_ctrlListDefectHistory.GetSelectionMark();
      if (nPos >= 0)
      {
         CString strText;
         strText = m_ctrlListDefectHistory.GetItemText(nPos, 0);
         int nDefectIdx = _ttoi(strText);
         if (nDefectIdx < 0)
            return;
         //History tool 에 인덱스 번호 넘기기
         m_pDDL2P->UpdateSelectDefectInfoMap2(nDefectIdx);
      }
      *pResult = 0;
   }
   catch (...)
   {
      return;
   }
   /*< LYW 20211005 - #3662 ADD End >*/
   *pResult = 0;
}
void CDlgDeffectHistroy::OnSize(UINT nType, int cx, int cy)