| | |
| | | |
| | | void CViewMain_Recipe::UpdateRecipe(BOOL bGetData, int type) |
| | | { |
| | | if(bGetData == FALSE) |
| | | { |
| | | // UpdateData(FALSE); // Parameter |
| | | |
| | | Fill_PanelInfo(bGetData); |
| | | Fill_SideInsInfo(bGetData); |
| | | Fill_JudgementInfo(bGetData); |
| | | |
| | | UpdateSideImage(); // Image |
| | | |
| | | UpdateMarkImage(); // Mark Image |
| | | |
| | | m_dScanTimeOut = m_pDlgRecipe->m_RecieParm.m_dOneScanTime_sec; |
| | | |
| | | if(m_pViewSideDimensionSetting != NULL) |
| | | m_pViewSideDimensionSetting->UpdateRecipe(bGetData); |
| | | |
| | | if(m_pViewSideNotchSetting != NULL) |
| | | m_pViewSideNotchSetting->UpdateRecipe(bGetData); |
| | | |
| | | if(m_pViewSideExceptionSetting != NULL) |
| | | m_pViewSideExceptionSetting->UpdateRecipe(bGetData); |
| | | |
| | | if(m_pViewSideUserDefectSetting != NULL) |
| | | m_pViewSideUserDefectSetting->UpdateRecipe(bGetData); |
| | | |
| | | UpdateData(FALSE); |
| | | } |
| | | else |
| | | { |
| | | UpdateData(TRUE); // Parameter |
| | | |
| | | Fill_PanelInfo(bGetData); |
| | | Fill_SideInsInfo(bGetData); |
| | | Fill_JudgementInfo(bGetData); |
| | | |
| | | if (bGetData) { |
| | | UpdateData(TRUE); |
| | | m_pDlgRecipe->m_RecieParm.m_dOneScanTime_sec = m_dScanTimeOut; |
| | | } |
| | | else { |
| | | m_dScanTimeOut = m_pDlgRecipe->m_RecieParm.m_dOneScanTime_sec; |
| | | } |
| | | |
| | | if (type == 1) |
| | | { |
| | | if (m_pViewSideDimensionSetting != NULL) |
| | | m_pViewSideDimensionSetting->UpdateRecipe(bGetData); |
| | | Fill_PanelInfo(bGetData); |
| | | Fill_SideInsInfo(bGetData); |
| | | Fill_JudgementInfo(bGetData); |
| | | |
| | | if (!bGetData) { |
| | | UpdateSideImage(); |
| | | UpdateMarkImage(); |
| | | } |
| | | |
| | | auto UpdateChild = [&](auto* pView) { |
| | | if (pView) { |
| | | pView->UpdateRecipe(bGetData); |
| | | } |
| | | }; |
| | | |
| | | if(m_pViewSideNotchSetting != NULL) |
| | | m_pViewSideNotchSetting->UpdateRecipe(bGetData); |
| | | const bool bNeedUpdateSideDim = (!bGetData) || (type == 1); |
| | | const bool bNeedRefreshSideUI = (!bGetData); |
| | | if (m_pViewSideDimensionSetting && bNeedUpdateSideDim) { |
| | | if (bNeedRefreshSideUI) { |
| | | m_pViewSideDimensionSetting->RefreshSideUI(TRUE); |
| | | } |
| | | m_pViewSideDimensionSetting->UpdateRecipe(bGetData); |
| | | } |
| | | |
| | | if(m_pViewSideExceptionSetting != NULL) |
| | | m_pViewSideExceptionSetting->UpdateRecipe(bGetData); |
| | | UpdateChild(m_pViewSideNotchSetting); |
| | | UpdateChild(m_pViewSideExceptionSetting); |
| | | UpdateChild(m_pViewSideUserDefectSetting); |
| | | |
| | | if(m_pViewSideUserDefectSetting != NULL) |
| | | m_pViewSideUserDefectSetting->UpdateRecipe(bGetData); |
| | | if (!bGetData) { |
| | | UpdateData(FALSE); |
| | | } |
| | | } |
| | | |
| | |
| | | nRows = 14; |
| | | break; |
| | | case eRcp_InsType_RipThickness: |
| | | nRows = 10; |
| | | nRows = 15; |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | vecParams.push_back(strTemp); |
| | | strTemp.Format(_T("%s Ins. B Offset"), g_strInsType[m_eSelectInsType]); |
| | | vecParams.push_back(strTemp); |
| | | strTemp.Format(_T("%s Ins. Use (0:OFF/1:ON)"), g_strInsType[m_eSelectInsType]); |
| | | vecParams.push_back(strTemp); |
| | | strTemp.Format(_T("%s Ins. Range (um)"), g_strInsType[m_eSelectInsType]); |
| | | vecParams.push_back(strTemp); |
| | | strTemp.Format(_T("%s Ins. SideLine Offset (um)"), g_strInsType[m_eSelectInsType]); |
| | | vecParams.push_back(strTemp); |
| | | strTemp.Format(_T("%s Ins. Min Thres"), g_strInsType[m_eSelectInsType]); |
| | | vecParams.push_back(strTemp); |
| | | strTemp.Format(_T("%s Ins. Max Thres"), g_strInsType[m_eSelectInsType]); |
| | | vecParams.push_back(strTemp); |
| | | |
| | | CLanguageControl* pLanguageControl = g_pStatus->m_pLanguageControl; |
| | | |
| | |
| | | nRows = 11; |
| | | break; |
| | | case eRcp_InsType_RipThickness: |
| | | nRows = 7; |
| | | nRows = 10; |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | } |
| | | else if (eRcp_InsType_RipThickness == m_eSelectInsType) { |
| | | std::vector<CString> vecParams; |
| | | strTemp.Format(_T("Glass Size Min um"), g_strInsType[m_eSelectInsType]); |
| | | strTemp.Format(_T("Glass %s Size Min um"), g_strInsType[m_eSelectInsType]); |
| | | vecParams.push_back(strTemp); |
| | | strTemp.Format(_T("Glass Size Max um"), g_strInsType[m_eSelectInsType]); |
| | | strTemp.Format(_T("Glass %s Size Max um"), g_strInsType[m_eSelectInsType]); |
| | | vecParams.push_back(strTemp); |
| | | strTemp.Format(_T("Left Rip Size Min um"), g_strInsType[m_eSelectInsType]); |
| | | strTemp.Format(_T("Left %s Rip Size Min um"), g_strInsType[m_eSelectInsType]); |
| | | vecParams.push_back(strTemp); |
| | | strTemp.Format(_T("Left Rip Size Max um"), g_strInsType[m_eSelectInsType]); |
| | | strTemp.Format(_T("Left %s Rip Size Max um"), g_strInsType[m_eSelectInsType]); |
| | | vecParams.push_back(strTemp); |
| | | strTemp.Format(_T("Right Rip Size Min um"), g_strInsType[m_eSelectInsType]); |
| | | strTemp.Format(_T("Right %s Rip Size Min um"), g_strInsType[m_eSelectInsType]); |
| | | vecParams.push_back(strTemp); |
| | | strTemp.Format(_T("Right Rip Size Max um"), g_strInsType[m_eSelectInsType]); |
| | | strTemp.Format(_T("Right %s Rip Size Max um"), g_strInsType[m_eSelectInsType]); |
| | | vecParams.push_back(strTemp); |
| | | strTemp.Format(_T("%s Rip Judge Size Min X um"), g_strInsType[m_eSelectInsType]); |
| | | vecParams.push_back(strTemp); |
| | | strTemp.Format(_T("%s Rip Judge Size Min Y um"), g_strInsType[m_eSelectInsType]); |
| | | vecParams.push_back(strTemp); |
| | | strTemp.Format(_T("%s Rip Judge Mode (0:NoUse/1:OR/2:AND)"), g_strInsType[m_eSelectInsType]); |
| | | vecParams.push_back(strTemp); |
| | | |
| | | CLanguageControl* pLanguageControl = g_pStatus->m_pLanguageControl; |
| | |
| | | m_SideInspectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(uCellColor); |
| | | strTemp.Format(_T("%d"), rip.m_nBottomOffset); |
| | | m_SideInspectInfo.SetItemText(nRowIdx++, nColIdx, strTemp); |
| | | |
| | | // 10. RIP Inspect Use |
| | | if (rip.m_bRipUseInspect) m_SideInspectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(RGB(50, 255, 50)); |
| | | else m_SideInspectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(RGB(255, 50, 50)); |
| | | strTemp.Format(_T("%d"), rip.m_bRipUseInspect); |
| | | m_SideInspectInfo.SetItemText(nRowIdx++, nColIdx, strTemp); |
| | | |
| | | // 11. RIP Inspect Range |
| | | m_SideInspectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(uCellColor); |
| | | strTemp.Format(_T("%d"), rip.m_nRipInspect_Range_um); |
| | | m_SideInspectInfo.SetItemText(nRowIdx++, nColIdx, strTemp); |
| | | |
| | | // 12. RIP Inspect SideLine Offset |
| | | m_SideInspectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(uCellColor); |
| | | strTemp.Format(_T("%d"), rip.m_nRipInspect_SideLine_Offset_um); |
| | | m_SideInspectInfo.SetItemText(nRowIdx++, nColIdx, strTemp); |
| | | |
| | | // 13. RIP Min Threshold |
| | | m_SideInspectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(uCellColor); |
| | | strTemp.Format(_T("%d"), rip.m_nRipMin_Threshold); |
| | | m_SideInspectInfo.SetItemText(nRowIdx++, nColIdx, strTemp); |
| | | |
| | | // 14. RIP Min Threshold |
| | | m_SideInspectInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(uCellColor); |
| | | strTemp.Format(_T("%d"), rip.m_nRipMax_Threshold); |
| | | m_SideInspectInfo.SetItemText(nRowIdx++, nColIdx, strTemp); |
| | | } |
| | | } |
| | | |
| | |
| | | // 9. B Offset |
| | | strTemp = m_SideInspectInfo.GetItemText(nRowIdx++, nColIdx); |
| | | rip.m_nBottomOffset = _wtoi(strTemp); |
| | | |
| | | // 10. RIP Inspect Use |
| | | strTemp = m_SideInspectInfo.GetItemText(nRowIdx++, nColIdx); |
| | | rip.m_bRipUseInspect = _wtoi(strTemp); |
| | | |
| | | // 11. RIP Inspect Range |
| | | strTemp = m_SideInspectInfo.GetItemText(nRowIdx++, nColIdx); |
| | | rip.m_nRipInspect_Range_um = _wtoi(strTemp); |
| | | |
| | | // 12. RIP Inspect SideLine Offset |
| | | strTemp = m_SideInspectInfo.GetItemText(nRowIdx++, nColIdx); |
| | | rip.m_nRipInspect_SideLine_Offset_um = _wtoi(strTemp); |
| | | |
| | | // 13. RIP Min Threshold |
| | | strTemp = m_SideInspectInfo.GetItemText(nRowIdx++, nColIdx); |
| | | rip.m_nRipMin_Threshold = _wtoi(strTemp); |
| | | |
| | | // 14. RIP Min Threshold |
| | | strTemp = m_SideInspectInfo.GetItemText(nRowIdx++, nColIdx); |
| | | rip.m_nRipMax_Threshold = _wtoi(strTemp); |
| | | } |
| | | } |
| | | } |
| | |
| | | m_JudgementInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(uCellColor); |
| | | strTemp.Format(_T("%d"), rip.m_nRightRipSizeMax_um); |
| | | m_JudgementInfo.SetItemText(nRowIdx++, nColIdx, strTemp); |
| | | // 7. Rip chip Size Min um |
| | | m_JudgementInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(uCellColor); |
| | | strTemp.Format(_T("%d"), rip.m_nRipJudge_Size_Min_X_um); |
| | | m_JudgementInfo.SetItemText(nRowIdx++, nColIdx, strTemp); |
| | | // 8. Rip chip Size Max um |
| | | m_JudgementInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(uCellColor); |
| | | strTemp.Format(_T("%d"), rip.m_nRipJudge_Size_Min_Y_um); |
| | | m_JudgementInfo.SetItemText(nRowIdx++, nColIdx, strTemp); |
| | | // 9. Rip chip OR/AND |
| | | m_JudgementInfo.GetCell(nRowIdx, nColIdx)->SetBackClr(uCellColor); |
| | | strTemp.Format(_T("%d"), rip.m_nRipJudge_Size_Min_OR_AND); |
| | | m_JudgementInfo.SetItemText(nRowIdx++, nColIdx, strTemp); |
| | | } |
| | | } |
| | | |
| | |
| | | // 6. Right Rip Size Max um |
| | | strTemp = m_JudgementInfo.GetItemText(nRowIdx++, nColIdx); |
| | | rip.m_nRightRipSizeMax_um = _wtoi(strTemp); |
| | | // 7. Rip chip Size Min um |
| | | strTemp = m_JudgementInfo.GetItemText(nRowIdx++, nColIdx); |
| | | rip.m_nRipJudge_Size_Min_X_um = _wtoi(strTemp); |
| | | // 8. Rip chip Size Max um |
| | | strTemp = m_JudgementInfo.GetItemText(nRowIdx++, nColIdx); |
| | | rip.m_nRipJudge_Size_Min_Y_um = _wtoi(strTemp); |
| | | // 9. Rip chip OR/AND |
| | | strTemp = m_JudgementInfo.GetItemText(nRowIdx++, nColIdx); |
| | | rip.m_nRipJudge_Size_Min_OR_AND = _wtoi(strTemp); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | void CViewMain_Recipe::ClickButtonOpenDimensionSettingView() |
| | | { |
| | | if(m_pViewSideDimensionSetting == NULL) |
| | | if (m_pViewSideDimensionSetting == NULL) { |
| | | return; |
| | | } |
| | | |
| | | m_pViewSideDimensionSetting->SetGlassData(m_pGlassData); |
| | | m_pViewSideDimensionSetting->ShowWindow(SW_SHOW); |