From d06ab39efafbcb2a7b1ec4cb83e18fa3485789a9 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期六, 29 三月 2025 08:55:56 +0800
Subject: [PATCH] 1.修改两个函数名称;
---
SourceCode/Bond/Servo/CPageGraph2.cpp | 55 ++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 38 insertions(+), 17 deletions(-)
diff --git a/SourceCode/Bond/Servo/CPageGraph2.cpp b/SourceCode/Bond/Servo/CPageGraph2.cpp
index 00e7b4c..4d6b07f 100644
--- a/SourceCode/Bond/Servo/CPageGraph2.cpp
+++ b/SourceCode/Bond/Servo/CPageGraph2.cpp
@@ -5,6 +5,9 @@
#include "Servo.h"
#include "CPageGraph2.h"
#include "afxdialogex.h"
+#include "CHMPropertyDlg.h"
+#include "CEquipmentPage1.h"
+#include "CEquipmentPage2.h"
// CPageGraph2 瀵硅瘽妗�
@@ -54,11 +57,6 @@
ASSERT(pPin1->pData);
ASSERT(pPin2->pData);
- //int nRet = ((IPin*)pPin1->pData)->checkConnectPin((IPin*)pPin2->pData);
- //if (nRet >= 0) {
- // return true;
- //}
-
return false;
};
listener.onConnectPin = [](PIN* pPin1, PIN* pPin2) -> bool {
@@ -67,35 +65,38 @@
ASSERT(pPin1->pData);
ASSERT(pPin2->pData);
- //int nRet = ((IPin*)pPin1->pData)->connectPin((IPin*)pPin2->pData);
- //if (nRet >= 0) {
- // return true;
- //}
-
return false;
};
listener.onDisconnectPin = [](PIN* pPin) -> bool {
ASSERT(pPin);
ASSERT(pPin->pData);
- //int nRet = ((IPin*)pPin->pData)->disconnect();
- //if (nRet >= 0) {
- // return true;
- //}
-
return false;
};
listener.onDeleteEqItem = [&](EQITEM* pItem) -> bool {
ASSERT(pItem);
ASSERT(pItem->pData);
- return true;
- // return _filterManager.unload((CFilter*)pFilter->pData) >= 0;
+ return false;
};
listener.onEqItemPosChanged = [&](EQITEM* pItem, int x, int y) -> void {
ASSERT(pItem);
};
listener.onDblckEqItem = [&](EQITEM* pItem) -> bool {
ASSERT(pItem);
+ SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData;
+
+ CHMPropertyDlg dlg(pEquipment->getName().c_str(), 600, 680);
+ CEquipmentPage1* pPage1 = new CEquipmentPage1();
+ pPage1->setEquipment(pEquipment);
+ pPage1->Create(IDD_PAGE_EQUIPMENT1);
+ dlg.addPage(pPage1, "test1");
+
+ CEquipmentPage2* pPage2 = new CEquipmentPage2();
+ pPage2->setEquipment(pEquipment);
+ pPage2->Create(IDD_PAGE_EQUIPMENT2);
+ dlg.addPage(pPage2, "Glass");
+
+ dlg.DoModal();
return true;
};
listener.onRclickEqItem = [&](EQITEM* pItem) -> bool {
@@ -146,10 +147,30 @@
SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData;
pEquipment->outputGlass(1);
}
+ else if (nCmd == ID_EQSGRAPHITEM_TEST3) {
+ SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData;
+ SERVO::CGlass* pGlass = pEquipment->getFrontGlass();
+ if (pGlass != nullptr) {
+ std::string strDescription;
+ SERVO::CPath* pPath = pGlass->getPath();
+ while (pPath != nullptr) {
+ pPath->getDescription(strDescription);
+ AfxMessageBox(strDescription.c_str());
+ pPath = pPath->getNext();
+ }
+ }
+ }
return true;
};
+ listener.onSelectEqItem = [&](EQITEM* pItem) -> bool {
+ ASSERT(pItem);
+ SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData;
+ theApp.m_model.notifyPtr(RX_CODE_SELECT_EQUIPMENT, pEquipment);
+
+ return true;
+ };
m_pEqsGraphWnd = CEqsGraphWnd::FromHandle(GetDlgItem(IDC_EQSGRAPHWND1)->m_hWnd);
m_pEqsGraphWnd->SetBkgndColor(m_crBkgnd);
--
Gitblit v1.9.3