| | |
| | | CCjPageBase::OnInitDialog(); |
| | | |
| | | |
| | | // 若你的资源里有一个占位的 ListCtrl(比如 IDC_LIST1),这里做子类化: |
| | | m_selector.SubclassDlgItem(IDC_LIST_SELECTOR, this); |
| | | |
| | | // 初始化:4 列 × 8 行 |
| | | m_selector.InitGrid(4, 8); |
| | | m_selector.SetColumnWidths(100, 180); |
| | | m_selector.SetRowHeight(36); |
| | | |
| | | // 设置列信息 |
| | | m_selector.SetPortInfo(0, _T("Port 1"), _T("Carrier A")); |
| | | m_selector.SetPortInfo(1, _T("Port 2"), _T("Carrier B")); |
| | | m_selector.SetPortInfo(2, _T("Port 3"), _T("Carrier C")); |
| | | m_selector.SetPortInfo(3, _T("Port 4"), _T("Carrier D")); |
| | | |
| | | // 设置部分 Glass(核心ID固定) |
| | | m_selector.SetSlotGlass(0, 0, TRUE, _T("001"), CCarrierSlotSelector::MAT_G1); |
| | | m_selector.SetSlotGlass(0, 1, TRUE, _T("002"), CCarrierSlotSelector::MAT_G1); |
| | | m_selector.SetSlotGlass(0, 3, TRUE, _T("004"), CCarrierSlotSelector::MAT_G1); |
| | | |
| | | m_selector.SetSlotGlass(1, 0, TRUE, _T("101"), CCarrierSlotSelector::MAT_G2); |
| | | m_selector.SetSlotGlass(1, 1, TRUE, _T("102"), CCarrierSlotSelector::MAT_G2); |
| | | m_selector.SetSlotGlass(1, 2, TRUE, _T("103"), CCarrierSlotSelector::MAT_G2); |
| | | m_selector.SetSlotGlass(1, 5, TRUE, _T("106"), CCarrierSlotSelector::MAT_G2); |
| | | m_selector.SetSlotGlass(1, 7, TRUE, _T("108"), CCarrierSlotSelector::MAT_G2); |
| | | |
| | | m_selector.SetSlotGlass(2, 5, TRUE, _T("206"), CCarrierSlotSelector::MAT_G1); |
| | | m_selector.SetSlotGlass(2, 6, TRUE, _T("207"), CCarrierSlotSelector::MAT_G1); |
| | | m_selector.SetSlotGlass(2, 7, TRUE, _T("208"), CCarrierSlotSelector::MAT_G1); |
| | | |
| | | m_selector.SetSlotGlass(3, 0, TRUE, _T("301"), CCarrierSlotSelector::MAT_G1); |
| | | |
| | | // 锁定 Port 1(示例) |
| | | m_selector.SetPortAllocated(0, TRUE, _T("ProcessJob 1")); |
| | | |
| | | |
| | | UpdatePjData(); |
| | | |
| | | |
| | |
| | | GetDlgItemText(IDC_EDIT_PJ_ID, szBuffer, 256); |
| | | pProcessJob->setId(std::string(szBuffer)); |
| | | |
| | | // 更新配方 |
| | | CString strRecipe; |
| | | CComboBox* pComboBox = (CComboBox*)GetDlgItem(IDC_COMBO_RECIPE); |
| | | int idx = pComboBox->GetCurSel(); |
| | | if (idx >= 0) { |
| | | pComboBox->GetLBText(idx, strRecipe); |
| | | #ifdef UNICODE |
| | | CT2A utf8Str(strRecipe, CP_UTF8); |
| | | std::string recipe(utf8Str); |
| | | #else |
| | | std::string recipe(strRecipe.GetString()); |
| | | #endif |
| | | |
| | | pProcessJob->setRecipe(SERVO::RecipeMethod::NoTuning, recipe); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | ContentChanged(1); |
| | | } |
| | | |