| | |
| | | pJobDataS->setMaterialsType(m_pjWarps[p].material[i]); |
| | | pJobDataS->setMasterRecipe(nRecipeID); |
| | | |
| | | for (const auto& info : vecRecipeInfo) { |
| | | const std::string& name = info.strDeviceName; |
| | | short nRecipeID = (short)info.nRecipeID; |
| | | for (const auto& info : vecRecipeInfo) { |
| | | const std::string& name = info.strDeviceName; |
| | | short nRecipeID = (short)info.nRecipeID; |
| | | |
| | | if (name == EQ_NAME_EFEM) { |
| | | pJobDataS->setDeviceRecipeId(0, nRecipeID); |
| | | } |
| | | else if (name == EQ_NAME_BONDER1) { |
| | | pJobDataS->setDeviceRecipeId(1, nRecipeID); |
| | | } |
| | | else if (name == EQ_NAME_BONDER2) { |
| | | pJobDataS->setDeviceRecipeId(2, nRecipeID); |
| | | } |
| | | else if (name == EQ_NAME_BAKE_COOLING) { |
| | | pJobDataS->setDeviceRecipeId(3, nRecipeID); |
| | | } |
| | | else if (name == EQ_NAME_VACUUMBAKE) { |
| | | pJobDataS->setDeviceRecipeId(4, nRecipeID); |
| | | } |
| | | else if (name == EQ_NAME_MEASUREMENT) { |
| | | pJobDataS->setDeviceRecipeId(5, nRecipeID); |
| | | } |
| | | if (name == EQ_NAME_EFEM) { |
| | | pJobDataS->setDeviceRecipeId(0, nRecipeID); |
| | | } |
| | | else if (name == EQ_NAME_BONDER1) { |
| | | pJobDataS->setDeviceRecipeId(1, nRecipeID); |
| | | } |
| | | else if (name == EQ_NAME_BONDER2) { |
| | | pJobDataS->setDeviceRecipeId(2, nRecipeID); |
| | | } |
| | | else if (name == EQ_NAME_BAKE_COOLING) { |
| | | pJobDataS->setDeviceRecipeId(3, nRecipeID); |
| | | } |
| | | else if (name == EQ_NAME_VACUUMBAKE) { |
| | | pJobDataS->setDeviceRecipeId(4, nRecipeID); |
| | | } |
| | | else if (name == EQ_NAME_MEASUREMENT) { |
| | | pJobDataS->setDeviceRecipeId(5, nRecipeID); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | // process start |
| | | for (int p = 0; p < 4; p++) { |
| | |
| | | m_pEqsGraphWnd->SetBkgndColor(m_crBkgnd); |
| | | m_pEqsGraphWnd->SetOnListener(listener); |
| | | |
| | | CString strIniFile, strItem; |
| | | strIniFile.Format(_T("%s\\configuration.ini"), (LPTSTR)(LPCTSTR)theApp.m_strAppDir); |
| | | int nIndicatorSize = GetPrivateProfileInt("PageGraph2", _T("IndicatorSize"), 10, strIniFile); |
| | | int nIndicatorMargin = GetPrivateProfileInt("PageGraph2", _T("IndicatorMargin"), 0, strIniFile); |
| | | m_pEqsGraphWnd->SetIndicatorSize(nIndicatorSize); |
| | | m_pEqsGraphWnd->SetIndicatorMargin(nIndicatorMargin); |
| | | |
| | | return TRUE; // return TRUE unless you set the focus to a control |
| | | // 异常: OCX 属性页应返回 FALSE |
| | |
| | | m_nMagneticLinHoz = 0; |
| | | m_nMagneticLinVer = 0; |
| | | m_hFontTitle = nullptr; |
| | | m_nIndicatorSize = 10; |
| | | m_nIndicatorMargin = 3; |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | m_crItemIdText[0] = CColorTransfer::ApproximateColor(m_crItemNameText[0], -0.3f); |
| | | m_crItemIdText[1] = CColorTransfer::ApproximateColor(m_crItemNameText[1], -0.3f); |
| | | } |
| | | |
| | | void CEqsGraphWnd::SetIndicatorSize(int nSize) |
| | | { |
| | | if (nSize > 0) { |
| | | m_nIndicatorSize = nSize; |
| | | } |
| | | } |
| | | |
| | | void CEqsGraphWnd::SetIndicatorMargin(int nMargin) |
| | | { |
| | | if (nMargin >= 0) { |
| | | m_nIndicatorMargin = nMargin; |
| | | } |
| | | } |
| | | |
| | | void CEqsGraphWnd::EnableScroll(BOOL bEnable) |
| | |
| | | ::DrawText(hMemDC, pItem->text, (int)strlen(pItem->text), &rcItem, |
| | | DT_CENTER | DT_VCENTER | DT_SINGLELINE | DT_END_ELLIPSIS); |
| | | |
| | | // 多个指示灯:左上角,按 4 列 × 2 行排列 |
| | | const int indicatorSize = 10; |
| | | const int indicatorMargin = 3; |
| | | const int indicatorsPerRow = 4; |
| | | // indicators vertical column layout |
| | | const int indicatorSize = m_nIndicatorSize; |
| | | const int indicatorMargin = m_nIndicatorMargin; |
| | | const int indicatorX = rcItem.left + 5; |
| | | |
| | | for (int k = 0; k < EQITEM_INDICATOR_COUNT; ++k) { |
| | | BYTE indicatorState = pItem->nIndicatorState[k]; |
| | |
| | | continue; |
| | | } |
| | | |
| | | int row = k / indicatorsPerRow; |
| | | int col = k % indicatorsPerRow; |
| | | |
| | | RECT rcIndicator; |
| | | rcIndicator.left = rcItem.left + 5 + col * (indicatorSize + indicatorMargin); |
| | | rcIndicator.top = rcItem.top + 5 + row * (indicatorSize + indicatorMargin); |
| | | rcIndicator.left = indicatorX; |
| | | rcIndicator.top = rcItem.top + 5 + k * (indicatorSize + indicatorMargin); |
| | | rcIndicator.right = rcIndicator.left + indicatorSize; |
| | | rcIndicator.bottom = rcIndicator.top + indicatorSize; |
| | | |
| | | |
| | | // 画高亮/灰色方块 |
| | | RECT rcInner = rcIndicator; |
| | | ::InflateRect(&rcInner, -1, -1); |
| | | ::FillRect(hMemDC, &rcInner, indicatorState == INDICATOR_STATE_HIGHLIGHT |
| | |
| | | #pragma once |
| | | #pragma once |
| | | #include <functional> |
| | | |
| | | |
| | |
| | | DWORD_PTR pInPins; |
| | | DWORD_PTR pOutPins; |
| | | int nFlashFlag; |
| | | BYTE nIndicatorState[EQITEM_INDICATOR_COUNT]; // 0=隐藏, 1=高亮, 2=灰色 |
| | | BYTE nIndicatorState[EQITEM_INDICATOR_COUNT]; // 0=隐藏, 1=高亮, 2=灰色 |
| | | } EQITEM; |
| | | |
| | | typedef struct tagPIN |
| | |
| | | void FlashItem(EQITEM* pItem); |
| | | void AnimationItem(EQITEM*pItem); |
| | | void ShowItemIndicator(DWORD_PTR dwItemData, int state, int nIndex = 0); |
| | | void SetIndicatorSize(int nSize); |
| | | void SetIndicatorMargin(int nMargin); |
| | | |
| | | private: |
| | | void Init(); |
| | |
| | | EQITEM* m_pFlashItem; |
| | | EQITEM* m_pAnimationItem; |
| | | PIN * m_pCurPin; |
| | | PIN * m_pSelLineOutPin; // 选中的连线的两个pin中的out pin |
| | | PIN * m_pSelLineOutPin; // 选中的连线的两个pin中的out pin |
| | | |
| | | private: |
| | | HWND m_hWnd; |
| | |
| | | HFONT m_hFontTitle; |
| | | |
| | | private: |
| | | BOOL m_bUseGdiPlus; // 使用GDI+绘图? |
| | | COLORREF m_crItemBackground[2]; // item的颜色,normal, active |
| | | COLORREF m_crItemFrame[2]; // item的边框,normal, active |
| | | BOOL m_bUseGdiPlus; // 使用GDI+绘图? |
| | | COLORREF m_crItemBackground[2]; // item的颜色,normal, active |
| | | COLORREF m_crItemFrame[2]; // item的边框,normal, active |
| | | COLORREF m_crItemNameText[2]; |
| | | COLORREF m_crItemIdText[2]; |
| | | COLORREF m_crPinBkgnd[3]; // pin的颜色,normal, active, enable connect |
| | | COLORREF m_crPinBkgnd[3]; // pin的颜色,normal, active, enable connect |
| | | int m_nCurSel; |
| | | EqsGraphListener m_listener; |
| | | CPtrArray m_arItem; |
| | |
| | | int m_nItemRound; |
| | | |
| | | private: |
| | | int m_nStageCx; // 画布大小 |
| | | int m_nStageCx; // 画布大小 |
| | | int m_nStageCy; |
| | | int m_nOffsetX; |
| | | int m_nOffsetY; |
| | | int m_nIndicatorSize; |
| | | int m_nIndicatorMargin; |
| | | |
| | | // 动画 |
| | | // 动画 |
| | | RECTF m_rcAnimation; |
| | | RECTF m_rcAninationStep; |
| | | int m_nAninationStep; |
| | | int m_nAninationDuration; // ms |
| | | |
| | | // 字体 |
| | | // 字体 |
| | | HFONT m_hFontName; |
| | | HFONT m_hFontId; |
| | | |