From 6b96e32ce41d3ba54bcb7962683cbf8c440fe091 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期四, 11 九月 2025 09:02:29 +0800
Subject: [PATCH] 1.修改微调WIP子项数据的背景为更浅的绿色; 2.已绑定的Glass路径跟随主Glass
---
SourceCode/Bond/Servo/CEquipment.cpp | 2 ++
SourceCode/Bond/Servo/CPageGlassList.cpp | 25 +++++++++++++++++--------
2 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/SourceCode/Bond/Servo/CEquipment.cpp b/SourceCode/Bond/Servo/CEquipment.cpp
index e390343..83f1c09 100644
--- a/SourceCode/Bond/Servo/CEquipment.cpp
+++ b/SourceCode/Bond/Servo/CEquipment.cpp
@@ -917,6 +917,8 @@
ASSERT(pGlass);
Lock();
pGlass->addPath(m_nID, getSlotUnit(putSlot), putSlot);
+ CGlass* pBuddy = pGlass->getBuddy();
+ if (pBuddy != nullptr) pBuddy->addPath(m_nID, getSlotUnit(putSlot), putSlot);
m_slot[putSlot - 1].setContext(pGlass);
pGlass->release(); // tempFetchOut需要调用一次release
Unlock();
diff --git a/SourceCode/Bond/Servo/CPageGlassList.cpp b/SourceCode/Bond/Servo/CPageGlassList.cpp
index 2707729..98daad4 100644
--- a/SourceCode/Bond/Servo/CPageGlassList.cpp
+++ b/SourceCode/Bond/Servo/CPageGlassList.cpp
@@ -15,9 +15,13 @@
#include <vector>
#include <string>
-#define PAGE_SIZE 10
+#define PAGE_SIZE 50
#define PAGE_BACKGROUND_COLOR RGB(252, 252, 255)
+// WIP 棰滆壊锛氱埗锛堟牴/鏃� buddy锛�= 鍩虹缁匡紱瀛愶紙buddy锛�= 鏇存祬
+static const COLORREF kWipText = RGB(0, 0, 0);
+static const COLORREF kWipParentBk = RGB(201, 228, 180); // 鍩虹缁�
+static const COLORREF kWipChildBk = RGB(221, 241, 208); // 鏇存祬涓�鐐�
// ===== 鏀惧湪 CPageGlassList.cpp 椤堕儴鐨勫尶鍚嶅伐鍏凤紙鏂囦欢鍐呴潤鎬侊級 =====
// 鎶婂綋鍓嶁�滃凡灞曞紑鈥濈殑鐖惰锛岀敤瀹冧滑鐨� classId锛堢4鍒楁枃鏈級鍋� key 璁板綍涓嬫潵
@@ -225,7 +229,7 @@
// 4 缁勮法椤甸厤瀵癸紙姣忕粍涓棿鎻� 3 鏉♀�滃崟鏉♀�濓級
for (int k = 101; k <= 104; ++k) mkPair(k, true);
// 鑻ュ共鈥滃崟鏉♀��
- for (int u = 201; u < 206; ++u) {
+ for (int u = 201; u < 806; ++u) {
CString cid; cid.Format(_T("U%04d"), u);
outAll.push_back(FakeDbRecord{
id++, 500 + u, 600 + u, toAnsi(cid),
@@ -565,7 +569,7 @@
auto* nParent = m_listCtrl.InsertRoot(pcols);
MaybeRestoreExpandByKey(nParent, expandedKeys);
- m_listCtrl.SetNodeColor(nParent, RGB(0, 0, 0), RGB(201, 228, 180));
+ m_listCtrl.SetNodeColor(nParent, kWipText, kWipParentBk); // 鐖讹細鍩虹缁�
std::vector<CString> ccols(colCount);
ccols[1] = _T("");
@@ -582,7 +586,7 @@
ccols[12] = child->getParamsDescription().c_str();
auto* nChild = m_listCtrl.InsertChild(nParent, ccols);
- m_listCtrl.SetNodeColor(nChild, RGB(0, 0, 0), RGB(201, 228, 180));
+ m_listCtrl.SetNodeColor(nChild, kWipText, kWipChildBk); // 瀛愶細鏇存祬
usedWip.insert(parent);
usedWip.insert(child);
@@ -603,7 +607,7 @@
cols[12] = g->getParamsDescription().c_str();
auto* n = m_listCtrl.InsertRoot(cols);
- m_listCtrl.SetNodeColor(n, RGB(0, 0, 0), RGB(201, 228, 180));
+ m_listCtrl.SetNodeColor(n, kWipText, kWipParentBk); // 浠嶇敤鍩虹缁�
usedWip.insert(g);
}
}
@@ -991,6 +995,7 @@
std::vector<SERVO::CGlass*> wipGlasses;
theApp.m_model.m_master.getWipGlasses(wipGlasses);
std::vector<SERVO::CGlass*> tempRetain = wipGlasses; // 绋嶅悗缁熶竴 release
+ /*
static int i = 0;
i++;
if (i == 8) {
@@ -1009,7 +1014,7 @@
}
}
}
-
+ */
auto makeColsFromWip = [&](SERVO::CGlass* g) {
std::vector<CString> cols(colCount);
cols[1] = _T(""); // WIP 娌� DB id
@@ -1122,7 +1127,8 @@
needRebuildChildren = true;
auto cols = makeColsFromWip(b);
auto* ch = m_listCtrl.InsertChild(container, cols);
- m_listCtrl.SetNodeColor(ch, RGB(0, 0, 0), RGB(201, 228, 180));
+ m_listCtrl.SetNodeColor(ch, kWipText, kWipChildBk); // 瀛愶細鏇存祬
+ m_listCtrl.SetNodeColor(container, kWipText, kWipParentBk); // 鐖讹細鍩虹缁匡紙鍏滃簳绾犳锛�
}
// 鑻ュ凡鏈夊瓙锛氶『甯︽妸瀛愯鏂囨湰鍒锋柊涓�涓嬶紙姣斿 AOI 鏇存柊锛�
else if (hasChildAlready) {
@@ -1134,8 +1140,11 @@
// 鍙琛屽埛鏂�
for (int r = 0; r < m_listCtrl.GetItemCount(); ++r) {
if (m_listCtrl.GetNodeByVisibleIndex(r) == ch.get()) {
- for (int c = 1; c < (int)cols.size(); ++c)
+ for (int c = 1; c < (int)cols.size(); ++c) {
m_listCtrl.SetItemText(r, c, cols[c]);
+ m_listCtrl.SetNodeColor(ch.get(), kWipText, kWipChildBk); // 淇濊瘉瀛愯鏄祬鑹�
+ m_listCtrl.SetNodeColor(container, kWipText, kWipParentBk); // 鐖朵繚鎸佸熀纭�缁�
+ }
rowsToRedraw.push_back(r);
break;
}
--
Gitblit v1.9.3