LAPTOP-SNT8I5JK\Boounion
2025-06-06 980048d93f7ee401639d441d65f4f885749fd898
1.Glass List页面修改为Slot并以Slot的形式展现数据,不论有无Glass
已修改5个文件
43 ■■■■■ 文件已修改
SourceCode/Bond/Servo/CEquipment.cpp 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CEquipment.h 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CEquipmentPage2.cpp 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CPageGraph2.cpp 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/Servo.rc 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CEquipment.cpp
@@ -1192,6 +1192,12 @@
        return nullptr;
    }
    CSlot* CEquipment::getSlot(int index)
    {
        if (index >= SLOT_MAX) return nullptr;
        return &m_slot[index];
    }
    CGlass* CEquipment::getGlassFromSlot(int slotNo)
    {
        CSlot* pSlot = nullptr;
SourceCode/Bond/Servo/CEquipment.h
@@ -150,6 +150,9 @@
        // unitNo: 0:local; Others:unit No
        int recipeParameterRequest(short masterRecipeId, short localRecipeId, short unitNo);
        // 获取指定的Slot
        CSlot* getSlot(int index);
        // 获取一个可用的槽位
        CSlot* getAvailableSlot();
SourceCode/Bond/Servo/CEquipmentPage2.cpp
@@ -74,22 +74,29 @@
    ListView_SetImageList(m_listCtrl.GetSafeHwnd(), imageList, LVSIL_SMALL);
    m_listCtrl.InsertColumn(0, _T(""), LVCFMT_RIGHT, width[0]);
    m_listCtrl.InsertColumn(1, _T("ID"), LVCFMT_LEFT, width[1]);
    m_listCtrl.InsertColumn(2, _T("贴合"), LVCFMT_LEFT, width[2]);
    m_listCtrl.InsertColumn(3, _T("时间"), LVCFMT_LEFT, width[3]);
    m_listCtrl.SetColumnWidth(3, LVSCW_AUTOSIZE_USEHEADER);
    m_listCtrl.InsertColumn(2, _T("名称"), LVCFMT_LEFT, width[2]);
    m_listCtrl.InsertColumn(3, _T("Glass ID"), LVCFMT_LEFT, width[3]);
    m_listCtrl.InsertColumn(4, _T("贴合Glass ID"), LVCFMT_LEFT, width[4]);
    m_listCtrl.InsertColumn(5, _T("时间"), LVCFMT_LEFT, width[5]);
    m_listCtrl.SetColumnWidth(5, LVSCW_AUTOSIZE_USEHEADER);
    ASSERT(m_pEquipment);
    for (int i = 0; i < SLOT_MAX; i++) {
        SERVO::CGlass* pGlass = m_pEquipment->getGlassFromSlot(i+1);
        if (pGlass != nullptr) {
            pGlass->addRef();
            SERVO::CGlass* pBuddy = pGlass->getBuddy();
        SERVO::CSlot* pSlot = m_pEquipment->getSlot(i);
        if (pSlot != nullptr && pSlot->isEnable()) {
            int index = m_listCtrl.InsertItem(m_listCtrl.GetItemCount(), _T(""));
            m_listCtrl.SetItemData(index, (DWORD_PTR)pGlass);
            m_listCtrl.SetItemText(index, 1, pGlass->getID().c_str());
            m_listCtrl.SetItemData(index, (DWORD_PTR)pSlot);
            m_listCtrl.SetItemText(index, 1, std::to_string(pSlot->getNo()).c_str());
            m_listCtrl.SetItemText(index, 2, pSlot->getName().c_str());
            SERVO::CGlass* pGlass = (SERVO::CGlass*)pSlot->getContext();
            if (pGlass != nullptr) {
                m_listCtrl.SetItemText(index, 3, pGlass->getID().c_str());
                SERVO::CGlass* pBuddy = pGlass->getBuddy();
            if (pBuddy != nullptr) {
                m_listCtrl.SetItemText(index, 2, pBuddy->getID().c_str());
                    m_listCtrl.SetItemText(index, 4, pBuddy->getID().c_str());
                }
            }
        }
    }
@@ -122,11 +129,6 @@
        strItem.Format(_T("Col_%d_Width"), i);
        strTemp.Format(_T("%d"), rect.right - rect.left);
        WritePrivateProfileString("EquipmentPage2ListCtrl", strItem, strTemp, strIniFile);
    }
    for (int i = 0; i < m_listCtrl.GetItemCount(); i++) {
        SERVO::CGlass* pGlass = (SERVO::CGlass*)m_listCtrl.GetItemData(i);
        pGlass->release();
    }
}
SourceCode/Bond/Servo/CPageGraph2.cpp
@@ -148,7 +148,7 @@
        CEquipmentPage2* pPage2 = new CEquipmentPage2();
        pPage2->setEquipment(pEquipment);
        pPage2->Create(IDD_PAGE_EQUIPMENT2);
        dlg.addPage(pPage2, "Glass");
        dlg.addPage(pPage2, "Slots");
        if (pEquipment->getID() == EQ_ID_EFEM) {
            CEquipmentPage3* pPage3 = new CEquipmentPage3();
SourceCode/Bond/Servo/Servo.rc
Binary files differ