Merge branch 'feature/#4528_CF_AOI_Review_Motor_Offset_기능_추가' into develop
# Conflicts:
# DitGlassRawMessenger/bin/DitGlassRawMessenger_x64.exe
# DitGlassRawMessenger/bin/DitGlassRawMessenger_x64.pdb
| | |
| | | ///////////////////////////////////////////////////////////////////////////// |
| | | // GridCell Attributes |
| | | |
| | | void CGridCell::operator=(const CGridCell& cell) |
| | | void CGridCell::operator=(CGridCell& cell) |
| | | { |
| | | if (this != &cell) CGridCellBase::operator=(cell); |
| | | } |
| | |
| | | |
| | | ///////////////////////////////////////////////////////////////////////////// |
| | | // GridCellBase Operations |
| | | |
| | | void CGridCellBase::Reset() |
| | | { |
| | | m_Hide=false; |
| | | m_nState = 0; |
| | | m_MergeRange.Set(); |
| | | m_IsMergeWithOthers=false; |
| | | m_MergeCellID.row=-1; |
| | | m_MergeCellID.col=-1; |
| | | |
| | | |
| | | } |
| | | |
| | | void CGridCellBase::operator=(const CGridCellBase& cell) |
| | | void CGridCellBase::operator=( CGridCellBase& cell) |
| | | { |
| | | if (this == &cell) return; |
| | | |
| | |
| | | SetBackClr(cell.GetBackClr()); |
| | | SetFont(cell.IsDefaultFont()? NULL : cell.GetFont()); |
| | | SetMargin(cell.GetMargin()); |
| | | //Used for merge cells |
| | | //by Huang Wei |
| | | SetMergeCellID(cell.GetMergeCellID()); |
| | | SetMergeRange(cell.GetMergeRange()); |
| | | Show(cell.IsShow()); |
| | | } |
| | | |
| | | ///////////////////////////////////////////////////////////////////////////// |
| | |
| | | { |
| | | // Note - all through this function we totally brutalise 'rect'. Do not |
| | | // depend on it's value being that which was passed in. |
| | | |
| | | //Used for merge cells |
| | | //by Huang Wei |
| | | if( m_Hide && !IsMerged()) |
| | | { |
| | | return TRUE; |
| | | } |
| | | |
| | | |
| | | CGridCtrl* pGrid = GetGrid(); |
| | | ASSERT(pGrid); |
| | |
| | | rect.bottom--; |
| | | } |
| | | |
| | | //rect.DeflateRect(0,1,1,1); - Removed by Yogurt |
| | | rect.DeflateRect(0,1,1,1); |
| | | } |
| | | else if ((GetState() & GVIS_SELECTED)) |
| | | { |
| | |
| | | pDC->SelectObject(pFont); |
| | | } |
| | | |
| | | //rect.DeflateRect(GetMargin(), 0); - changed by Yogurt |
| | | rect.DeflateRect(GetMargin(), GetMargin()); |
| | | rect.right++; |
| | | rect.bottom++; |
| | | rect.DeflateRect(GetMargin(), 0); |
| | | |
| | | if (pGrid->GetImageList() && GetImage() >= 0) |
| | | { |
| | |
| | | BOOL bVertical = (GetFont()->lfEscapement == 900); |
| | | |
| | | // Only draw if it'll fit! |
| | | //if (size.cx + rect.left < rect.right + (int)(2*GetMargin())) - changed / Yogurt |
| | | if (size.cx + rect.left < rect.right) |
| | | if (size.cx + rect.left < rect.right + (int)(2*GetMargin())) |
| | | { |
| | | int nTriangleBase = rect.bottom - nOffset - size.cy; // Triangle bottom right |
| | | //int nTriangleBase = (rect.top + rect.bottom - size.cy)/2; // Triangle middle right |
| | |
| | | // printed correctly. |
| | | BOOL CGridCellBase::PrintCell(CDC* pDC, int /*nRow*/, int /*nCol*/, CRect rect) |
| | | { |
| | | //Used for merge cells |
| | | //by Huang Wei |
| | | if( m_Hide && !IsMerged()) |
| | | { |
| | | return TRUE; |
| | | } |
| | | |
| | | #if defined(_WIN32_WCE_NO_PRINTING) || defined(GRIDCONTROL_NO_PRINTING) |
| | | return FALSE; |
| | | #else |
| | |
| | | int nSavedDC = pDC->SaveDC(); |
| | | |
| | | pDC->SetBkMode(TRANSPARENT); |
| | | //Used for merge cells |
| | | //by Huang Wei |
| | | rect.InflateRect(1,1); |
| | | pDC->Rectangle(rect); |
| | | rect.DeflateRect(1,1); |
| | | |
| | | if (pGrid->GetShadedPrintOut()) |
| | | { |
| | |
| | | return pGrid->SendMessageToParent(nRow, nCol, nMessage); |
| | | else |
| | | return 0; |
| | | } |
| | | } |
| | | //Used for merge cells |
| | | //by Huang Wei |
| | | void CGridCellBase::Show(bool IsShow) |
| | | { |
| | | m_Hide=!IsShow; |
| | | } |
| | | //Used for merge cells |
| | | //by Huang Wei |
| | | void CGridCellBase::SetMergeRange(CCellRange range) |
| | | { |
| | | m_MergeRange=range; |
| | | } |
| | | //Used for merge cells |
| | | //by Huang Wei |
| | | CCellRange CGridCellBase::GetMergeRange() |
| | | { |
| | | return m_MergeRange; |
| | | } |
| | | //Used for merge cells |
| | | //by Huang Wei |
| | | bool CGridCellBase::IsMerged() |
| | | { |
| | | return m_MergeRange.Count()>1; |
| | | } |
| | | //Used for merge cells |
| | | //by Huang Wei |
| | | void CGridCellBase::SetMergeCellID(CCellID cell) |
| | | { |
| | | m_MergeCellID=cell; |
| | | if(cell.row!=-1) |
| | | m_IsMergeWithOthers=true; |
| | | else |
| | | m_IsMergeWithOthers=false; |
| | | |
| | | } |
| | | //Used for merge cells |
| | | //by Huang Wei |
| | | CCellID CGridCellBase::GetMergeCellID() |
| | | { |
| | | return m_MergeCellID; |
| | | } |
| | | //Used for merge cells |
| | | //by Huang Wei |
| | | bool CGridCellBase::IsMergeWithOthers() |
| | | { |
| | | return m_IsMergeWithOthers; |
| | | } |
| | | //Used for merge cells |
| | | //by Huang Wei |
| | | bool CGridCellBase::IsShow() |
| | | { |
| | | return !m_Hide; |
| | | } |
| | | //Used for merge cells |
| | | //by Huang Wei |
| | | void CGridCellBase::UnMerge() |
| | | { |
| | | m_Hide=false; |
| | | m_MergeRange.Set(); |
| | | m_IsMergeWithOthers=false; |
| | | m_MergeCellID.row=-1; |
| | | m_MergeCellID.col=-1; |
| | | } |
| | |
| | | ///////////////////////////////////////////////////////////////////////////// |
| | | // CGridCtrl |
| | | |
| | | CCellID CGridCtrl::GetMergeCellID(CCellID cell) |
| | | { |
| | | CGridCellBase *pCell = (CGridCellBase*)GetCell(cell); |
| | | if (pCell && pCell->IsMergeWithOthers()) |
| | | return pCell->GetMergeCellID(); |
| | | return cell; |
| | | } |
| | | |
| | | int CGridCtrl::GetMergeCellHeight(CCellID cell) |
| | | { |
| | | CCellID mergecell = GetMergeCellID(cell); |
| | | CGridCellBase *pCell = (CGridCellBase*)GetCell(mergecell); |
| | | if (!pCell->IsMerged()) |
| | | return GetRowHeight(cell.row); |
| | | int height = 0; |
| | | for (int mergerow = pCell->GetMergeRange().GetMaxRow();mergerow >= pCell->GetMergeRange().GetMinRow();mergerow--) |
| | | { |
| | | height += GetRowHeight(mergerow); |
| | | } |
| | | return height; |
| | | } |
| | | |
| | | CGridCtrl::CGridCtrl(int nRows, int nCols, int nFixedRows, int nFixedCols) |
| | | { |
| | | RegisterWindowClass(); |
| | |
| | | |
| | | if (!(::GetClassInfo(hInst, GRIDCTRL_CLASSNAME, &wndcls))) |
| | | { |
| | | // otherwise we need to register a new class |
| | | wndcls.style = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW; |
| | | // otherwise we need to register a new class |
| | | //< SWK 20201123 - #2803 MOD > |
| | | // wndcls.style = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW; |
| | | wndcls.style = CS_GLOBALCLASS | CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW; |
| | | wndcls.lpfnWndProc = ::DefWindowProc; |
| | | wndcls.cbClsExtra = wndcls.cbWndExtra = 0; |
| | | wndcls.hInstance = hInst; |
| | |
| | | if (GetVirtualMode()) |
| | | SendCacheHintToParent(VisCellRange); |
| | | |
| | | // draw top-left cells 0..m_nFixedRows-1, 0..m_nFixedCols-1 |
| | | rect.bottom = -1; |
| | | for (row = 0; row < m_nFixedRows; row++) |
| | | { |
| | | if (GetRowHeight(row) <= 0) continue; |
| | | CPen pen; |
| | | pen.CreatePen(PS_SOLID, 0, m_crGridLineColour); |
| | | pDC->SelectObject(&pen); |
| | | |
| | | rect.top = rect.bottom+1; |
| | | rect.bottom = rect.top + GetRowHeight(row)-1; |
| | | rect.right = -1; |
| | | // draw vertical lines (drawn at ends of cells) |
| | | if (m_nGridLines == GVL_BOTH || m_nGridLines == GVL_VERT) |
| | | { |
| | | int x = nFixedColWidth; |
| | | for (col = minVisibleCol; col <= maxVisibleCol; col++) |
| | | { |
| | | if (GetColumnWidth(col) <= 0) continue; |
| | | |
| | | for (col = 0; col < m_nFixedCols; col++) |
| | | { |
| | | if (GetColumnWidth(col) <= 0) continue; |
| | | x += GetColumnWidth(col); |
| | | pDC->MoveTo(x - 1, nFixedRowHeight); |
| | | pDC->LineTo(x - 1, VisRect.bottom); |
| | | } |
| | | } |
| | | |
| | | rect.left = rect.right+1; |
| | | rect.right = rect.left + GetColumnWidth(col)-1; |
| | | // draw horizontal lines (drawn at bottom of each cell) |
| | | if (m_nGridLines == GVL_BOTH || m_nGridLines == GVL_HORZ) |
| | | { |
| | | int y = nFixedRowHeight; |
| | | for (row = minVisibleRow; row <= maxVisibleRow; row++) |
| | | { |
| | | if (GetRowHeight(row) <= 0) continue; |
| | | |
| | | pCell = GetCell(row, col); |
| | | if (pCell) |
| | | y += GetRowHeight(row); |
| | | pDC->MoveTo(nFixedColWidth, y - 1); |
| | | pDC->LineTo(VisRect.right, y - 1); |
| | | } |
| | | } |
| | | |
| | | pDC->SelectStockObject(NULL_PEN); |
| | | |
| | | // draw rest of non-fixed cells |
| | | rect.bottom = nFixedRowHeight - 1; |
| | | for (row = minVisibleRow; row <= maxVisibleRow; row++) |
| | | { |
| | | if (GetRowHeight(row) <= 0) continue; |
| | | |
| | | rect.top = rect.bottom + 1; |
| | | rect.bottom = rect.top + GetRowHeight(row) - 1; |
| | | |
| | | // rect.bottom = bottom pixel of previous row |
| | | if (rect.top > clipRect.bottom) |
| | | break; // Gone past cliprect |
| | | if (rect.bottom < clipRect.top) |
| | | continue; // Reached cliprect yet? |
| | | |
| | | rect.right = nFixedColWidth - 1; |
| | | for (col = minVisibleCol; col <= maxVisibleCol; col++) |
| | | { |
| | | if (GetColumnWidth(col) <= 0) continue; |
| | | |
| | | rect.left = rect.right + 1; |
| | | rect.right = rect.left + GetColumnWidth(col) - 1; |
| | | |
| | | if (rect.left > clipRect.right) |
| | | break; // gone past cliprect |
| | | if (rect.right < clipRect.left) |
| | | continue; // Reached cliprect yet? |
| | | |
| | | pCell = GetCell(row, col); |
| | | // TRACE(_T("Cell %d,%d type: %s\n"), row, col, pCell->GetRuntimeClass()->m_lpszClassName); |
| | | if (pCell) |
| | | { |
| | | pCell->SetCoords(row,col); |
| | | pCell->Draw(pDC, row, col, rect, FALSE); |
| | | //Used for merge cells |
| | | //by Huang Wei |
| | | |
| | | if (!pCell->IsMerged()) |
| | | { |
| | | if (!pCell->IsMergeWithOthers()) |
| | | { |
| | | pCell->SetCoords(row, col); |
| | | pCell->Draw(pDC, row, col, rect, FALSE); |
| | | } |
| | | else |
| | | { |
| | | CGridCellBase* pMergedCell = GetCell(pCell->GetMergeCellID()); |
| | | CRect mergerect = rect; |
| | | if (GetCellRangeRect(pMergedCell->m_MergeRange, &mergerect)) |
| | | { |
| | | mergerect.DeflateRect(0, 0, 1, 1); |
| | | pMergedCell->SetCoords(pCell->GetMergeCellID().row, pCell->GetMergeCellID().col); |
| | | pMergedCell->Draw(pDC, pCell->GetMergeCellID().row, pCell->GetMergeCellID().col, mergerect, TRUE); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | CRect mergerect = rect; |
| | | |
| | | if (GetCellRangeRect(pCell->m_MergeRange, &mergerect)) |
| | | { |
| | | mergerect.DeflateRect(0, 0, 1, 1); |
| | | pCell->SetCoords(row, col); |
| | | pCell->Draw(pDC, row, col, mergerect, TRUE); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // draw fixed column cells: m_nFixedRows..n, 0..m_nFixedCols-1 |
| | | rect.bottom = nFixedRowHeight-1; |
| | | for (row = minVisibleRow; row <= maxVisibleRow; row++) |
| | | { |
| | | if (GetRowHeight(row) <= 0) continue; |
| | | // draw fixed column cells: m_nFixedRows..n, 0..m_nFixedCols-1 |
| | | rect.bottom = nFixedRowHeight - 1; |
| | | for (row = minVisibleRow; row <= maxVisibleRow; row++) |
| | | { |
| | | if (GetRowHeight(row) <= 0) continue; |
| | | |
| | | rect.top = rect.bottom+1; |
| | | rect.bottom = rect.top + GetRowHeight(row)-1; |
| | | rect.top = rect.bottom + 1; |
| | | rect.bottom = rect.top + GetRowHeight(row) - 1; |
| | | |
| | | // rect.bottom = bottom pixel of previous row |
| | | if (rect.top > clipRect.bottom) |
| | | break; // Gone past cliprect |
| | | if (rect.bottom < clipRect.top) |
| | | continue; // Reached cliprect yet? |
| | | // rect.bottom = bottom pixel of previous row |
| | | if (rect.top > clipRect.bottom) |
| | | break; // Gone past cliprect |
| | | if (rect.bottom < clipRect.top) |
| | | continue; // Reached cliprect yet? |
| | | |
| | | rect.right = -1; |
| | | for (col = 0; col < m_nFixedCols; col++) |
| | | { |
| | | if (GetColumnWidth(col) <= 0) continue; |
| | | rect.right = -1; |
| | | for (col = 0; col < m_nFixedCols; col++) |
| | | { |
| | | if (GetColumnWidth(col) <= 0) continue; |
| | | |
| | | rect.left = rect.right+1; |
| | | rect.right = rect.left + GetColumnWidth(col)-1; |
| | | rect.left = rect.right + 1; |
| | | rect.right = rect.left + GetColumnWidth(col) - 1; |
| | | |
| | | if (rect.left > clipRect.right) |
| | | break; // gone past cliprect |
| | | if (rect.right < clipRect.left) |
| | | continue; // Reached cliprect yet? |
| | | if (rect.left > clipRect.right) |
| | | break; // gone past cliprect |
| | | if (rect.right < clipRect.left) |
| | | continue; // Reached cliprect yet? |
| | | |
| | | pCell = GetCell(row, col); |
| | | if (pCell) |
| | | pCell = GetCell(row, col); |
| | | // if (pCell) |
| | | //{ |
| | | // pCell->SetCoords(row,col); |
| | | // pCell->Draw(pDC, row, col, rect, TRUE); |
| | | //} |
| | | if (pCell) |
| | | { |
| | | pCell->SetCoords(row,col); |
| | | pCell->Draw(pDC, row, col, rect, FALSE); |
| | | //Used for merge cells |
| | | //by Huang Wei |
| | | |
| | | if (!pCell->IsMerged()) |
| | | { |
| | | if (!pCell->IsMergeWithOthers()) |
| | | { |
| | | pCell->SetCoords(row, col); |
| | | pCell->Draw(pDC, row, col, rect, FALSE); |
| | | } |
| | | else |
| | | { |
| | | CGridCellBase* pMergedCell = GetCell(pCell->GetMergeCellID()); |
| | | CRect mergerect = rect; |
| | | if (GetCellRangeRect(pMergedCell->m_MergeRange, &mergerect)) |
| | | { |
| | | mergerect.DeflateRect(0, 0, 1, 1); |
| | | pMergedCell->SetCoords(pCell->GetMergeCellID().row, pCell->GetMergeCellID().col); |
| | | pMergedCell->Draw(pDC, pCell->GetMergeCellID().row, pCell->GetMergeCellID().col, mergerect, TRUE); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | CRect mergerect = rect; |
| | | |
| | | if (GetCellRangeRect(pCell->m_MergeRange, &mergerect)) |
| | | { |
| | | mergerect.DeflateRect(0, 0, 1, 1); |
| | | pCell->SetCoords(row, col); |
| | | pCell->Draw(pDC, row, col, mergerect, TRUE); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // draw fixed row cells 0..m_nFixedRows, m_nFixedCols..n |
| | | rect.bottom = -1; |
| | | for (row = 0; row < m_nFixedRows; row++) |
| | | { |
| | | if (GetRowHeight(row) <= 0) continue; |
| | | // draw fixed row cells 0..m_nFixedRows, m_nFixedCols..n |
| | | rect.bottom = -1; |
| | | for (row = 0; row < m_nFixedRows; row++) |
| | | { |
| | | if (GetRowHeight(row) <= 0) continue; |
| | | |
| | | rect.top = rect.bottom+1; |
| | | rect.bottom = rect.top + GetRowHeight(row)-1; |
| | | rect.top = rect.bottom + 1; |
| | | rect.bottom = rect.top + GetRowHeight(row) - 1; |
| | | |
| | | // rect.bottom = bottom pixel of previous row |
| | | if (rect.top > clipRect.bottom) |
| | | break; // Gone past cliprect |
| | | if (rect.bottom < clipRect.top) |
| | | continue; // Reached cliprect yet? |
| | | // rect.bottom = bottom pixel of previous row |
| | | if (rect.top > clipRect.bottom) |
| | | break; // Gone past cliprect |
| | | if (rect.bottom < clipRect.top) |
| | | continue; // Reached cliprect yet? |
| | | |
| | | rect.right = nFixedColWidth-1; |
| | | for (col = minVisibleCol; col <= maxVisibleCol; col++) |
| | | { |
| | | if (GetColumnWidth(col) <= 0) continue; |
| | | rect.right = nFixedColWidth - 1; |
| | | for (col = minVisibleCol; col <= maxVisibleCol; col++) |
| | | { |
| | | if (GetColumnWidth(col) <= 0) continue; |
| | | |
| | | rect.left = rect.right+1; |
| | | rect.right = rect.left + GetColumnWidth(col)-1; |
| | | rect.left = rect.right + 1; |
| | | rect.right = rect.left + GetColumnWidth(col) - 1; |
| | | |
| | | if (rect.left > clipRect.right) |
| | | break; // gone past cliprect |
| | | if (rect.right < clipRect.left) |
| | | continue; // Reached cliprect yet? |
| | | if (rect.left > clipRect.right) |
| | | break; // gone past cliprect |
| | | if (rect.right < clipRect.left) |
| | | continue; // Reached cliprect yet? |
| | | |
| | | pCell = GetCell(row, col); |
| | | if (pCell) |
| | | pCell = GetCell(row, col); |
| | | // if (pCell) |
| | | //{ |
| | | // pCell->SetCoords(row,col); |
| | | // pCell->Draw(pDC, row, col, rect, TRUE); |
| | | //} |
| | | if (pCell) |
| | | { |
| | | pCell->SetCoords(row,col); |
| | | pCell->Draw(pDC, row, col, rect, FALSE); |
| | | //Used for merge cells |
| | | //by Huang Wei |
| | | |
| | | if (!pCell->IsMerged()) |
| | | { |
| | | if (!pCell->IsMergeWithOthers()) |
| | | { |
| | | pCell->SetCoords(row, col); |
| | | pCell->Draw(pDC, row, col, rect, FALSE); |
| | | } |
| | | else |
| | | { |
| | | CGridCellBase* pMergedCell = GetCell(pCell->GetMergeCellID()); |
| | | CRect mergerect = rect; |
| | | if (GetCellRangeRect(pMergedCell->m_MergeRange, &mergerect)) |
| | | { |
| | | mergerect.DeflateRect(0, 0, 1, 1); |
| | | pMergedCell->SetCoords(pCell->GetMergeCellID().row, pCell->GetMergeCellID().col); |
| | | pMergedCell->Draw(pDC, pCell->GetMergeCellID().row, pCell->GetMergeCellID().col, mergerect, TRUE); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | CRect mergerect = rect; |
| | | |
| | | if (GetCellRangeRect(pCell->m_MergeRange, &mergerect)) |
| | | { |
| | | mergerect.DeflateRect(0, 0, 1, 1); |
| | | pCell->SetCoords(row, col); |
| | | pCell->Draw(pDC, row, col, mergerect, TRUE); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | /* |
| | | // draw top-left cells 0..m_nFixedRows-1, 0..m_nFixedCols-1 |
| | | rect.bottom = -1; |
| | | for (row = 0; row < m_nFixedRows; row++) |
| | | { |
| | | if (GetRowHeight(row) <= 0) continue; |
| | | |
| | | // draw rest of non-fixed cells |
| | | rect.bottom = nFixedRowHeight-1; |
| | | for (row = minVisibleRow; row <= maxVisibleRow; row++) |
| | | { |
| | | if (GetRowHeight(row) <= 0) continue; |
| | | rect.top = rect.bottom+1; |
| | | rect.bottom = rect.top + GetRowHeight(row)-1; |
| | | rect.right = -1; |
| | | |
| | | rect.top = rect.bottom+1; |
| | | rect.bottom = rect.top + GetRowHeight(row)-1; |
| | | |
| | | // rect.bottom = bottom pixel of previous row |
| | | if (rect.top > clipRect.bottom) |
| | | break; // Gone past cliprect |
| | | if (rect.bottom < clipRect.top) |
| | | continue; // Reached cliprect yet? |
| | | |
| | | rect.right = nFixedColWidth-1; |
| | | for (col = minVisibleCol; col <= maxVisibleCol; col++) |
| | | { |
| | | if (GetColumnWidth(col) <= 0) continue; |
| | | |
| | | rect.left = rect.right+1; |
| | | rect.right = rect.left + GetColumnWidth(col)-1; |
| | | |
| | | if (rect.left > clipRect.right) |
| | | break; // gone past cliprect |
| | | if (rect.right < clipRect.left) |
| | | continue; // Reached cliprect yet? |
| | | |
| | | pCell = GetCell(row, col); |
| | | // TRACE(_T("Cell %d,%d type: %s\n"), row, col, pCell->GetRuntimeClass()->m_lpszClassName); |
| | | if (pCell) |
| | | for (col = 0; col < m_nFixedCols; col++) |
| | | { |
| | | pCell->SetCoords(row,col); |
| | | pCell->Draw(pDC, row, col, rect, FALSE); |
| | | if (GetColumnWidth(col) <= 0) continue; |
| | | |
| | | rect.left = rect.right+1; |
| | | rect.right = rect.left + GetColumnWidth(col)-1; |
| | | |
| | | pCell = GetCell(row, col); |
| | | if (pCell) |
| | | { |
| | | pCell->SetCoords(row,col); |
| | | pCell->Draw(pDC, row, col, rect, FALSE); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | */ |
| | | // draw top-left cells 0..m_nFixedRows-1, 0..m_nFixedCols-1 |
| | | rect.bottom = -1; |
| | | for (row = 0; row < m_nFixedRows; row++) |
| | | { |
| | | if (GetRowHeight(row) <= 0) continue; |
| | | |
| | | rect.top = rect.bottom + 1; |
| | | rect.bottom = rect.top + GetRowHeight(row) - 1; |
| | | rect.right = -1; |
| | | |
| | | CPen pen; |
| | | pen.CreatePen(PS_SOLID, 0, m_crGridLineColour); |
| | | pDC->SelectObject(&pen); |
| | | for (col = 0; col < m_nFixedCols; col++) |
| | | { |
| | | if (GetColumnWidth(col) <= 0) continue; |
| | | |
| | | // draw vertical lines (drawn at ends of cells) |
| | | if (m_nGridLines == GVL_BOTH || m_nGridLines == GVL_VERT) |
| | | { |
| | | int x = nFixedColWidth; |
| | | for (col = minVisibleCol; col <= maxVisibleCol; col++) |
| | | { |
| | | if (GetColumnWidth(col) <= 0) continue; |
| | | rect.left = rect.right + 1; |
| | | rect.right = rect.left + GetColumnWidth(col) - 1; |
| | | |
| | | x += GetColumnWidth(col); |
| | | pDC->MoveTo(x-1, nFixedRowHeight); |
| | | pDC->LineTo(x-1, VisRect.bottom); |
| | | } |
| | | } |
| | | pCell = GetCell(row, col); |
| | | /* if (pCell) |
| | | { |
| | | pCell->SetCoords(row,col); |
| | | pCell->Draw(pDC, row, col, rect, FALSE); |
| | | }*/ |
| | | if (pCell) |
| | | { |
| | | //Used for merge cells by Huang Wei |
| | | //bugfix by Luther Bruck |
| | | |
| | | // draw horizontal lines (drawn at bottom of each cell) |
| | | if (m_nGridLines == GVL_BOTH || m_nGridLines == GVL_HORZ) |
| | | { |
| | | int y = nFixedRowHeight; |
| | | for (row = minVisibleRow; row <= maxVisibleRow; row++) |
| | | { |
| | | if (GetRowHeight(row) <= 0) continue; |
| | | if (!pCell->IsMerged()) |
| | | { |
| | | if (!pCell->IsMergeWithOthers()) |
| | | { |
| | | pCell->SetCoords(row, col); |
| | | pCell->Draw(pDC, row, col, rect, FALSE); |
| | | } |
| | | else |
| | | { |
| | | CGridCellBase* pMergedCell = GetCell(pCell->GetMergeCellID()); |
| | | CRect mergerect = rect; |
| | | if (GetCellRangeRect(pMergedCell->m_MergeRange, &mergerect)) |
| | | { |
| | | mergerect.DeflateRect(0, 0, 1, 1); |
| | | pMergedCell->SetCoords(pCell->GetMergeCellID().row, pCell->GetMergeCellID().col); |
| | | pMergedCell->Draw(pDC, pCell->GetMergeCellID().row, pCell->GetMergeCellID().col, mergerect, TRUE); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | CRect mergerect = rect; |
| | | |
| | | y += GetRowHeight(row); |
| | | pDC->MoveTo(nFixedColWidth, y-1); |
| | | pDC->LineTo(VisRect.right, y-1); |
| | | } |
| | | } |
| | | if (GetCellRangeRect(pCell->m_MergeRange, &mergerect)) |
| | | { |
| | | mergerect.DeflateRect(0, 0, 1, 1); |
| | | pCell->SetCoords(row, col); |
| | | pCell->Draw(pDC, row, col, mergerect, TRUE); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | pDC->SelectStockObject(NULL_PEN); |
| | | |
| | | // Let parent know it can discard it's data if it needs to. |
| | | if (GetVirtualMode()) |
| | |
| | | if (!GetCellOrigin(idCurrentCell, &start)) |
| | | return FALSE; |
| | | |
| | | int endy = start.y + GetRowHeight(idCurrentCell.row); |
| | | int endy = start.y + GetMergeCellHeight(idCurrentCell); |
| | | |
| | | if ((point.y - start.y < m_nResizeCaptureRange && idCurrentCell.row != 0) || |
| | | endy - point.y < m_nResizeCaptureRange) |
| | |
| | | if (!GetCellOrigin(idCurrentCell, &start)) |
| | | return FALSE; |
| | | |
| | | int endx = start.x + GetColumnWidth(idCurrentCell.col); |
| | | int endx = start.x + GetMergeCellWidth(idCurrentCell); |
| | | |
| | | if ((point.x - start.x < m_nResizeCaptureRange && idCurrentCell.col != 0) || |
| | | endx - point.x < m_nResizeCaptureRange) |
| | |
| | | cellID.row = -1; |
| | | else |
| | | cellID.row = row; |
| | | } |
| | | } |
| | | cellID = GetMergeCellID(cellID); |
| | | return cellID; |
| | | } |
| | | |
| | |
| | | if (nCol >= m_nFixedCols || nRow >= m_nFixedRows) |
| | | idTopLeft = GetTopleftNonFixedCell(); |
| | | |
| | | if ((nRow >= m_nFixedRows && nRow < idTopLeft.row) || |
| | | (nCol>= m_nFixedCols && nCol < idTopLeft.col)) |
| | | return FALSE; |
| | | //Merge the selected cells |
| | | //by Huang Wei |
| | | |
| | | //if ((nRow >= m_nFixedRows && nRow < idTopLeft.row) || |
| | | // (nCol>= m_nFixedCols && nCol < idTopLeft.col)) |
| | | // return FALSE; |
| | | |
| | | p->x = 0; |
| | | if (nCol < m_nFixedCols) // is a fixed column |
| | |
| | | { // is a scrollable data column |
| | | for (i = 0; i < m_nFixedCols; i++) |
| | | p->x += GetColumnWidth(i); |
| | | for (i = idTopLeft.col; i < nCol; i++) |
| | | p->x += GetColumnWidth(i); |
| | | //Merge the selected cells |
| | | //by Huang Wei |
| | | if(nCol>idTopLeft.col) |
| | | { |
| | | for (i = idTopLeft.col; i < nCol; i++) |
| | | p->x += GetColumnWidth(i); |
| | | } |
| | | else |
| | | { |
| | | for (i = nCol; i <idTopLeft.col ; i++) |
| | | p->x -= GetColumnWidth(i); |
| | | } |
| | | } |
| | | |
| | | p->y = 0; |
| | |
| | | { // is a scrollable data row |
| | | for (i = 0; i < m_nFixedRows; i++) |
| | | p->y += GetRowHeight(i); |
| | | for (i = idTopLeft.row; i < nRow; i++) |
| | | p->y += GetRowHeight(i); |
| | | //Merge the selected cells |
| | | //by Huang Wei |
| | | if(nRow>idTopLeft.row) |
| | | { |
| | | for (i = idTopLeft.row; i < nRow; i++) |
| | | p->y += GetRowHeight(i); |
| | | } |
| | | else |
| | | { |
| | | for (i = nRow; i <idTopLeft.row; i++) |
| | | p->y -= GetRowHeight(i); |
| | | } |
| | | } |
| | | |
| | | return TRUE; |
| | | } |
| | | // returns the top left point of the cell. Returns FALSE if cell not visible. |
| | | // don't consider cell's merge |
| | | BOOL CGridCtrl::GetCellOriginNoMerge(int nRow, int nCol, LPPOINT p) |
| | | { |
| | | int i; |
| | | |
| | | if (!IsValid(nRow, nCol)) |
| | | return FALSE; |
| | | |
| | | CCellID idTopLeft; |
| | | if (nCol >= m_nFixedCols || nRow >= m_nFixedRows) |
| | | idTopLeft = GetTopleftNonFixedCell(); |
| | | |
| | | if ((nRow >= m_nFixedRows && nRow < idTopLeft.row) || |
| | | (nCol>= m_nFixedCols && nCol < idTopLeft.col)) |
| | | return FALSE; |
| | | |
| | | p->x = 0; |
| | | if (nCol < m_nFixedCols) // is a fixed column |
| | | for (i = 0; i < nCol; i++) |
| | | p->x += GetColumnWidth(i); |
| | | else |
| | | { // is a scrollable data column |
| | | for (i = 0; i < m_nFixedCols; i++) |
| | | p->x += GetColumnWidth(i); |
| | | for (i = idTopLeft.col; i < nCol; i++) |
| | | p->x += GetColumnWidth(i); |
| | | } |
| | | |
| | | p->y = 0; |
| | | if (nRow < m_nFixedRows) // is a fixed row |
| | | for (i = 0; i < nRow; i++) |
| | | p->y += GetRowHeight(i); |
| | | else |
| | | { // is a scrollable data row |
| | | for (i = 0; i < m_nFixedRows; i++) |
| | | p->y += GetRowHeight(i); |
| | | for (i = idTopLeft.row; i < nRow; i++) |
| | | p->y += GetRowHeight(i); |
| | | } |
| | | |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CGridCtrl::GetCellOrigin(const CCellID& cell, LPPOINT p) |
| | |
| | | if (!GetCellOrigin(nRow, nCol, &CellOrigin)) |
| | | return FALSE; |
| | | |
| | | pRect->left = CellOrigin.x; |
| | | pRect->top = CellOrigin.y; |
| | | pRect->right = CellOrigin.x + GetColumnWidth(nCol)-1; |
| | | pRect->bottom = CellOrigin.y + GetRowHeight(nRow)-1; |
| | | |
| | | //Merge the selected cells |
| | | //by Huang Wei |
| | | CGridCellBase *pCell = (CGridCellBase*) GetCell(nRow,nCol); |
| | | |
| | | if(!pCell->IsMerged()) |
| | | { |
| | | pRect->left = CellOrigin.x; |
| | | pRect->top = CellOrigin.y; |
| | | pRect->right = CellOrigin.x + GetColumnWidth(nCol)-1; |
| | | pRect->bottom = CellOrigin.y + GetRowHeight(nRow)-1; |
| | | } |
| | | else |
| | | { |
| | | GetCellRangeRect(pCell->m_MergeRange,pRect); |
| | | } |
| | | //TRACE("Row %d, col %d: L %d, T %d, W %d, H %d: %d,%d - %d,%d\n", |
| | | // nRow,nCol, CellOrigin.x, CellOrigin.y, GetColumnWidth(nCol), GetRowHeight(nRow), |
| | | // pRect->left, pRect->top, pRect->right, pRect->bottom); |
| | |
| | | if (m_LeftClickDownPoint != point && (point.x != 0 || point.y != 0)) // 0 pt fix by email1@bierling.net |
| | | { |
| | | CPoint start; |
| | | //Used for merge cells |
| | | //by Huang Wei |
| | | m_LeftClickDownCell=GetMergeCellID(m_LeftClickDownCell); |
| | | if (!GetCellOrigin(m_LeftClickDownCell, &start)) |
| | | return; |
| | | |
| | | int nRowHeight = __max(point.y - start.y, m_bAllowRowHide? 0 : 1); |
| | | int nRowHeight = max(point.y - start.y, m_bAllowRowHide? 0 : 1); |
| | | //Used for merge cells |
| | | //by Huang Wei |
| | | int mergeheight=GetMergeCellHeight(m_LeftClickDownCell)-GetRowHeight(m_LeftClickDownCell.row); |
| | | |
| | | SetRowHeight(m_LeftClickDownCell.row, nRowHeight); |
| | | SetRowHeight(m_LeftClickDownCell.row, nRowHeight-mergeheight); |
| | | ResetScrollBars(); |
| | | Invalidate(); |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | void CGridCtrl::MergeCells(int nStartRow, int nStartCol, int nEndRow, int nEndCol) |
| | | { |
| | | for(int row=nStartRow;row<=nEndRow;row++) |
| | | { |
| | | for(int col=nStartCol;col<=nEndCol;col++) |
| | | { |
| | | CGridCellBase *pCell = (CGridCellBase*) GetCell(row,col); |
| | | pCell->Show(FALSE); |
| | | if(row==nStartRow && col==nStartCol) |
| | | { |
| | | CCellRange range(nStartRow, nStartCol, nEndRow, nEndCol); |
| | | pCell->SetMergeRange(range); |
| | | } |
| | | else |
| | | { |
| | | CCellID cell(nStartRow,nStartCol); |
| | | pCell->SetMergeCellID(cell); |
| | | } |
| | | |
| | | } |
| | | } |
| | | Invalidate(); |
| | | } |
| | | |
| | | int CGridCtrl::GetMergeCellWidth(CCellID cell) |
| | | { |
| | | CCellID mergecell = GetMergeCellID(cell); |
| | | CGridCellBase *pCell = (CGridCellBase*)GetCell(mergecell); |
| | | if (!pCell->IsMerged()) |
| | | return GetColumnWidth(cell.col); |
| | | int width = 0; |
| | | for (int mergecol = pCell->GetMergeRange().GetMaxCol();mergecol >= pCell->GetMergeRange().GetMinCol();mergecol--) |
| | | { |
| | | width += GetColumnWidth(mergecol); |
| | | } |
| | | return width; |
| | | } |
| | | |
| | | void CGridCtrl::OnKillFocus(CWnd* pNewWnd) |
| | | { |
| | | CWnd::OnKillFocus(pNewWnd); |
| | |
| | | <None Include="ReadMe.txt" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ClInclude Include="MotorCalculator.h" /> |
| | | <ClInclude Include="MotorCalibrator.h" /> |
| | | <ClInclude Include="..\Include\CHMotorCalibrator\MotorCalculator.h" /> |
| | | <ClInclude Include="..\Include\CHMotorCalibrator\MotorCalibrator.h" /> |
| | | <ClInclude Include="..\Include\CHMotorCalibrator\SPosition2D.h" /> |
| | | <ClInclude Include="Resource.h" /> |
| | | <ClInclude Include="SPosition2D.h" /> |
| | | <ClInclude Include="stdafx.h" /> |
| | | <ClInclude Include="targetver.h" /> |
| | | </ItemGroup> |
| | |
| | | <None Include="ReadMe.txt" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ClInclude Include="MotorCalculator.h"> |
| | | <Filter>í¤ë íì¼</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="MotorCalibrator.h"> |
| | | <Filter>í¤ë íì¼</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="Resource.h"> |
| | | <Filter>í¤ë íì¼</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="SPosition2D.h"> |
| | | <Filter>í¤ë íì¼</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="stdafx.h"> |
| | |
| | | <ClInclude Include="targetver.h"> |
| | | <Filter>í¤ë íì¼</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="..\Include\CHMotorCalibrator\MotorCalculator.h"> |
| | | <Filter>í¤ë íì¼</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="..\Include\CHMotorCalibrator\MotorCalibrator.h"> |
| | | <Filter>í¤ë íì¼</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="..\Include\CHMotorCalibrator\SPosition2D.h"> |
| | | <Filter>í¤ë íì¼</Filter> |
| | | </ClInclude> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ResourceCompile Include="CHMotorCalibrator.rc"> |
| | |
| | | |
| | | // Attributes |
| | | public: |
| | | void operator=(const CGridCell& cell); |
| | | void operator=(CGridCell& cell); |
| | | |
| | | virtual void SetText(LPCTSTR szText) { m_strText = szText; } |
| | | virtual void SetImage(int nImage) { m_nImage = nImage; } |
| | |
| | | #if _MSC_VER >= 1000 |
| | | #pragma once |
| | | #endif // _MSC_VER >= 1000 |
| | | #include "CellRange.h" |
| | | |
| | | class CGridCtrl; |
| | | |
| | |
| | | |
| | | // Operators |
| | | public: |
| | | virtual void operator=(const CGridCellBase& cell); |
| | | virtual void operator=(CGridCellBase& cell); |
| | | |
| | | // Operations |
| | | public: |
| | | virtual bool IsMerged(); |
| | | virtual void SetMergeRange(CCellRange range); |
| | | virtual void Show(bool IsShow); |
| | | virtual void Reset(); |
| | | |
| | | virtual BOOL Draw(CDC* pDC, int nRow, int nCol, CRect rect, BOOL bEraseBkgnd = TRUE); |
| | |
| | | virtual void OnDblClick( CPoint PointCellRelative); |
| | | virtual BOOL OnSetCursor(); |
| | | |
| | | public: |
| | | void UnMerge(); |
| | | virtual bool IsShow(); |
| | | virtual CCellRange GetMergeRange(); |
| | | virtual bool IsMergeWithOthers(); |
| | | virtual CCellID GetMergeCellID(); |
| | | virtual void SetMergeCellID(CCellID cell); |
| | | protected: |
| | | DWORD m_nState; // Cell state (selected/focus etc) |
| | | |
| | | private: |
| | | CCellRange m_MergeRange; |
| | | bool m_IsMergeWithOthers; |
| | | CCellID m_MergeCellID; |
| | | bool m_Hide; |
| | | }; |
| | | |
| | | //{{AFX_INSERT_LOCATION}} |
| | |
| | | friend class CGridCell; |
| | | friend class CGridCellBase; |
| | | |
| | | public: |
| | | CCellID GetMergeCellID(CCellID cell); |
| | | int GetMergeCellHeight(CCellID cell); |
| | | |
| | | // Construction |
| | | public: |
| | | CGridCtrl(int nRows = 0, int nCols = 0, int nFixedRows = 0, int nFixedCols = 0); |
| | |
| | | int GetColumnWidth(int nCol) const; |
| | | BOOL SetColumnWidth(int col, int width); |
| | | |
| | | BOOL GetCellOrigin(int nRow, int nCol, LPPOINT p); |
| | | BOOL GetCellOrigin(int nRow, int nCol, LPPOINT p); |
| | | BOOL GetCellOriginNoMerge(int nRow, int nCol, LPPOINT p); |
| | | BOOL GetCellOrigin(const CCellID& cell, LPPOINT p); |
| | | BOOL GetCellRect(int nRow, int nCol, LPRECT pRect); |
| | | BOOL GetCellRect(const CCellID& cell, LPRECT pRect); |
| | |
| | | // Grid cell Attributes |
| | | /////////////////////////////////////////////////////////////////////////////////// |
| | | public: |
| | | CGridCellBase* GetCell(int nRow, int nCol) const; // Get the actual cell! |
| | | CGridCellBase* GetCell(int nRow, int nCol) const; // Get the actual cell! |
| | | CGridCellBase* CGridCtrl::GetCell(CCellID cell); |
| | | |
| | | void SetModified(BOOL bModified = TRUE, int nRow = -1, int nCol = -1); |
| | | BOOL GetModified(int nRow = -1, int nCol = -1); |
| | |
| | | bool m_AllowSelectRowInFixedCol; |
| | | |
| | | public: |
| | | void MergeCells(int nStartRow, int nStartCol, int nEndRow, int nEndCol); |
| | | int GetMergeCellWidth(CCellID cell); |
| | | afx_msg void OnKillFocus(CWnd* pNewWnd); |
| | | }; |
| | | |
| | |
| | | return pRow->GetAt(m_arColOrder[nCol]); |
| | | } |
| | | |
| | | inline CGridCellBase * CGridCtrl::GetCell(CCellID cell) |
| | | { |
| | | return GetCell(cell.row, cell.col); |
| | | } |
| | | |
| | | inline BOOL CGridCtrl::SetCell(int nRow, int nCol, CGridCellBase* pCell) |
| | | { |
| | | if (GetVirtualMode()) |
| | |
| | | ON_BN_CLICKED(IDC_BUTTON5, &CDlgLogo::OnBnClickedButton5) |
| | | ON_BN_CLICKED(IDC_BUTTON6, &CDlgLogo::OnClickedButton6) |
| | | ON_BN_CLICKED(IDC_BUTTON_HW_SETTING_MODE, &CDlgLogo::OnBnClickedButtonHwSettingMode) |
| | | ON_BN_CLICKED(IDC_BUTTON_MOTOR_OFFSET_TOOL, &CDlgLogo::OnBnClickedButtonMotorOffsetTool) |
| | | END_MESSAGE_MAP() |
| | | |
| | | |
| | |
| | | g_pLog->DisplayMessage(_T("[ReviewProcessor] HW SettingMode Start")); |
| | | // TODO: ì¬ê¸°ì 컨í¸ë¡¤ ì림 ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | } |
| | | /* < KEJ 20230621 - #4528 ADD Start > */ |
| | | void CDlgLogo::OnBnClickedButtonMotorOffsetTool() |
| | | { |
| | | m_pDL2P->IDL2P_OpenMotorOffSetTool(); |
| | | g_pLog->DisplayMessage(_T("[ReviewProcessor] Motor Offset Open")); |
| | | } |
| | | /* < KEJ 20230621 - #4528 ADD End > */ |
| | |
| | | /*< LYW 20211112 - #3708 ADD Start >*/ |
| | | virtual void IDL2P_OpenHWSettingTool() = 0; |
| | | /*< LYW 20211112 - #3708 ADD End >*/ |
| | | virtual void IDL2P_OpenMotorOffSetTool() = 0; //< KEJ 20230621 - #4528 ADD > |
| | | //is manual Mode? |
| | | virtual BOOL IDL2P_IsManualProcessMode() = 0; |
| | | }; |
| | |
| | | afx_msg void OnClickedButton6(); |
| | | CButton m_ctrlHistory; |
| | | afx_msg void OnBnClickedButtonHwSettingMode(); |
| | | afx_msg void OnBnClickedButtonMotorOffsetTool(); //< KEJ 20230621 - #4528 ADD > |
| | | }; |
»õ ÆÄÀÏ |
| | |
| | | // DlgMotorOffSetTool.cpp: 구í íì¼ |
| | | // |
| | | |
| | | #include "stdafx.h" |
| | | #include "ReviewSystem.h" |
| | | #include "DlgMotorOffSetTool.h" |
| | | #include <algorithm> |
| | | #include "afxdialogex.h" |
| | | #include "CHCommonClasses/MacroFile.h" |
| | | |
| | | BOOL CMotorOffsetData::CalcOffset(_Inout_ double& GlassPosX, _Inout_ double& GlassPosY) |
| | | { |
| | | auto Xitem = upper_bound(m_vtXRange.begin(), m_vtXRange.end(), GlassPosX); |
| | | auto Yitem = upper_bound(m_vtYRange.begin(), m_vtYRange.end(), GlassPosY); |
| | | |
| | | double dXpos, dYpos, dRangeX, dRangeY; |
| | | int nXIndex = 0; |
| | | int nYIndex = 0; |
| | | // X ìì¸ì²ë¦¬ |
| | | if (Xitem == m_vtXRange.begin()) { |
| | | dRangeX = 0; |
| | | nXIndex = 0; |
| | | } |
| | | else if (Xitem == m_vtXRange.end()) |
| | | { |
| | | Xitem = m_vtXRange.end() - 1; |
| | | dRangeX = *(Xitem - 1); |
| | | nXIndex = GetRangeCountX() - 1; |
| | | } |
| | | else |
| | | { |
| | | dRangeX = *(Xitem - 1); |
| | | nXIndex = (Xitem)-m_vtXRange.begin(); |
| | | } |
| | | // Y ìì¸ì²ë¦¬ ì¶ê° |
| | | if (Yitem == m_vtYRange.begin()) { |
| | | dRangeY = 0; |
| | | nYIndex = 0; |
| | | } |
| | | else if (Yitem == m_vtYRange.end()) |
| | | { |
| | | Yitem = m_vtYRange.end() - 1; |
| | | dRangeY = *(Yitem - 1); |
| | | nYIndex = GetRangeCountY() - 1; |
| | | } |
| | | else |
| | | { |
| | | dRangeY = *(Yitem - 1); |
| | | nYIndex = (Yitem)-m_vtYRange.begin(); |
| | | } |
| | | MotorOffSetInfo pOffsetInfo = m_mapOffsetInfo[nXIndex][nYIndex]; |
| | | |
| | | dXpos = floor((pOffsetInfo.dXoffSetValue * 1000)) / 1000.0; |
| | | dYpos = floor((pOffsetInfo.dYoffSetValue * 1000)) / 1000.0; |
| | | GlassPosX = GlassPosX + dXpos; |
| | | GlassPosY = GlassPosY + dYpos; |
| | | |
| | | // g_pLog->DisplayMessage(_T("Motor ì¤íì
ì¼ë¡ ì ì©, íë³ ì¤íì
: X = %.3lf, Y = %.3lf Rate : X = %.3lf, Y = %.3lf "), dXpos, dYpos, pOffsetInfo.dXRate, pOffsetInfo.dYRate); |
| | | return TRUE; |
| | | } |
| | | |
| | | //setter |
| | | void CMotorOffsetData::SetRangeCountX(_In_ unsigned int nCount) { |
| | | m_vtXRange.resize(nCount); |
| | | m_vtXRange; |
| | | } |
| | | void CMotorOffsetData::SetRangeCountY(_In_ unsigned int nCount) { m_vtYRange.resize(nCount); } |
| | | BOOL CMotorOffsetData::SetRangeX(_In_ unsigned int nIdx, _In_ double fX) //exception need |
| | | { |
| | | if (m_vtXRange.size() <= nIdx) return FALSE; |
| | | m_vtXRange[nIdx] = fX; |
| | | return TRUE; |
| | | } |
| | | BOOL CMotorOffsetData::SetRangeY(_In_ unsigned int nIdx, _In_ double fY) |
| | | { |
| | | if (m_vtYRange.size() < nIdx) return FALSE; |
| | | m_vtYRange[nIdx] = fY; |
| | | return TRUE; |
| | | } |
| | | |
| | | BOOL CMotorOffsetData::SetOffsetValue(_In_ unsigned int nXIndex, _In_ unsigned int nYIndex, _In_ MotorOffSetInfo pOffsetInfo) |
| | | { |
| | | m_mapOffsetInfo[(nXIndex)][(nYIndex)] = pOffsetInfo; |
| | | return TRUE; |
| | | } |
| | | |
| | | //getter |
| | | int CMotorOffsetData::GetRangeCountX() { return m_vtXRange.size(); } |
| | | int CMotorOffsetData::GetRangeCountY() { return m_vtYRange.size(); } |
| | | double CMotorOffsetData::GetRangeX(_In_ unsigned int nIdx) |
| | | { |
| | | if (nIdx > m_vtXRange.size()) return 0; |
| | | return m_vtXRange[nIdx]; |
| | | } //exception need |
| | | double CMotorOffsetData::GetRangeY(_In_ unsigned int nIdx) |
| | | { |
| | | if (nIdx > m_vtYRange.size()) return 0; |
| | | return m_vtYRange[nIdx]; |
| | | } |
| | | MotorOffSetInfo CMotorOffsetData::GetOffsetValue(_In_ int nXIndex, _In_ int nYIndex) |
| | | { |
| | | MotorOffSetInfo pTemp; |
| | | if (nXIndex > m_vtXRange.size() || nYIndex > m_vtYRange.size()) return pTemp; |
| | | return m_mapOffsetInfo[nXIndex][nYIndex]; |
| | | } |
| | | |
| | | // File Access |
| | | BOOL CMotorOffsetData::WriteConfigFile(int nIdx) |
| | | { |
| | | BOOL bReturn = FALSE; |
| | | CMacroFile macroFile; |
| | | macroFile.Clear(); |
| | | CString strItem = _T(""); |
| | | CString strData; |
| | | double dData = 0; |
| | | |
| | | CString strFilePath; |
| | | strFilePath.Format(_T("%s\\%s_%d.cfg"), _REVIEW_SERVER_CONFIG_PATH_, MOTOR_OFFSET_CONFIGFILE_DEFAULT_NAME, nIdx); |
| | | |
| | | int nXRangeIndex = 0; |
| | | int nYRangeIndex = 0; |
| | | if (m_vtXRange.empty() && m_vtYRange.empty()) return FALSE; |
| | | nXRangeIndex = GetRangeCountX(); |
| | | nYRangeIndex = GetRangeCountY(); |
| | | |
| | | strItem.Format(_T("%d_XRANGE_COUNT"), nIdx); |
| | | macroFile.SetItem(strItem, nXRangeIndex); |
| | | |
| | | for (int nIdex = 0; nIdex < nXRangeIndex; nIdex++) |
| | | { |
| | | strItem.Format(_T("%d_X_RANGE_%d"), nIdx, nIdex); |
| | | dData = GetRangeX(nIdex); |
| | | macroFile.SetItem(strItem, dData); |
| | | } |
| | | |
| | | strItem.Format(_T("%d_YRANGE_COUNT"), nIdx); |
| | | macroFile.SetItem(strItem, nYRangeIndex); |
| | | |
| | | |
| | | // fot loop |
| | | for (int nIdex = 0; nIdex < nYRangeIndex; nIdex++) |
| | | { |
| | | strItem.Format(_T("%d_Y_RANGE_%d"), nIdx, nIdex); |
| | | dData = GetRangeY(nIdex); |
| | | macroFile.SetItem(strItem, dData); |
| | | } |
| | | |
| | | |
| | | for (int nXposIndex = 0; nXposIndex < nXRangeIndex; nXposIndex++) |
| | | { |
| | | for (int nYposIndex = 0; nYposIndex < nYRangeIndex; nYposIndex++) |
| | | { |
| | | MotorOffSetInfo pOffsetInfo; |
| | | pOffsetInfo = GetOffsetValue(nXposIndex, nYposIndex); |
| | | strItem.Format(_T("[%d][%d][%d]_X"),nIdx, nXposIndex, nYposIndex); |
| | | dData = pOffsetInfo.dXoffSetValue; |
| | | macroFile.SetItem(strItem, dData); |
| | | |
| | | strItem.Format(_T("[%d][%d][%d]_Y"),nIdx, nXposIndex, nYposIndex); |
| | | dData = pOffsetInfo.dYoffSetValue; |
| | | macroFile.SetItem(strItem, dData); |
| | | |
| | | } |
| | | } |
| | | bReturn = macroFile.Write(strFilePath); |
| | | |
| | | return bReturn; |
| | | } |
| | | |
| | | BOOL CMotorOffsetData::ReadConfigFile(int nIdx) |
| | | { |
| | | CString strPath = _T(""); |
| | | strPath.Format(_T("%s\\%s_%d.cfg"), _REVIEW_SERVER_CONFIG_PATH_, MOTOR_OFFSET_CONFIGFILE_DEFAULT_NAME, nIdx); |
| | | if (LoadInfo(strPath, nIdx) == FALSE) |
| | | { |
| | | |
| | | return FALSE; |
| | | } |
| | | return TRUE; |
| | | } |
| | | BOOL CMotorOffsetData::LoadInfo(CString strFilePath, int nIdx) |
| | | { |
| | | CMacroFile macroFile; |
| | | if (!macroFile.Read(strFilePath)) return FALSE; |
| | | |
| | | CString strItem = _T(""); |
| | | int nXRangeIndex = 0; |
| | | int nYRangeIndex = 0; |
| | | double nXRange = 0; |
| | | double nYRange = 0; |
| | | MotorOffSetInfo pOffsetInfo; |
| | | memset(&pOffsetInfo, 0, sizeof(MotorOffSetInfo)); |
| | | double dXoffSetValue = 0; |
| | | double dYoffSetValue = 0; |
| | | double dXRate = 0; |
| | | double dYRate = 0; |
| | | CString strTmp; |
| | | strTmp.Format(_T("%d_XRANGE_COUNT"), nIdx); |
| | | macroFile.GetItem(strTmp, nXRangeIndex, 0); |
| | | strTmp.Format(_T("%d_YRANGE_COUNT"), nIdx); |
| | | macroFile.GetItem(strTmp, nYRangeIndex, 0); |
| | | SetRangeCountX(nXRangeIndex); |
| | | SetRangeCountY(nYRangeIndex); |
| | | |
| | | for (int nIdex = 0; nIdex < nXRangeIndex; nIdex++) |
| | | { |
| | | strItem.Format(_T("%d_X_RANGE_%d"),nIdx, nIdex); |
| | | macroFile.GetItem(strItem, nXRange); |
| | | SetRangeX(nIdex, nXRange); |
| | | } |
| | | for (int nIdex = 0; nIdex < nYRangeIndex; nIdex++) |
| | | { |
| | | strItem.Format(_T("%d_Y_RANGE_%d"),nIdx, nIdex); |
| | | macroFile.GetItem(strItem, nYRange); |
| | | SetRangeY(nIdex, nYRange); |
| | | } |
| | | |
| | | for (int nXposIndex = 0; nXposIndex < nXRangeIndex; nXposIndex++) |
| | | { |
| | | for (int nYposIndex = 0; nYposIndex < nYRangeIndex; nYposIndex++) |
| | | { |
| | | |
| | | strItem.Format(_T("[%d][%d][%d]_X"),nIdx, nXposIndex, nYposIndex); |
| | | macroFile.GetItem(strItem, dXoffSetValue); |
| | | pOffsetInfo.dXoffSetValue = dXoffSetValue; |
| | | |
| | | strItem.Format(_T("[%d][%d][%d]_Y"),nIdx, nXposIndex, nYposIndex); |
| | | macroFile.GetItem(strItem, dYoffSetValue); |
| | | pOffsetInfo.dYoffSetValue = dYoffSetValue; |
| | | |
| | | SetOffsetValue(nXposIndex, nYposIndex, pOffsetInfo); |
| | | } |
| | | } |
| | | return TRUE; |
| | | }; |
| | | |
| | | // CDlgMotorOffSetTool ëí ìì |
| | | |
| | | IMPLEMENT_DYNAMIC(CDlgMotorOffSetTool, CDialogEx) |
| | | |
| | | CDlgMotorOffSetTool::CDlgMotorOffSetTool(CWnd* pParent /*=nullptr*/) |
| | | : CDialogEx(IDD_DLG_MOTOR_OFFSET_TOOL, pParent) |
| | | , m_nEditXposCount(0) |
| | | , m_nEditYposCount(0) |
| | | , m_nCurOffsetModuleIdx(0) |
| | | { |
| | | InitializeCriticalSection(&m_csMapSafer); |
| | | } |
| | | |
| | | CDlgMotorOffSetTool::~CDlgMotorOffSetTool() |
| | | { |
| | | DeleteCriticalSection(&m_csMapSafer); |
| | | } |
| | | |
| | | void CDlgMotorOffSetTool::DoDataExchange(CDataExchange* pDX) |
| | | { |
| | | DDX_Control(pDX, IDC_GRID_MOTOR_OFFSET_INFO, m_ctrlGridMotorOffSetInfo); |
| | | DDX_Text(pDX, IDC_EDIT_MOTOR_OFFSET_COUNTX, m_nEditXposCount); |
| | | DDX_Text(pDX, IDC_EDIT_MOTOR_OFFSET_COUNTY, m_nEditYposCount); |
| | | DDX_Control(pDX, IDC_COMBO_MOTOR_OFFSET_MODULEIDX, m_ctrlCmbModuleIdx); |
| | | CDialogEx::DoDataExchange(pDX); |
| | | } |
| | | |
| | | |
| | | |
| | | BEGIN_MESSAGE_MAP(CDlgMotorOffSetTool, CDialogEx) |
| | | ON_BN_CLICKED(IDCANCEL, &CDlgMotorOffSetTool::OnBnClickedCancel) |
| | | ON_BN_CLICKED(IDOK, &CDlgMotorOffSetTool::OnBnClickedOK) |
| | | ON_EN_KILLFOCUS(IDC_EDIT_MOTOR_OFFSET_COUNTX, &CDlgMotorOffSetTool::OnXCountKillFocus) |
| | | ON_EN_KILLFOCUS(IDC_EDIT_MOTOR_OFFSET_COUNTY, &CDlgMotorOffSetTool::OnYCountKillFocus) |
| | | ON_CBN_SELCHANGE(IDC_COMBO_MOTOR_OFFSET_MODULEIDX, &CDlgMotorOffSetTool::OnSelchangeComboMotorOffsetModuleidx) |
| | | END_MESSAGE_MAP() |
| | | |
| | | |
| | | BOOL CDlgMotorOffSetTool::OnInitDialog() |
| | | { |
| | | CDialogEx::OnInitDialog(); |
| | | InitProcess(); |
| | | return 0; |
| | | } |
| | | |
| | | void CDlgMotorOffSetTool::OnBnClickedOK() |
| | | { |
| | | CDialogEx::OnOK(); |
| | | UpdateData(TRUE); |
| | | |
| | | ApplyOffSetInfo(); |
| | | UpdateGridcontrol(); |
| | | int nIdx = 0; |
| | | for (auto it =m_mapMotorOffsetInfo.begin(); it != m_mapMotorOffsetInfo.end(); it++) |
| | | { |
| | | it->second.WriteConfigFile(nIdx++); |
| | | } |
| | | |
| | | // Critical Section Start |
| | | EnterCriticalSection(&m_csMapSafer); |
| | | m_mapMotorOffsetInfo_OLD = m_mapMotorOffsetInfo; |
| | | LeaveCriticalSection(&m_csMapSafer); |
| | | } |
| | | |
| | | void CDlgMotorOffSetTool::OnBnClickedCancel() |
| | | { |
| | | // TODO: ì¬ê¸°ì 컨í¸ë¡¤ ì림 ì²ë¦¬ê¸° ì½ë를 ì¶ê°í©ëë¤. |
| | | CDialogEx::OnCancel(); |
| | | UpdateData(TRUE); |
| | | |
| | | ApplyOffSetInfo(); |
| | | UpdateGridcontrol(); |
| | | |
| | | CString strMessage; |
| | | |
| | | // CheckDiff(); |
| | | |
| | | if (m_mapMotorOffsetInfo_OLD == m_mapMotorOffsetInfo) |
| | | { |
| | | return; |
| | | } |
| | | else if (IDYES == AfxMessageBox(_T("ë³ê²½ì ì´ ë°ê²¬ëììµëë¤ .ì ì¥ íìê² ìµëê¹?"), MB_YESNO | MB_ICONQUESTION)) |
| | | { |
| | | int nIdx = 0; |
| | | for (auto it = m_mapMotorOffsetInfo.begin(); it != m_mapMotorOffsetInfo.end(); it++) |
| | | { |
| | | it->second.WriteConfigFile(nIdx++); |
| | | } |
| | | // Critical Section Start |
| | | EnterCriticalSection(&m_csMapSafer); |
| | | m_mapMotorOffsetInfo_OLD = m_mapMotorOffsetInfo; |
| | | LeaveCriticalSection(&m_csMapSafer); |
| | | // Critical Section End |
| | | } |
| | | else |
| | | { |
| | | EnterCriticalSection(&m_csMapSafer); |
| | | m_mapMotorOffsetInfo = m_mapMotorOffsetInfo_OLD; |
| | | LeaveCriticalSection(&m_csMapSafer); |
| | | } |
| | | } |
| | | |
| | | void CDlgMotorOffSetTool::OnXCountKillFocus() |
| | | { |
| | | UpdateData(TRUE); |
| | | |
| | | auto pMotorOffsetData = &m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx]; |
| | | |
| | | |
| | | if (m_nEditYposCount <= 0) m_nEditYposCount = 1; |
| | | if (m_nEditXposCount <= 0) m_nEditXposCount = 1; |
| | | if (m_nEditYposCount > 100) m_nEditYposCount = 100; |
| | | if (m_nEditXposCount > 100) m_nEditXposCount = 100; |
| | | pMotorOffsetData->SetRangeCountX(m_nEditXposCount); |
| | | pMotorOffsetData->SetRangeCountY(m_nEditYposCount); |
| | | |
| | | m_ctrlGridMotorOffSetInfo.DeleteAllItems(); |
| | | |
| | | UpdateData(FALSE); |
| | | InitOffSetInfoGridControl(); |
| | | UpdateGridcontrol(); |
| | | Invalidate(TRUE); |
| | | } |
| | | |
| | | void CDlgMotorOffSetTool::OnYCountKillFocus() |
| | | { |
| | | UpdateData(TRUE); |
| | | |
| | | auto pMotorOffsetData = &m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx]; |
| | | |
| | | |
| | | if (m_nEditYposCount <= 0) m_nEditYposCount = 1; |
| | | if (m_nEditXposCount <= 0) m_nEditXposCount = 1; |
| | | if (m_nEditYposCount > 100) m_nEditYposCount = 100; |
| | | if (m_nEditXposCount > 100) m_nEditXposCount = 100; |
| | | pMotorOffsetData->SetRangeCountX(m_nEditXposCount); |
| | | pMotorOffsetData->SetRangeCountY(m_nEditYposCount); |
| | | |
| | | m_ctrlGridMotorOffSetInfo.DeleteAllItems(); |
| | | |
| | | UpdateData(FALSE); |
| | | InitOffSetInfoGridControl(); |
| | | UpdateGridcontrol(); |
| | | Invalidate(TRUE); |
| | | } |
| | | |
| | | void CDlgMotorOffSetTool::InitOffSetInfoGridControl() |
| | | { |
| | | int nRowIdx, nColIdx, nRows, nCols, nFixRows, nDataColumnWidth, nMargin; |
| | | CString strTemp; |
| | | CRect rect; |
| | | nRows = 0; |
| | | nCols = 0; |
| | | nFixRows = 0; |
| | | nRowIdx = 0; |
| | | nColIdx = 0; |
| | | double dGlassXsize = 1500; |
| | | auto pCurrentOffsetData = &m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx]; |
| | | |
| | | bool bDefault = FALSE; |
| | | { |
| | | nRows = (pCurrentOffsetData->GetRangeCountY()) + GRID_ROW_START_POINT; |
| | | |
| | | } |
| | | |
| | | { |
| | | nCols = (pCurrentOffsetData->GetRangeCountX() * 2) + GRID_COL_START_POINT; |
| | | } |
| | | |
| | | m_ctrlGridMotorOffSetInfo.GetWindowRect(&rect); |
| | | m_ctrlGridMotorOffSetInfo.GetDefaultCell(FALSE, FALSE)->SetBackClr(RGB(0xFF, 0xFF, 0xE0)); |
| | | m_ctrlGridMotorOffSetInfo.SetRowCount(nRows); |
| | | m_ctrlGridMotorOffSetInfo.SetColumnCount(nCols); |
| | | for (int nIndex = 0; nIndex < nRows; nIndex++) { |
| | | m_ctrlGridMotorOffSetInfo.SetItemBkColour(nIndex, 0, Color[((nIndex / 2) - 1) % 10]); |
| | | m_ctrlGridMotorOffSetInfo.SetItemBkColour(nIndex, 1, Color[((nIndex / 2) - 1) % 10]); |
| | | |
| | | } |
| | | for (int nIndex = 0; nIndex < nCols; nIndex++) { |
| | | m_ctrlGridMotorOffSetInfo.SetItemBkColour(0, nIndex, Color[((nIndex / 2) - 1) % 10]); |
| | | } |
| | | |
| | | nMargin = 5; |
| | | nDataColumnWidth = 40; |
| | | |
| | | GV_ITEM Item; |
| | | |
| | | //첫ë²ì§¸ |
| | | Item.mask = GVIF_TEXT; |
| | | Item.row = 0; |
| | | Item.col = 0; |
| | | //init |
| | | for (int nRowIdex = 0; nRowIdex < nRows; nRowIdex++) |
| | | { |
| | | for (int nColIdex = 0; nColIdex < nCols; nColIdex++) |
| | | { |
| | | Item.row = nRowIdex; |
| | | Item.col = nColIdex; |
| | | strTemp.Format(_T("")); |
| | | Item.strText = strTemp; |
| | | m_ctrlGridMotorOffSetInfo.SetItem(&Item); |
| | | } |
| | | } |
| | | nRowIdx = 0; |
| | | nColIdx = 0; |
| | | Item.row = nRowIdx; |
| | | Item.col = nColIdx; |
| | | strTemp.Format(_T("0 , 0")); |
| | | Item.strText = strTemp; |
| | | m_ctrlGridMotorOffSetInfo.SetItem(&Item); |
| | | m_ctrlGridMotorOffSetInfo.SetItemBkColour(nRowIdx, nColIdx, NOFIXCELLCOLOR); |
| | | m_ctrlGridMotorOffSetInfo.SetColumnWidth(nColIdx, nDataColumnWidth + 35); |
| | | m_ctrlGridMotorOffSetInfo.SetItemState(nRowIdx, nColIdx, m_ctrlGridMotorOffSetInfo.GetItemState(nRowIdx, nColIdx) | GVIS_READONLY); |
| | | |
| | | nRowIdx++; |
| | | Item.row = nRowIdx; |
| | | Item.col = nColIdx; |
| | | strTemp.Format(_T("[YRangeâ]")); |
| | | Item.strText = strTemp; |
| | | m_ctrlGridMotorOffSetInfo.SetItem(&Item); |
| | | m_ctrlGridMotorOffSetInfo.SetItemBkColour(nRowIdx, nColIdx, NOFIXCELLCOLOR); |
| | | m_ctrlGridMotorOffSetInfo.SetColumnWidth(nColIdx, nDataColumnWidth + 35); |
| | | m_ctrlGridMotorOffSetInfo.SetItemState(nRowIdx, nColIdx, m_ctrlGridMotorOffSetInfo.GetItemState(nRowIdx, nColIdx) | GVIS_READONLY); |
| | | |
| | | nRowIdx = 0; |
| | | nColIdx = 1; |
| | | Item.row = nRowIdx; |
| | | Item.col = nColIdx; |
| | | strTemp.Format(_T("[XRangeâ]")); //Maxì ì´ë§ì¶¤ |
| | | Item.strText = strTemp; |
| | | m_ctrlGridMotorOffSetInfo.SetItem(&Item); |
| | | m_ctrlGridMotorOffSetInfo.SetItemBkColour(nRowIdx, nColIdx, NOFIXCELLCOLOR); |
| | | m_ctrlGridMotorOffSetInfo.SetColumnWidth(nColIdx, nDataColumnWidth + 35); |
| | | m_ctrlGridMotorOffSetInfo.SetItemState(nRowIdx, nColIdx, m_ctrlGridMotorOffSetInfo.GetItemState(nRowIdx, nColIdx) | GVIS_READONLY); |
| | | |
| | | nRowIdx++; |
| | | Item.row = nRowIdx; |
| | | Item.col = nColIdx; |
| | | strTemp.Format(_T("*")); |
| | | Item.strText = strTemp; |
| | | m_ctrlGridMotorOffSetInfo.SetItem(&Item); |
| | | m_ctrlGridMotorOffSetInfo.SetItemBkColour(nRowIdx, nColIdx, NOFIXCELLCOLOR); |
| | | m_ctrlGridMotorOffSetInfo.SetColumnWidth(nColIdx, nDataColumnWidth + 35); |
| | | m_ctrlGridMotorOffSetInfo.SetItemState(nRowIdx, nColIdx, m_ctrlGridMotorOffSetInfo.GetItemState(nRowIdx, nColIdx) | GVIS_READONLY); |
| | | for (int nRowIndex = GRID_ROW_START_POINT; nRowIndex < nRows; nRowIndex++) |
| | | { |
| | | |
| | | nRowIdx = nRowIndex; |
| | | nColIdx = 1; |
| | | |
| | | Item.row = nRowIdx; |
| | | Item.col = nColIdx; |
| | | strTemp.Format(_T("Offset")); |
| | | Item.strText = strTemp; |
| | | m_ctrlGridMotorOffSetInfo.SetItem(&Item); |
| | | m_ctrlGridMotorOffSetInfo.SetItemBkColour(nRowIdx, nColIdx, NOFIXCELLCOLOR); |
| | | m_ctrlGridMotorOffSetInfo.SetColumnWidth(nColIdx, nDataColumnWidth + 35); |
| | | m_ctrlGridMotorOffSetInfo.SetItemState(nRowIdx, nColIdx, m_ctrlGridMotorOffSetInfo.GetItemState(nRowIdx, nColIdx) | GVIS_READONLY); |
| | | |
| | | |
| | | } |
| | | for (int nColIndex = GRID_COL_START_POINT; nColIndex < nCols; nColIndex++) |
| | | { |
| | | |
| | | nRowIdx = 1; |
| | | nColIdx = nColIndex; |
| | | |
| | | if (nColIndex % 2 == 0) |
| | | { |
| | | Item.row = nRowIdx; |
| | | Item.col = nColIdx; |
| | | strTemp.Format(_T("[%d][x]"), nColIdx / 2); |
| | | Item.strText = strTemp; |
| | | m_ctrlGridMotorOffSetInfo.SetItem(&Item); |
| | | |
| | | m_ctrlGridMotorOffSetInfo.SetItemBkColour(nRowIdx, nColIdx, NOFIXCELLCOLOR); |
| | | m_ctrlGridMotorOffSetInfo.SetColumnWidth(nColIdx, nDataColumnWidth + 15); |
| | | m_ctrlGridMotorOffSetInfo.SetItemState(nRowIdx, nColIdx, m_ctrlGridMotorOffSetInfo.GetItemState(nRowIdx, nColIdx) | GVIS_READONLY); |
| | | } |
| | | else |
| | | { |
| | | Item.row = nRowIdx; |
| | | Item.col = nColIdx; |
| | | strTemp.Format(_T("[%d][y]"), nColIdx / 2); |
| | | Item.strText = strTemp; |
| | | m_ctrlGridMotorOffSetInfo.SetItem(&Item); |
| | | m_ctrlGridMotorOffSetInfo.SetItemBkColour(nRowIdx, nColIdx, NOFIXCELLCOLOR); |
| | | m_ctrlGridMotorOffSetInfo.SetColumnWidth(nColIdx, nDataColumnWidth + 15); |
| | | m_ctrlGridMotorOffSetInfo.SetItemState(nRowIdx, nColIdx, m_ctrlGridMotorOffSetInfo.GetItemState(nRowIdx, nColIdx) | GVIS_READONLY); |
| | | } |
| | | } |
| | | } |
| | | |
| | | void CDlgMotorOffSetTool::SetColorType() |
| | | { |
| | | for (int i = 0; i < sizeof(Color); i++) |
| | | { |
| | | if (i == 0) { |
| | | Color[0] = FFA7A7; |
| | | } |
| | | else if (i == 1) { |
| | | Color[1] = FFC19E; |
| | | } |
| | | else if (i == 2) { |
| | | Color[2] = FFE08C; |
| | | } |
| | | else if (i == 3) { |
| | | Color[3] = FAED7D; |
| | | } |
| | | else if (i == 4) { |
| | | Color[4] = FFB2F5; |
| | | } |
| | | else if (i == 5) { |
| | | Color[5] = A566FF; |
| | | } |
| | | else if (i == 6) { |
| | | Color[6] = D9418C; |
| | | } |
| | | else if (i == 7) { |
| | | Color[7] = A00D8FF; |
| | | } |
| | | else if (i == 8) { |
| | | Color[8] = A2F9D27; |
| | | } |
| | | else if (i == 9) { |
| | | Color[9] = A4641D9; |
| | | } |
| | | } |
| | | } |
| | | |
| | | void CDlgMotorOffSetTool::InitProcess() |
| | | { |
| | | SetColorType(); |
| | | |
| | | CString strTmp; |
| | | for (int i =0; i<2; i++) |
| | | { |
| | | strTmp.Format(_T("%d"), i); |
| | | m_ctrlCmbModuleIdx.AddString(strTmp); |
| | | } |
| | | m_ctrlCmbModuleIdx.SetCurSel(m_nCurOffsetModuleIdx); |
| | | |
| | | BOOL bRet = FALSE; |
| | | //ê³µê° ë§ë¤ê¸° |
| | | for (int i = 0; i < 2; i++) |
| | | { |
| | | CMotorOffsetData pMotorOffsetData; |
| | | bRet = pMotorOffsetData.ReadConfigFile(i); |
| | | if (bRet == FALSE) |
| | | break; |
| | | |
| | | m_mapMotorOffsetInfo.insert(std::make_pair(i, pMotorOffsetData)); |
| | | |
| | | } |
| | | if (bRet == FALSE) |
| | | return; |
| | | |
| | | InitOffSetInfoGridControl(); |
| | | UpdateGridcontrol(); // map -> Grid |
| | | |
| | | // CriticalSection Start |
| | | EnterCriticalSection(&m_csMapSafer); |
| | | m_mapMotorOffsetInfo_OLD = m_mapMotorOffsetInfo; |
| | | LeaveCriticalSection(&m_csMapSafer); |
| | | } |
| | | |
| | | void CDlgMotorOffSetTool::UpdateGridcontrol() |
| | | { |
| | | //int nModuleidx = 0; |
| | | int nRow = GRID_ROW_START_POINT; |
| | | int nCol = GRID_COL_START_POINT; |
| | | CString strData; |
| | | |
| | | m_nEditXposCount = m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx].GetRangeCountX(); |
| | | m_nEditYposCount = m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx].GetRangeCountY(); |
| | | CString strTemp = _T(""); |
| | | strTemp.Format(_T("%d"), m_nEditXposCount); |
| | | SetDlgItemText(IDC_EDIT_MOTOR_OFFSET_COUNTX, strTemp); |
| | | strTemp.Format(_T("%d"), m_nEditYposCount); |
| | | SetDlgItemText(IDC_EDIT_MOTOR_OFFSET_COUNTY, strTemp); |
| | | |
| | | for (int nXIndex = 0; nXIndex < m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx].GetRangeCountX(); nXIndex++) |
| | | { |
| | | strData.Format(_T("%.03lf"), m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx].GetRangeX(nXIndex)); |
| | | m_ctrlGridMotorOffSetInfo.SetItemText(0, nCol, strData); //X Range |
| | | m_ctrlGridMotorOffSetInfo.MergeCells(0, nCol, 0, nCol + 1); |
| | | nCol += 2; |
| | | |
| | | } |
| | | for (int nYIndex = 0; nYIndex < m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx].GetRangeCountY(); nYIndex++) |
| | | { |
| | | |
| | | strData.Format(_T("%.03lf"), m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx].GetRangeY(nYIndex)); |
| | | m_ctrlGridMotorOffSetInfo.SetItemText(nRow, 0, strData); |
| | | nRow ++; |
| | | } |
| | | |
| | | nCol = GRID_COL_START_POINT; |
| | | nRow = GRID_ROW_START_POINT; |
| | | for (int nYposIndex = 0; nYposIndex < m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx].GetRangeCountY(); nYposIndex++) |
| | | { |
| | | for (int nXposIndex = 0; nXposIndex < m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx].GetRangeCountX(); nXposIndex++) |
| | | { |
| | | MotorOffSetInfo pOffset = m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx].GetOffsetValue(nXposIndex, nYposIndex); |
| | | |
| | | strData.Format(_T("%.03lf"), pOffset.dXoffSetValue); |
| | | m_ctrlGridMotorOffSetInfo.SetItemText(nRow, nCol, strData);//X offset |
| | | m_ctrlGridMotorOffSetInfo.SetItemBkColour(nRow, nCol, RGB(0xF0, 0xF0, 0xD0)); |
| | | |
| | | nCol++; |
| | | |
| | | |
| | | strData.Format(_T("%.03lf"), pOffset.dYoffSetValue); |
| | | m_ctrlGridMotorOffSetInfo.SetItemText(nRow, nCol, strData); //Y Offset |
| | | m_ctrlGridMotorOffSetInfo.SetItemBkColour(nRow, nCol, RGB(0xF0, 0xF0, 0xD0)); |
| | | |
| | | nCol++; |
| | | } |
| | | nRow += 1; |
| | | nCol = GRID_COL_START_POINT; |
| | | } |
| | | } |
| | | |
| | | BOOL CDlgMotorOffSetTool::CalOffsetInfo(int nModuleIdx, double & XPos, double & YPos) |
| | | { |
| | | BOOL nRet = m_mapMotorOffsetInfo_OLD[nModuleIdx].CalcOffset(XPos, YPos); |
| | | return nRet; |
| | | } |
| | | |
| | | void CDlgMotorOffSetTool::ApplyOffSetInfo() |
| | | { |
| | | //int nModuleidx = 0; |
| | | double dXoffset = 0; |
| | | double dYoffset = 0; |
| | | double dXRate = 0; |
| | | double dYRate = 0; |
| | | int nRow = GRID_ROW_START_POINT; |
| | | int nCol = GRID_COL_START_POINT; |
| | | CString strData; |
| | | CString strAOIName; |
| | | double dXRange = 0; |
| | | double dYRange = 0; |
| | | double nGlassSize = 2500; |
| | | |
| | | auto pMotorOffSetData = &m_mapMotorOffsetInfo[m_nCurOffsetModuleIdx]; |
| | | |
| | | MotorOffSetInfo pOffsetInfo; |
| | | nCol = GRID_COL_START_POINT; |
| | | for (int nXposIndex = 0; nXposIndex < pMotorOffSetData->GetRangeCountX(); nXposIndex++) |
| | | { |
| | | strData = m_ctrlGridMotorOffSetInfo.GetItemText(0, nCol); //X Range |
| | | dXRange = atof((CStringA)strData); |
| | | pMotorOffSetData->SetRangeX(nXposIndex, dXRange); |
| | | // strData = m_ctrlGridReviewOffSetInfo.GetItemText(nRow, 1); //Y Max |
| | | nCol += 2; |
| | | } |
| | | nRow = GRID_ROW_START_POINT; |
| | | for (int nYposIndex = 0; nYposIndex < pMotorOffSetData->GetRangeCountY(); nYposIndex++) |
| | | { |
| | | strData = m_ctrlGridMotorOffSetInfo.GetItemText(nRow, 0); //YRange |
| | | dYRange = atof((CStringA)strData); |
| | | pMotorOffSetData->SetRangeY(nYposIndex, dYRange); |
| | | nRow ++; |
| | | } |
| | | nCol = GRID_COL_START_POINT; |
| | | nRow = GRID_ROW_START_POINT; |
| | | |
| | | for (int nYposIndex = 0; nYposIndex < pMotorOffSetData->GetRangeCountY(); nYposIndex++) |
| | | { |
| | | |
| | | for (int nXposIndex = 0; nXposIndex < pMotorOffSetData->GetRangeCountX(); nXposIndex++) |
| | | { |
| | | |
| | | strData = m_ctrlGridMotorOffSetInfo.GetItemText(nRow, nCol); //X offset |
| | | pOffsetInfo.dXoffSetValue = atof((CStringA)strData); |
| | | nCol++; |
| | | strData = m_ctrlGridMotorOffSetInfo.GetItemText(nRow, nCol); //Y Offset |
| | | pOffsetInfo.dYoffSetValue = atof((CStringA)strData); |
| | | |
| | | pMotorOffSetData->SetOffsetValue(nXposIndex, nYposIndex, pOffsetInfo); |
| | | nCol++; |
| | | } |
| | | nRow ++; |
| | | nCol = GRID_COL_START_POINT; |
| | | } |
| | | }; |
| | | |
| | | void CDlgMotorOffSetTool::OnSelchangeComboMotorOffsetModuleidx() |
| | | { |
| | | ApplyOffSetInfo(); |
| | | m_nCurOffsetModuleIdx = m_ctrlCmbModuleIdx.GetCurSel(); |
| | | |
| | | InitOffSetInfoGridControl(); |
| | | UpdateGridcontrol(); // map -> Grid |
| | | |
| | | // CriticalSection Start |
| | | EnterCriticalSection(&m_csMapSafer); |
| | | m_mapMotorOffsetInfo_OLD = m_mapMotorOffsetInfo; |
| | | LeaveCriticalSection(&m_csMapSafer); |
| | | } |
»õ ÆÄÀÏ |
| | |
| | | #pragma once |
| | | #include <vector> |
| | | #include <map> |
| | | |
| | | #define OFFSET_LIST_GRID_ROW_COUNT 1 |
| | | #define OFFSET_LIST_GRID_COL_COUNT 3 |
| | | |
| | | #define FIXCELLCOLOR RGB(255, 102, 178) |
| | | #define NOFIXCELLCOLOR RGB(240, 240, 240) |
| | | #define MINCELLCOLOR RGB(204, 204, 255) |
| | | #define MAXCELLCOLOR RGB(204, 255, 204) |
| | | #define MOTOR_OFFSET_CONFIGFILE_DEFAULT_NAME _T("MotorOffset") |
| | | #define MOTOR_OFFSET_BACKUP_FORDER_NAME _T("OffsetBackup") |
| | | #define MOTOR_OFFSET_BACKUP_FORDER_PATH _T("D:\\DIT_Review\\ReviewServerConfig\\ReviewOffset\\OffsetBackup\\") |
| | | #define GRID_ROW_START_POINT 2 |
| | | #define GRID_COL_START_POINT 2 |
| | | |
| | | interface IDialogMotorOffSet2Parent |
| | | { |
| | | virtual BOOL IDMO2P_GetMotorPos(int nModule, double &dXpos, double &dYpos) = 0; |
| | | }; |
| | | struct MotorOffSetInfo |
| | | { |
| | | double dXoffSetValue; |
| | | double dYoffSetValue; |
| | | MotorOffSetInfo() { |
| | | dXoffSetValue = 0; |
| | | dYoffSetValue = 0; |
| | | } |
| | | bool operator==(const MotorOffSetInfo& input) const |
| | | { |
| | | return 0 == memcmp(&input, this, sizeof(MotorOffSetInfo)); |
| | | } |
| | | }; |
| | | typedef std::vector<MotorOffSetInfo> VecMotorOffSetData; |
| | | |
| | | class CMotorOffsetData |
| | | { |
| | | public: |
| | | CMotorOffsetData() { ; } |
| | | |
| | | ~CMotorOffsetData() { ; } |
| | | |
| | | // Defect Review |
| | | BOOL CalcOffset(_Inout_ double& GlassPosX, _Inout_ double& GlassPos); |
| | | |
| | | // Setting Dlg |
| | | void SetRangeCountX(_In_ unsigned int nCount); |
| | | void SetRangeCountY(_In_ unsigned int nCount); |
| | | BOOL SetRangeX(_In_ unsigned int nIdx, _In_ double fX); |
| | | BOOL SetRangeY(_In_ unsigned int nIdx, _In_ double fY); |
| | | |
| | | int GetRangeCountX(); |
| | | int GetRangeCountY(); |
| | | double GetRangeX(_In_ unsigned int nIdx); |
| | | double GetRangeY(_In_ unsigned int nIdx); |
| | | |
| | | BOOL SetOffsetValue(_In_ unsigned int nXIndex, _In_ unsigned int nYIndex, _In_ MotorOffSetInfo pOffsetInfo); |
| | | |
| | | MotorOffSetInfo GetOffsetValue(_In_ int nXIndex, _In_ int nYIndex); |
| | | |
| | | // File Access |
| | | BOOL WriteConfigFile(int nIdx); |
| | | BOOL ReadConfigFile(int nIdx); |
| | | |
| | | //Read Func |
| | | BOOL LoadInfo(CString strFilePath, int nIdx); |
| | | |
| | | bool operator==(const CMotorOffsetData& input) const |
| | | { |
| | | if (this->m_vtXRange == input.m_vtXRange) |
| | | { |
| | | if (this->m_vtYRange == input.m_vtYRange) |
| | | { |
| | | if (this->m_mapOffsetInfo == input.m_mapOffsetInfo) |
| | | { |
| | | |
| | | return TRUE; |
| | | } |
| | | } |
| | | } |
| | | else FALSE; |
| | | } |
| | | |
| | | protected: |
| | | |
| | | std::vector<double> m_vtXRange; |
| | | std::vector<double> m_vtYRange; |
| | | std::map<int, std::map<int, MotorOffSetInfo>> m_mapOffsetInfo; // <YRange , <XRange , OffsetInfo> > |
| | | private: |
| | | |
| | | |
| | | }; |
| | | typedef std::map<int, CMotorOffsetData> MapMotorOffSetInfo; |
| | | |
| | | |
| | | class CDlgMotorOffSetTool : public CDialogEx |
| | | { |
| | | DECLARE_DYNAMIC(CDlgMotorOffSetTool) |
| | | |
| | | public: |
| | | CDlgMotorOffSetTool(CWnd* pParent = nullptr); // íì¤ ìì±ìì
ëë¤. |
| | | virtual ~CDlgMotorOffSetTool(); |
| | | |
| | | // ëí ìì ë°ì´í°ì
ëë¤. |
| | | #ifdef AFX_DESIGN_TIME |
| | | enum { IDD = IDD_DLG_MOTOR_OFFSET_TOOL }; |
| | | #endif |
| | | |
| | | |
| | | protected: |
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV ì§ìì
ëë¤. |
| | | |
| | | DECLARE_MESSAGE_MAP() |
| | | |
| | | public: |
| | | virtual BOOL OnInitDialog(); |
| | | afx_msg void OnBnClickedOK(); |
| | | afx_msg void OnBnClickedCancel(); |
| | | afx_msg void OnXCountKillFocus(); |
| | | afx_msg void OnYCountKillFocus(); |
| | | |
| | | void InitOffSetInfoGridControl(); |
| | | void SetColorType(); |
| | | void InitProcess(); |
| | | void UpdateGridcontrol(); |
| | | void SetDMO2P(IDialogMotorOffSet2Parent* pDMO2P) { m_pDMO2P = pDMO2P; } |
| | | |
| | | BOOL CalOffsetInfo(int nModuleIdx, double &XPos, double &YPos); |
| | | ////////////============================== |
| | | void ApplyOffSetInfo(); //Grid -> Map |
| | | //////////================================ |
| | | |
| | | protected: |
| | | CRITICAL_SECTION m_csMapSafer; |
| | | |
| | | COLORTYPE Color[10]; |
| | | |
| | | int m_nEditXposCount; |
| | | int m_nEditYposCount; |
| | | // ì¤ë¹ë³ Offset |
| | | int m_nCurOffsetModuleIdx; |
| | | public: |
| | | CGridCtrl m_ctrlGridMotorOffSetInfo; |
| | | IDialogMotorOffSet2Parent* m_pDMO2P; |
| | | |
| | | MapMotorOffSetInfo m_mapMotorOffsetInfo; |
| | | MapMotorOffSetInfo m_mapMotorOffsetInfo_OLD; |
| | | CComboBox m_ctrlCmbModuleIdx; |
| | | afx_msg void OnSelchangeComboMotorOffsetModuleidx(); |
| | | }; |
| | |
| | | //#include "ReviewInterface.h" |
| | | |
| | | #pragma once |
| | | enum OFFSETCOUNT { |
| | | CAM_MAX_COUNT = 20, XPOS_MAX_COUNT = 10, SCAN_MAX_COUNT = 10, PROGRESS_BAR_MAX = 2000 |
| | | }; |
| | | |
| | | enum COLORTYPE { |
| | | FFA7A7 = RGB(255, 167, 167), |
| | | FFC19E = RGB(255, 193, 158), |
| | | FFE08C = RGB(255, 224, 140), |
| | | FAED7D = RGB(250, 237, 125), |
| | | FFB2F5 = RGB(255, 178, 245), |
| | | |
| | | A566FF = RGB(165, 102, 255), |
| | | D9418C = RGB(217, 65, 140), |
| | | A00D8FF = RGB(0, 216, 255), |
| | | A2F9D27 = RGB(47, 157, 39), |
| | | A4641D9 = RGB(70, 65, 217) |
| | | }; |
| | | /* < KEJ 20230621 - #4528 DEL Start > */ |
| | | // enum OFFSETCOUNT { |
| | | // CAM_MAX_COUNT = 20, XPOS_MAX_COUNT = 10, YPOS_MAX_COUNT = 10, SCAN_MAX_COUNT = 10, AOI_MAX_COUNT = 10, PROGRESS_BAR_MAX = 2000 |
| | | // }; |
| | | // |
| | | // enum COLORTYPE { |
| | | // FFA7A7 = RGB(255, 167, 167), |
| | | // FFC19E = RGB(255, 193, 158), |
| | | // FFE08C = RGB(255, 224, 140), |
| | | // FAED7D = RGB(250, 237, 125), |
| | | // FFB2F5 = RGB(255, 178, 245), |
| | | // |
| | | // A566FF = RGB(165, 102, 255), |
| | | // D9418C = RGB(217, 65, 140), |
| | | // A00D8FF = RGB(0, 216, 255), |
| | | // A2F9D27 = RGB(47, 157, 39), |
| | | // A4641D9 = RGB(70, 65, 217) |
| | | // }; |
| | | /* < KEJ 20230621 - #4528 DEL End > */ |
| | | //enum MotorOringTYPE { |
| | | // LEFT_Top = 0, RIGHT_TOP,LEFT_BOTTOM, RIGHT_BOTTOM |
| | | //}; |
| | |
| | | pReviewOffSetTool->GetOffSetInfo(nModule, nCam, nScan, dGlassXPos,dXpos, dYpos); |
| | | return TRUE; |
| | | } |
| | | /* < KEJ 20230621 - #4528 ADD Start > */ |
| | | BOOL CReviewInterface::IDMO2P_GetMotorPos(int nModule, double &dXpos, double &dYpos) |
| | | { |
| | | dXpos = m_vecModuleStatus[nModule].GetMotorPosition()->dMotorPosX; |
| | | dYpos = m_vecModuleStatus[nModule].GetMotorPosition()->dMotorPosY; |
| | | return TRUE; |
| | | |
| | | } |
| | | |
| | | BOOL CReviewInterface::CalcMotorOffSetValue(int nModule, double &dXpos, double &dYpos) |
| | | { |
| | | CDlgMotorOffSetTool* pMotorOffSetTool = m_pView->GetMotorOffSetToolHandle(); |
| | | |
| | | pMotorOffSetTool->CalOffsetInfo(nModule, dXpos, dYpos); |
| | | return TRUE; |
| | | } |
| | | /* < KEJ 20230621 - #4528 ADD End > */ |
| | | |
| | | BOOL CReviewInterface::IDRO2P_SetGlassMode(BOOL bMode, int nCamidx, int nScanidx, double nXpos, double nYpos) |
| | | { |
| | |
| | | { |
| | | m_pView->ShowHWSettingMode(); |
| | | } |
| | | |
| | | /* < KEJ 20230621 - #4528 ADD Start > */ |
| | | void CReviewInterface::IDL2P_OpenMotorOffSetTool() |
| | | { |
| | | m_pView->ShowMotorOffSetTool(); |
| | | } |
| | | /* < KEJ 20230621 - #4528 ADD End > */ |
| | | BOOL CReviewInterface::IDL2P_IsManualProcessMode() |
| | | { |
| | | return IsManualProcessMode(); |
| | |
| | | #include "DlgReviewPopUp.h" |
| | | #include "DlgReviewHistoryTool.h" |
| | | #include "DlgHardwareSettingMode.h" |
| | | #include "DlgMotorOffSetTool.h" //< KEJ 20230621 - #4528 ADD > |
| | | |
| | | #include "CHTotalPitchMeasure/TotalPitchMeasure.h" |
| | | #include "CHResultFileManager/StringRaw.h" |
| | |
| | | public IDiagnosisProcessor2Parent, |
| | | public IDialogReviewOffSet2Parent, |
| | | public IDialogReviewHistory2Parent, |
| | | public IDialogHardwareSettingMode2Parent |
| | | public IDialogHardwareSettingMode2Parent, |
| | | public IDialogMotorOffSet2Parent |
| | | { |
| | | public: |
| | | CReviewInterface(void); |
| | |
| | | virtual BOOL IDRO2P_GetMotorPos(int nModule,double &dXpos, double &dYpos); |
| | | // GetOffSetValue |
| | | virtual BOOL GetOffSetValue(int nModule, int nCam, int nScan, double dGlassXPos, double &dXpos, double &dYpos); |
| | | |
| | | /* < KEJ 20230621 - #4528 ADD Start > */ |
| | | virtual BOOL IDMO2P_GetMotorPos(int nModule, double &dXpos, double &dYpos); |
| | | virtual BOOL CalcMotorOffSetValue(int nModule, double &dXpos, double &dYpos); |
| | | /* < KEJ 20230621 - #4528 ADD End > */ |
| | | virtual BOOL IDRO2P_SetGlassMode(BOOL bMode, int nCamidx, int nScanidx, double nXpos, double nYpos); |
| | | virtual BOOL IDRO2P_SetOffsetPram(int nCamIdx, int nScanIdx, BOOL bUse = 0); |
| | | |
| | |
| | | virtual void IDL2P_OpenHWSettingTool(); |
| | | virtual BOOL IDL2P_IsManualProcessMode(); |
| | | /*< LYW 20211112 - #3708 ADD End >*/ |
| | | virtual void IDL2P_OpenMotorOffSetTool(); //< KEJ 20230621 - #4528 ADD > |
| | | |
| | | // dialog HardwareSettingMode 2 Parent |
| | | // review camera |
| | |
| | | PUSHBUTTON "OFFSET",IDC_BUTTON5,68,7,30,14 |
| | | PUSHBUTTON "History",IDC_BUTTON6,6,7,29,14 |
| | | PUSHBUTTON "H / W",IDC_BUTTON_HW_SETTING_MODE,35,7,33,14 |
| | | PUSHBUTTON "Motor Offset",IDC_BUTTON_MOTOR_OFFSET_TOOL,6,22,64,14 |
| | | END |
| | | |
| | | IDD_DLG_RESULT_GRAPH DIALOGEX 0, 0, 409, 264 |
| | |
| | | PUSHBUTTON "DisConnect",IDC_BUTTON_REVIEW_CAM_DISCONNECT,26,84,63,19 |
| | | END |
| | | |
| | | IDD_DLG_MOTOR_OFFSET_TOOL DIALOGEX 0, 0, 707, 420 |
| | | STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU |
| | | FONT 8, "MS Shell Dlg", 400, 0, 0x1 |
| | | BEGIN |
| | | DEFPUSHBUTTON "íì¸",IDOK,595,399,50,14 |
| | | PUSHBUTTON "ì·¨ì",IDCANCEL,649,399,50,14 |
| | | EDITTEXT IDC_EDIT_MOTOR_OFFSET_COUNTX,561,21,40,14,ES_AUTOHSCROLL | ES_NUMBER |
| | | EDITTEXT IDC_EDIT_MOTOR_OFFSET_COUNTY,645,21,40,14,ES_AUTOHSCROLL | ES_NUMBER |
| | | LTEXT "X Count",IDC_STATIC,525,21,26,8 |
| | | LTEXT "Y Count",IDC_STATIC,609,21,35,8 |
| | | LTEXT "(0~100)",IDC_STATIC,525,28,28,8 |
| | | LTEXT "(0~100)",IDC_STATIC,609,28,28,8 |
| | | GROUPBOX "Param Setting",IDC_STATIC,511,7,182,35 |
| | | CONTROL "Custom1",IDC_GRID_MOTOR_OFFSET_INFO,"MFCGridCtrl",WS_TABSTOP,7,49,686,343 |
| | | COMBOBOX IDC_COMBO_MOTOR_OFFSET_MODULEIDX,42,21,48,77,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP |
| | | GROUPBOX "Module",IDC_STATIC,7,7,91,35 |
| | | LTEXT "iIndex : ",IDC_STATIC,14,23,28,8 |
| | | END |
| | | |
| | | |
| | | ///////////////////////////////////////////////////////////////////////////// |
| | | // |
| | |
| | | TOPMARGIN, 7 |
| | | BOTTOMMARGIN, 169 |
| | | END |
| | | |
| | | IDD_DLG_MOTOR_OFFSET_TOOL, DIALOG |
| | | BEGIN |
| | | LEFTMARGIN, 7 |
| | | RIGHTMARGIN, 700 |
| | | TOPMARGIN, 7 |
| | | BOTTOMMARGIN, 413 |
| | | END |
| | | END |
| | | #endif // APSTUDIO_INVOKED |
| | | |
| | |
| | | 0 |
| | | END |
| | | |
| | | IDD_DLG_MOTOR_OFFSET_TOOL AFX_DIALOG_LAYOUT |
| | | BEGIN |
| | | 0 |
| | | END |
| | | |
| | | |
| | | ///////////////////////////////////////////////////////////////////////////// |
| | | // |
| | |
| | | <ClCompile Include="DlgModuleInfo.cpp" /> |
| | | <ClCompile Include="DlgMotor.cpp" /> |
| | | <ClCompile Include="DlgMotorControl.cpp" /> |
| | | <ClCompile Include="DlgMotorOffSetTool.cpp" /> |
| | | <ClCompile Include="DlgPlcSignal.cpp" /> |
| | | <ClCompile Include="DlgResultGraph.cpp" /> |
| | | <ClCompile Include="DlgReviewCamera.cpp" /> |
| | |
| | | <ClInclude Include="DlgModuleInfo.h" /> |
| | | <ClInclude Include="DlgMotor.h" /> |
| | | <ClInclude Include="DlgMotorControl.h" /> |
| | | <ClInclude Include="DlgMotorOffSetTool.h" /> |
| | | <ClInclude Include="DlgPlcSignal.h" /> |
| | | <ClInclude Include="DlgResultGraph.h" /> |
| | | <ClInclude Include="DlgReviewCamera.h" /> |
| | |
| | | <ClCompile Include="DlgHardwareSettingMode.cpp"> |
| | | <Filter>ìì¤ íì¼</Filter> |
| | | </ClCompile> |
| | | <ClCompile Include="DlgMotorOffSetTool.cpp"> |
| | | <Filter>ìì¤ íì¼</Filter> |
| | | </ClCompile> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ClInclude Include="CameraControlAlign.h"> |
| | |
| | | <ClInclude Include="DlgHardwareSettingMode.h"> |
| | | <Filter>í¤ë íì¼</Filter> |
| | | </ClInclude> |
| | | <ClInclude Include="DlgMotorOffSetTool.h"> |
| | | <Filter>í¤ë íì¼</Filter> |
| | | </ClInclude> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <None Include="res\ReviewSystem.ico"> |
| | |
| | | |
| | | // m_DlgOffSetTool->ShowWindow(SW_SHOW); |
| | | |
| | | /* < KEJ 20230621 - #4528 ADD Start > */ |
| | | |
| | | //Motor OffsetTool ìì± |
| | | m_DlgMotorOffSetTool = new CDlgMotorOffSetTool(this); |
| | | m_DlgMotorOffSetTool->Create(IDD_DLG_MOTOR_OFFSET_TOOL, this); |
| | | m_DlgMotorOffSetTool->SetDMO2P(static_cast<IDialogMotorOffSet2Parent*>(pMainFrame)); |
| | | /* < KEJ 20230621 - #4528 ADD End > */ |
| | | } |
| | | |
| | | |
| | |
| | | delete m_DlgHistoryTool; |
| | | m_DlgHistoryTool = NULL; |
| | | } |
| | | /* < KEJ 20230621 - #4528 ADD Start > */ |
| | | if (m_DlgMotorOffSetTool) |
| | | { |
| | | m_DlgMotorOffSetTool->DestroyWindow(); |
| | | delete m_DlgMotorOffSetTool; |
| | | m_DlgMotorOffSetTool = NULL; |
| | | } |
| | | /* < KEJ 20230621 - #4528 ADD End > */ |
| | | |
| | | TRACE(_T("[A2E]DeleteDialogs ì¢
ë£\n")); |
| | | } |
| | |
| | | { |
| | | m_DlgHardWareSettingMode->ShowWindow(SW_SHOW); |
| | | } |
| | | /* < KEJ 20230621 - #4528 ADD Start > */ |
| | | void CReviewSystemView::ShowMotorOffSetTool() |
| | | { |
| | | m_DlgMotorOffSetTool->ShowWindow(SW_SHOW); |
| | | } |
| | | /* < KEJ 20230621 - #4528 ADD End > */ |
| | | |
| | | //181203 |
| | | BOOL CReviewSystemView::SaveDefectMap( const CString& strPath ) |
| | |
| | | #include "DlgReviewOffSetTool.h" |
| | | #include "DlgReviewHistoryTool.h" |
| | | #include "DlgHardwareSettingMode.h" |
| | | #include "DlgMotorOffSetTool.h" //< KEJ 20230621 - #4528 ADD > |
| | | |
| | | class CSys_SystemManager; |
| | | class CSys_GlassTypeManager; |
| | |
| | | /*< LYW 20211112 - #3708 ADD Start >*/ |
| | | void ShowHWSettingMode(); |
| | | /*< LYW 20211112 - #3708 ADD End >*/ |
| | | void ShowMotorOffSetTool(); //< KEJ 20230621 - #4528 ADD > |
| | | DlgReviewOffSetTool* GetReviewOffSetToolHandle() { return m_DlgOffSetTool; } |
| | | |
| | | CDlgReviewHistoryTool* GetReviewHistoryToolHandle() { return m_DlgHistoryTool; } |
| | | CDlgMotorOffSetTool* GetMotorOffSetToolHandle() { return m_DlgMotorOffSetTool; } //< KEJ 20230621 - #4528 ADD > |
| | | |
| | | BOOL SaveDefectMap(const CString& strPath); |
| | | |
| | |
| | | BOOL isReviewPopUp; |
| | | DlgReviewOffSetTool* m_DlgOffSetTool; |
| | | CDlgReviewHistoryTool* m_DlgHistoryTool; |
| | | CDlgMotorOffSetTool* m_DlgMotorOffSetTool; //< KEJ 20230621 - #4528 ADD > |
| | | /*< LYW 20211112 - #3708 ADD Start >*/ |
| | | DlgHardwareSettingMode* m_DlgHardWareSettingMode; |
| | | /*< LYW 20211112 - #3708 ADD End >*/ |
| | |
| | | // set offset |
| | | ApplyMotorOffset(pWsi->nModuleIdx, -1, MotorOffsetCamera + MotorOffsetWSI+MotorOffset_Glass, dDefectPosX, dDefectPosY); |
| | | |
| | | m_pSP2P->CalcMotorOffSetValue(pWsi->nModuleIdx, dDefectPosX, dDefectPosY); //< KEJ 20230622 - #4526 ADD > |
| | | |
| | | // motor calibrate |
| | | CalibrateMotorPos(pWsi->nModuleIdx, dDefectPosX, dDefectPosY); |
| | | |
| | |
| | | |
| | | |
| | | virtual BOOL GetOffSetValue(int nModule, int nCam, int nScan, double dGlassXPos, double &dXpos, double &dYpos) = 0; |
| | | virtual BOOL CalcMotorOffSetValue(int nModule, double &dXpos, double &dYpos) = 0; |
| | | |
| | | public: |
| | | virtual BOOL ISP2P_MakeDirectory(CString strPath) {return TRUE;}; |
| | |
| | | // set offset |
| | | ApplyMotorOffset(pReview->nModuleIdx, pReview->nZoomIdx, MotorOffsetCamera + MotorOffsetMag+MotorOffset_Glass, dDefectPosX, dDefectPosY); |
| | | |
| | | m_pSP2P->CalcMotorOffSetValue(pReview->nModuleIdx, dDefectPosX, dDefectPosY); //< KEJ 20230622 - #4526 ADD > |
| | | //xpostemp = dDefectPosX; |
| | | //ypostemp = dDefectPosY; |
| | | |
| | |
| | | // set offset |
| | | ApplyMotorOffset(pReview->nModuleIdx, pReview->nZoomIdx, MotorOffsetCamera + MotorOffsetMag + MotorOffset_Glass, dDefectPosX, dDefectPosY); |
| | | |
| | | m_pSP2P->CalcMotorOffSetValue(pReview->nModuleIdx, dDefectPosX, dDefectPosY); //< KEJ 20230622 - #4526 ADD > |
| | | //xpostemp = dDefectPosX; |
| | | //ypostemp = dDefectPosY; |
| | | |
| | |
| | | // set offset |
| | | ApplyMotorOffset(pWsi->nModuleIdx, -1, MotorOffsetCamera + MotorOffsetWSI + MotorOffset_Glass, dDefectPosX, dDefectPosY); |
| | | |
| | | m_pSP2P->CalcMotorOffSetValue(pWsi->nModuleIdx, dDefectPosX, dDefectPosY); //< KEJ 20230622 - #4526 ADD > |
| | | |
| | | m_pSP2P->GetOffSetValue(nModuleIdx, pWsi->nAOICameraIdx, pWsi->nAOIScanIdx, pWsi->nUMOriginX / 1000.0, xpostemp, ypostemp); |
| | | |
| | | xpostemp = floor(xpostemp * 1000); |
| | |
| | | //{{NO_DEPENDENCIES}} |
| | | // Microsoft Visual C++ìì ìì±í í¬í¨ íì¼ì
ëë¤. |
| | | // ReviewSystem.rcìì ì¬ì©ëê³ ììµëë¤. |
| | | // Microsoft Visual C++ìì ìì±í í¬í¨ íì¼ì
ëë¤. |
| | | // ReviewSystem.rcìì ì¬ì©ëê³ ììµëë¤. |
| | | // |
| | | #define IDCANCEL 2 |
| | | #define IDD_ABOUTBOX 100 |
| | |
| | | #define IDD_REVIEWSYSTEM_FORM 101 |
| | | #define IDD_DLG_RESULT_GRAPH 103 |
| | | #define IDR_POPUP_EDIT 119 |
| | | #define ID_STATUSBAR_PANE1 120 |
| | | #define ID_STATUSBAR_PANE2 121 |
| | | #define IDS_STATUS_PANE1 122 |
| | | #define IDS_STATUS_PANE2 123 |
| | | #define IDS_TOOLBAR_STANDARD 124 |
| | |
| | | #define IDD_DLG_DEFECT_MAP_TAB 374 |
| | | #define IDD_DLG_ALIGN_TAB 376 |
| | | #define IDB_BITMAP2 379 |
| | | #define IDD_DLG_MOTOR_OFFSET_TOOL 380 |
| | | #define IDD_DLG_HARDWARE_SETTING_MODE 381 |
| | | #define IDC_RADIO1 1001 |
| | | #define IDC_RADIO_ZOOM_LEVEL_0 1001 |
| | |
| | | #define IDC_RADIO_ZOOM_LEVEL_2 1003 |
| | | #define IDC_RADIO_MAP_TYPE_1 1003 |
| | | #define IDC_RADIO_IMAGE_MODE_2 1003 |
| | | #define IDC_CHECK1 1004 |
| | | #define IDC_CHECK_CAMERA_CONTROL 1004 |
| | | #define IDC_RADIO_MAP_TYPE_3 1004 |
| | | #define IDC_RADIO_IMAGE_MODE_3 1004 |
| | | #define IDC_CHECK_REDUCE 1004 |
| | |
| | | #define IDC_IMAGE_FLIP 1005 |
| | | #define IDC_SLIDER2 1006 |
| | | #define IDC_SLIDER_EXPOSURE_TIME 1006 |
| | | #define IDC_CHECK_AFM_TRACKING 1006 |
| | | #define IDC_BUTTON_UI_RIGHT1 1006 |
| | | #define IDC_CHECK2 1007 |
| | | #define IDC_CHECK_MEASURE_POINT 1007 |
| | | #define IDC_CHECK_JOG_UP 1007 |
| | | #define IDC_RADIO_ZOOM_LEVEL_3 1007 |
| | | #define IDC_USE_DEFECT 1007 |
| | | #define IDC_BUTTON2 1008 |
| | | #define IDC_CHECK_MEASURE_POINT2 1008 |
| | | #define IDC_CHECK_CAMERA_RANGE 1008 |
| | | #define IDC_CHECK_REVIEW_PATH 1008 |
| | | #define IDC_CHECK_DRAW_REVIEW_PATH 1008 |
| | | #define IDC_SLIDER_LIGHT_LEVEL_1 1008 |
| | | #define IDC_SLIDER_LIGHT_LEVEL_TRANS 1008 |
| | |
| | | #define IDC_BUTTON_PROGRAMEXIT 1008 |
| | | #define IDC_BUTTON_ALIGNCAM_GRAB 1008 |
| | | #define IDC_SPIN2 1009 |
| | | #define IDC_CHECK_REVIEW_PATH2 1009 |
| | | #define IDC_CHECK_AUTO_SELECT_CAMERA 1009 |
| | | #define IDC_CHECK_DRAW_SELECTED_DEFECT 1009 |
| | | #define IDC_BUTTON_APPLY_GRID_DATA 1009 |
| | | #define IDC_STATIC_ALIGN_RESULT 1010 |
| | | #define IDC_CHECK_REVIEW_PATH3 1010 |
| | | #define IDC_CHECK_DRAW_WSI_PATH 1010 |
| | | #define IDC_BUTTON_APPLT_OFFSET_PARAM 1010 |
| | | #define IDC_BUTTON_PREV_IMAGE 1011 |
| | | #define IDC_STATIC_ALIGN_ANGLE 1011 |
| | | #define IDC_BUTTON_PREV_BUFFER 1011 |
| | | #define IDC_CHECK_REVIEW_PATH4 1011 |
| | | #define IDC_CHECK_DRAW_CELL 1011 |
| | | #define IDC_STATIC_SIGNAL_SIGNAL_LOADING 1012 |
| | | #define IDC_BUTTON_NEXT_IMAGE 1012 |
| | | #define IDC_STATIC_ALIGN_DXDY 1012 |
| | | #define IDC_BUTTON_NEXT_BUFFER 1012 |
| | | #define IDC_STATIC_ALIGN_DX 1012 |
| | | #define IDC_CHECK_REVIEW_PATH5 1012 |
| | | #define IDC_CHECK_DRAW_DEFECT 1012 |
| | | #define IDC_BUTTON_JOG_UP 1013 |
| | | #define IDC_STATIC_ALIGN_DY 1013 |
| | | #define IDC_CHECK_REVIEW_PATH6 1013 |
| | | #define IDC_CHECK_CAMERA_POSITION 1013 |
| | | #define IDC_CHECK_DRAW_CAMERA_POSITION 1013 |
| | | #define IDC_STATIC_SIGNAL_SIGNAL_REVIEW_START 1014 |
| | | #define IDC_BUTTON_JOG_DOWN 1014 |
| | | #define IDC_STATIC_ALIGN_OX 1014 |
| | | #define IDC_CHECK_REVIEW_PATH7 1014 |
| | | #define IDC_CHECK_DRAW_RULER 1014 |
| | | #define IDC_CHECK_USE_WSI 1014 |
| | | #define IDC_STATIC_SIGNAL_SIGNAL_REVIEW_END 1015 |
| | | #define IDC_STATIC_ALIGN_OY 1015 |
| | | #define IDC_CHECK_REVIEW_PATH8 1015 |
| | | #define IDC_CHECK_DRAW_REVIEW_DEFECT 1015 |
| | | #define IDC_STATIC_SIGNAL_SIGNAL_UNLOADING 1016 |
| | | #define IDC_CHECK_DRAW_WSI_DEFECT 1016 |
| | | #define IDC_CHECK_DRAW_USER_PATH 1017 |
| | | #define IDC_STATIC_SIGNAL_SIGNAL_VCR_READ 1017 |
| | | #define IDC_CHECK_DRAW_WSI_PATH3 1018 |
| | | #define IDC_CHECK_DRAW_MEASURE_PATH 1018 |
| | | #define IDC_CHECK_USE_WSI_MEASUREMENT 1019 |
| | | #define IDC_EDIT_GO_POS_X 1022 |
| | |
| | | #define IDC_LIST_DEFECT 1036 |
| | | #define IDC_BUTTON_MOTOR_GO_XY 1037 |
| | | #define IDC_LIST_LOG 1038 |
| | | #define IDC_BUTTON_UI_EXPAND 1038 |
| | | #define IDC_CHECK_UI_REDUCE 1038 |
| | | #define IDC_CHECK_TYPE_B 1039 |
| | | #define OnBnClickedButtonUiRight 1039 |
| | | #define IDC_BUTTON_UI_RIGHT 1039 |
| | | #define IDC_CHECK_TYPE_B2 1040 |
| | | #define IDC_CHECK_TYPE_W 1040 |
| | | #define IDC_STATIC_MEASURE_GRAPH 1040 |
| | | #define IDC_STATIC_GRAPH_VIEW 1040 |
| | | #define IDC_COMBO_VIEW_FIRST 1041 |
| | | #define IDC_COMBO2 1042 |
| | | #define IDC_COMBO_VIEW_SECOND 1042 |
| | | #define IDC_GRID_MAP_OPTION 1042 |
| | | #define IDC_COMBO_SELECT_MODULE 1042 |
| | | #define IDC_STATIC_DATE_TIME 1043 |
| | | #define IDC_STATIC_VERSION 1044 |
| | | #define IDC_COMBO1 1044 |
| | | #define IDC_COMBO_VIEW_MODE 1044 |
| | | #define IDC_COMBO_MODE 1044 |
| | | #define IDC_COMBO_FLANTESS_MODE 1044 |
| | | #define IDC_COMBO_MODULE_INDEX 1044 |
| | |
| | | #define IDC_STATIC_VERSION4 1049 |
| | | #define IDC_EDIT_WSI_RTB_01 1049 |
| | | #define IDC_EDIT_SCAN_INDEX 1049 |
| | | #define IDC_BUTTON3 1050 |
| | | #define IDC_BUTTON_LONG_RUN_STOP 1050 |
| | | #define IDC_STATIC_TOTAL_DEFECT2 1050 |
| | | #define IDC_STATIC_TOTAL_DEFECT 1050 |
| | |
| | | #define IDC_STATIC_MACHINETYPE 1053 |
| | | #define IDC_EDIT8 1053 |
| | | #define IDC_GRID_AFM_INFO 1054 |
| | | #define IDC_EDIT9 1054 |
| | | #define IDC_EDIT10 1055 |
| | | #define IDC_EDIT11 1056 |
| | | #define IDC_EDIT12 1057 |
| | | #define IDC_STATIC_X_JOG_PLUS 1058 |
| | | #define IDC_EDIT15 1058 |
| | | #define IDC_STATIC_Y_JOG_PLUS 1059 |
| | | #define IDC_EDIT14 1059 |
| | | #define IDC_STATIC_R_JOG_PLUS 1060 |
| | | #define IDC_EDIT13 1060 |
| | | #define IDC_STATIC_X_JOG_MINUS 1061 |
| | | #define IDC_EDIT17 1061 |
| | | #define IDC_STATIC_Y_JOG_MINUS 1062 |
| | | #define IDC_EDIT18 1062 |
| | | #define IDC_STATIC_R_JOG_MINUS 1063 |
| | | #define IDC_EDIT19 1063 |
| | | #define IDC_BUTTON_ALIGN_PROCESS 1064 |
| | | #define IDC_EDIT20 1064 |
| | | #define IDC_STATIC_SIGNAL_SIGNAL_ALIGN_START 1065 |
| | | #define IDC_EDIT21 1065 |
| | | #define IDC_STATIC_SIGNAL_SIGNAL_READ_RAWFILE 1066 |
| | | #define IDC_TAB_CONTROL 1067 |
| | | #define IDC_CHECK_DIGITAL_ZOOM 1068 |
| | | #define IDC_SLIDER_JOG_SPEED 1069 |
| | | #define IDC_GRID_CAMERA_POS 1070 |
| | | #define IDC_RADIO_MAP_TYPE_4 1071 |
| | |
| | | #define IDC_BUTTON_GLASS_GO_XY 1090 |
| | | #define IDC_EDIT_REVIEW_CAMCOUNT 1090 |
| | | #define IDC_EDIT_WSI_HEIGHT5 1090 |
| | | #define IDC_BUTTON_TEST1 1091 |
| | | #define IDC_KEY_JOD_MOVE 1091 |
| | | #define IDC_EDIT_JUDGE_DATA_Z_RANGE 1091 |
| | | #define IDC_EDIT16 1091 |
| | | #define IDC_EDIT_SETTINGFILE_PATH 1091 |
| | | #define IDC_EDIT_WSI_HEIGHT6 1091 |
| | | #define IDC_BUTTON_GLASS_GO_XY3 1092 |
| | | #define IDC_BUTTON_TEST2 1092 |
| | | #define IDC_EDIT_XPOS_COUNT 1092 |
| | | #define IDC_EDIT_WSI_HEIGHT7 1092 |
| | | #define IDC_CHECK_AFM_TRACK 1093 |
| | | #define IDC_EDIT_RANGE_COUNT_FLATNESS 1093 |
| | | #define IDC_EDIT_WSI_HEIGHT8 1093 |
| | | #define IDC_BUTTON_GLASS_GO_XY2 1094 |
| | | #define IDC_BUTTON_GLASSCENTER_GO_XY 1094 |
| | | #define IDC_EDIT_GLASS_SIZE_X 1094 |
| | | #define IDC_EDIT_WSI_HEIGHT9 1094 |
| | |
| | | #define IDC_GRID_MOTOR_POS2 1106 |
| | | #define IDC_GRID_GLASS_POS 1106 |
| | | #define IDC_EDIT_REVIEW_PANEL_POS_X3 1106 |
| | | #define IDC_CHECK3 1107 |
| | | #define IDC_GRID_GLASSCENTER_POS 1107 |
| | | #define IDC_EDIT_REVIEW_PANEL_POS_Y3 1107 |
| | | #define IDC_EDIT_REVIEW_PANEL_POS_X4 1108 |
| | | #define IDC_BUTTON1 1109 |
| | | #define IDC_BUTTON_VERSION 1109 |
| | | #define IDC_INS_HOOK 1109 |
| | | #define IDC_BUTTON_REDUCE 1109 |
| | | #define IDC_BUTTON_GET_TEMPLETE_IMAGE 1109 |
| | | #define IDC_BUTTON_MANUAL 1109 |
| | | #define IDC_BT_REVIEW_POPUP 1109 |
| | |
| | | #define IDC_BUTTON_AFM_CONNECT 1109 |
| | | #define IDC_GRID_ALIGN_INFO 1110 |
| | | #define IDC_EDIT_UPDATE_NOTE 1110 |
| | | #define IDC_BUTTON4 1110 |
| | | #define IDC_UNINS_HOOK 1110 |
| | | #define IDC_BUTTON_RIGHT 1110 |
| | | #define IDC_BUTTON_SIMULATION 1110 |
| | |
| | | #define IDC_GO_WSI 1116 |
| | | #define IDC_CHECK_USE_WSI_CONTROL 1116 |
| | | #define IDC_BUTTON_ALIGN_CAM_DISCONNECT 1116 |
| | | #define IDC_CHECK4 1117 |
| | | #define IDC_SELECT_OFFSET_ON 1117 |
| | | #define IDC_BUTTON_REVIEW_CAM_CONNECT 1117 |
| | | #define IDC_CHECK5 1118 |
| | | #define IDC_NOT_USE_CENTER_POS 1118 |
| | | #define IDC_CHECK_USE_SIMULATION 1118 |
| | | #define IDC_BUTTON_REVIEW_CAM_DISCONNECT 1120 |
| | |
| | | #define IDC_EDIT_GANTRY_MOTOR_Y4 1158 |
| | | #define IDC_EDIT_OFFSET_Y_VALUE 1159 |
| | | #define IDC_EDIT_GANTRY_PIXEL_X4 1159 |
| | | #define IDC_BUTTON_MOTOR_OFFSET_TOOL 1159 |
| | | #define IDC_EDIT_CAMERA_COUNT 1160 |
| | | #define IDC_EDIT_GANTRY_PIXEL_Y4 1160 |
| | | #define IDC_PROGRESS_PROCESS 1161 |
| | |
| | | #define IDC_OFFSET_LOAD 1185 |
| | | #define IDC_EDIT_WARN_STANDARD 1186 |
| | | #define IDC_EDIT_HARD_STANDARD 1187 |
| | | #define IDC_BUTTON_STANDARD_SAVE 1188 |
| | | #define IDC_STATIC_REVIEW_CAMERA 1189 |
| | | #define ID_INS_HOOK 32772 |
| | | #define ID_UNINS_HOOK 32773 |
| | | #define IDC_EDIT_MOTOR_OFFSET_COUNTX 1190 |
| | | #define IDC_EDIT_MOTOR_OFFSET_COUNTY 1191 |
| | | #define IDC_GRID_MOTOR_OFFSET_INFO 1192 |
| | | #define IDC_COMBO_MOTOR_OFFSET_MODULEIDX 1193 |
| | | |
| | | // Next default values for new objects |
| | | // |
| | | #ifdef APSTUDIO_INVOKED |
| | | #ifndef APSTUDIO_READONLY_SYMBOLS |
| | | #define _APS_NEXT_RESOURCE_VALUE 383 |
| | | #define _APS_NEXT_RESOURCE_VALUE 385 |
| | | #define _APS_NEXT_COMMAND_VALUE 32775 |
| | | #define _APS_NEXT_CONTROL_VALUE 1190 |
| | | #define _APS_NEXT_CONTROL_VALUE 1194 |
| | | #define _APS_NEXT_SYMED_VALUE 346 |
| | | #endif |
| | | #endif |
| | |
| | | #define WM_OFFSETTOOL_MESSAGE2 (WM_USER + 9998) |
| | | #define WM_OFFSETTOOL_MESSAGE (WM_USER + 9999) |
| | | |
| | | /* < KEJ 20230621 - #4528 ADD Start > */ |
| | | enum OFFSETCOUNT { |
| | | CAM_MAX_COUNT = 20, XPOS_MAX_COUNT = 10, YPOS_MAX_COUNT = 10, SCAN_MAX_COUNT = 10, AOI_MAX_COUNT = 10, PROGRESS_BAR_MAX = 2000 |
| | | }; |
| | | |
| | | enum COLORTYPE { |
| | | FFA7A7 = RGB(255, 167, 167), |
| | | FFC19E = RGB(255, 193, 158), |
| | | FFE08C = RGB(255, 224, 140), |
| | | FAED7D = RGB(250, 237, 125), |
| | | FFB2F5 = RGB(255, 178, 245), |
| | | |
| | | A566FF = RGB(165, 102, 255), |
| | | D9418C = RGB(217, 65, 140), |
| | | A00D8FF = RGB(0, 216, 255), |
| | | A2F9D27 = RGB(47, 157, 39), |
| | | A4641D9 = RGB(70, 65, 217) |
| | | }; |
| | | /* < KEJ 20230621 - #4528 ADD End > */ |
| | | |
| | | #include <GdiPlus.h> |
| | | using namespace Gdiplus; |