SDC C-Project CF Review 프로그램
LYW
2021-07-19 2bd50ead7f0b92fb9ed5b477b63dea8fbcf8217e
ReviewSystem/ReviewSystem/DlgSelfDiagnosis_Wsi.cpp
@@ -16,6 +16,7 @@
   : CDialogEx(IDD_DLG_SELF_DIAGNOSIS_WSI, pParent)
{
   m_pDiagnosisManager = pDiagnosisManager;
   m_editWSIFirstStandard = 180;
}
CDlgSelfDiagnosis_Wsi::~CDlgSelfDiagnosis_Wsi()
@@ -30,6 +31,27 @@
   DDX_Control(pDX, IDC_EDIT_WSI_RTB_00, m_ctrlWsiRtb00);
   DDX_Control(pDX, IDC_EDIT_WSI_RTB_01, m_ctrlWsiRtb01);
   DDX_Control(pDX, IDC_BUTTON_SIMULATION, m_btSimulation);
   DDX_Text(pDX, IDC_EDIT_WSI_FIRST_STANDARD, m_editWSIFirstStandard);
   DDX_Control(pDX, IDC_EDIT_WSI_HEIGHT1, m_editWSIHeight1);
   DDX_Control(pDX, IDC_EDIT_WSI_HEIGHT2, m_editWSIHeight2);
   DDX_Control(pDX, IDC_EDIT_WSI_HEIGHT3, m_editWSIHeight3);
   DDX_Control(pDX, IDC_EDIT_WSI_HEIGHT4, m_editWSIHeight4);
   DDX_Control(pDX, IDC_EDIT_WSI_HEIGHT5, m_editWSIHeight5);
   DDX_Control(pDX, IDC_EDIT_WSI_HEIGHT6, m_editWSIHeight6);
   DDX_Control(pDX, IDC_EDIT_WSI_HEIGHT7, m_editWSIHeight7);
   DDX_Control(pDX, IDC_EDIT_WSI_HEIGHT8, m_editWSIHeight8);
   DDX_Control(pDX, IDC_EDIT_WSI_HEIGHT9, m_editWSIHeight9);
   DDX_Control(pDX, IDC_EDIT_WSI_HEIGHT10, m_editWSIHeight10);
   DDX_Control(pDX, IDC_EDIT_WSI_HEIGHT11, m_editWSIHeight11);
   DDX_Control(pDX, IDC_EDIT_WSI_HEIGHT12, m_editWSIHeight12);
   DDX_Control(pDX, IDC_EDIT_WSI_HEIGHT13, m_editWSIHeight13);
   DDX_Control(pDX, IDC_EDIT_WSI_HEIGHT14, m_editWSIHeight14);
   DDX_Control(pDX, IDC_EDIT_WSI_HEIGHT15, m_editWSIHeight15);
   DDX_Control(pDX, IDC_EDIT_WSI_HEIGHT16, m_editWSIHeight16);
   DDX_Control(pDX, IDC_EDIT_WSI_HEIGHT17, m_editWSIHeight17);
   DDX_Control(pDX, IDC_EDIT_WSI_HEIGHT18, m_editWSIHeight18);
   DDX_Control(pDX, IDC_EDIT_WSI_HEIGHT19, m_editWSIHeight19);
   DDX_Control(pDX, IDC_EDIT_WSI_HEIGHT20, m_editWSIHeight20);
}
@@ -45,9 +67,20 @@
void CDlgSelfDiagnosis_Wsi::OnBnClickedButtonSimulation()
{
   // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다.
   // TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다.
   if (m_pDiagnosisManager == NULL) return;
   //#3514_LYW_CF AOI Review 자가진단 기능 개선_START
   if (m_pDiagnosisManager->CheckManualMode() == FALSE)
   {
      CString strMessage;
      strMessage.Format(_T("Change Manual Mode!!"));
      if (IDOK == AfxMessageBox(strMessage, MB_OK | MB_ICONERROR))
      {
         g_pLog->DisplayMessage(_T("Manual Diagnosis Fail! Not Manual Mode"));
         return;
      }
   }
   //#3514_LYW_CF AOI Review 자가진단 기능 개선_END
   //GetDialogControls();
@@ -72,18 +105,95 @@
   const CDiagnosisInfo* pSettingInfo = m_pDiagnosisManager->GetDiagnosisInfo();
   if (pSettingInfo == NULL) return;
   
   m_editWSIFirstStandard = pSettingInfo->GetWSIStandard();
   double nACC00 = m_pDiagnosisManager->GetDiagnosisResult_Wsi(0)->getWSI_ACC();
   double nACC01 = m_pDiagnosisManager->GetDiagnosisResult_Wsi(1)->getWSI_ACC();
   double nRTB00 =  m_pDiagnosisManager->GetDiagnosisResult_Wsi(0)->getWSI_RTB();
   double nRTB01 = m_pDiagnosisManager->GetDiagnosisResult_Wsi(1)->getWSI_RTB();
   double dDiagnosisHeight[20];
   for (int i = 0; i < 10; i++)
   {
      dDiagnosisHeight[i] = m_pDiagnosisManager->GetDiagnosisResult_Wsi(0)->GetDiagnosisHeight(i);
   }
   for (int i = 0; i < 10; i++)
   {
      dDiagnosisHeight[i+10] = m_pDiagnosisManager->GetDiagnosisResult_Wsi(1)->GetDiagnosisHeight(i);
   }
   CString strDiagnosisHeight;
   CString strACC00, strACC01;
   CString strRTB00, strRTB01;
   strACC00.Format(_T("%d"), nACC00);
   strACC01.Format(_T("%d"), nACC01);
   strRTB00.Format(_T("%d"), nRTB00);
   strRTB01.Format(_T("%d"), nRTB01);
   m_ctrlWsiAcc00.SetWindowTextA(strACC00);
   m_ctrlWsiAcc01.SetWindowTextA(strACC01);
   m_ctrlWsiRtb00.SetWindowTextA(strRTB00);
   m_ctrlWsiRtb01.SetWindowTextA(strRTB01);
   strDiagnosisHeight.Format(_T("%d"), dDiagnosisHeight[0]);
   m_editWSIHeight1.SetWindowTextA(strDiagnosisHeight);
   strDiagnosisHeight.Format(_T("%d"), dDiagnosisHeight[1]);
   m_editWSIHeight2.SetWindowTextA(strDiagnosisHeight);
   strDiagnosisHeight.Format(_T("%d"), dDiagnosisHeight[2]);
   m_editWSIHeight3.SetWindowTextA(strDiagnosisHeight);
   strDiagnosisHeight.Format(_T("%d"), dDiagnosisHeight[3]);
   m_editWSIHeight4.SetWindowTextA(strDiagnosisHeight);
   strDiagnosisHeight.Format(_T("%d"), dDiagnosisHeight[4]);
   m_editWSIHeight5.SetWindowTextA(strDiagnosisHeight);
   strDiagnosisHeight.Format(_T("%d"), dDiagnosisHeight[5]);
   m_editWSIHeight6.SetWindowTextA(strDiagnosisHeight);
   strDiagnosisHeight.Format(_T("%d"), dDiagnosisHeight[6]);
   m_editWSIHeight7.SetWindowTextA(strDiagnosisHeight);
   strDiagnosisHeight.Format(_T("%d"), dDiagnosisHeight[7]);
   m_editWSIHeight8.SetWindowTextA(strDiagnosisHeight);
   strDiagnosisHeight.Format(_T("%d"), dDiagnosisHeight[8]);
   m_editWSIHeight9.SetWindowTextA(strDiagnosisHeight);
   strDiagnosisHeight.Format(_T("%d"), dDiagnosisHeight[9]);
   m_editWSIHeight10.SetWindowTextA(strDiagnosisHeight);
   strDiagnosisHeight.Format(_T("%d"), dDiagnosisHeight[10]);
   m_editWSIHeight11.SetWindowTextA(strDiagnosisHeight);
   strDiagnosisHeight.Format(_T("%d"), dDiagnosisHeight[11]);
   m_editWSIHeight12.SetWindowTextA(strDiagnosisHeight);
   strDiagnosisHeight.Format(_T("%d"), dDiagnosisHeight[12]);
   m_editWSIHeight13.SetWindowTextA(strDiagnosisHeight);
   strDiagnosisHeight.Format(_T("%d"), dDiagnosisHeight[13]);
   m_editWSIHeight14.SetWindowTextA(strDiagnosisHeight);
   strDiagnosisHeight.Format(_T("%d"), dDiagnosisHeight[14]);
   m_editWSIHeight15.SetWindowTextA(strDiagnosisHeight);
   strDiagnosisHeight.Format(_T("%d"), dDiagnosisHeight[15]);
   m_editWSIHeight16.SetWindowTextA(strDiagnosisHeight);
   strDiagnosisHeight.Format(_T("%d"), dDiagnosisHeight[16]);
   m_editWSIHeight17.SetWindowTextA(strDiagnosisHeight);
   strDiagnosisHeight.Format(_T("%d"), dDiagnosisHeight[17]);
   m_editWSIHeight18.SetWindowTextA(strDiagnosisHeight);
   strDiagnosisHeight.Format(_T("%d"), dDiagnosisHeight[18]);
   m_editWSIHeight19.SetWindowTextA(strDiagnosisHeight);
   strDiagnosisHeight.Format(_T("%d"), dDiagnosisHeight[19]);
   m_editWSIHeight20.SetWindowTextA(strDiagnosisHeight);
   
}
@@ -108,6 +218,8 @@
   const CDiagnosisInfo* pSettingInfo = m_pDiagnosisManager->GetDiagnosisInfo();
   if (pSettingInfo == NULL) return;
   m_editWSIFirstStandard = pSettingInfo->GetWSIStandard();
   double nACC00 = dAcc00;
   double nACC01 = dAcc01;