From bc7f1c4e028e69be51079b59dae4ae5c4d43f5bb Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期六, 31 一月 2026 21:54:56 +0800
Subject: [PATCH] 1.状态指示图,目前灰色表示掉线,绿色表示在线。增加Slot的小点表示有没有料,及加工状态 。 2.增加图示

---
 SourceCode/Bond/Servo/ServoGraph.h |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/SourceCode/Bond/Servo/ServoGraph.h b/SourceCode/Bond/Servo/ServoGraph.h
index 3dc0518..4fcc730 100644
--- a/SourceCode/Bond/Servo/ServoGraph.h
+++ b/SourceCode/Bond/Servo/ServoGraph.h
@@ -62,6 +62,11 @@
 #define HMGRAPH_HT_NOWHERE			0x1
 #define HMGRAPH_HT_ITEM				0x2
 
+enum class SlotBarPos {
+	None = 0,
+	Top,
+	Bottom
+};
 
 class CServoGraph
 {
@@ -95,6 +100,7 @@
 			this->box2FrameColor = RGB(255, 255, 0);;
 			this->bBox2Visible = FALSE;
 			this->m_pData = nullptr;
+			this->slotBarPos = SlotBarPos::None;
 		};
 		~INDICATEBOX() {};
 
@@ -112,6 +118,8 @@
 		BOOL bBox2Visible;
 		std::vector<void*> m_contexts;
 		void* m_pData;
+		SlotBarPos slotBarPos;
+		std::vector<COLORREF> slotColors;
 	};
 
 	class INDICATEBKGND
@@ -144,9 +152,11 @@
 	LRESULT OnTimer(WPARAM wParam, LPARAM lParam);
 	LRESULT OnPaint(WPARAM wParam, LPARAM lParam);
 	LRESULT OnMouseMove(WPARAM wParam, LPARAM lParam);
+	LRESULT OnSize(WPARAM wParam, LPARAM lParam);
 	LRESULT OnLButtonDown(WPARAM wParam, LPARAM lParam);
 
 public:
+	void Invalidata();
 	void AddImage(int id, char* pszPath, int x, int y);
 	void AddIndicateBox(int id, int x, int y, int width);
 	void AddIndicateBox(int id, int x, int y, int width,
@@ -176,6 +186,9 @@
 	void UpdateImageAngle(int id, float angle);
 	void UpdateIndicateBox1Colors(int id, COLORREF newBackgroundColor, COLORREF newFrameColor1, COLORREF newFrameColor2);
 	void UpdateIndicateBox2Colors(int id, COLORREF newBackgroundColor, COLORREF newFrameColor);
+	void SetIndicateBoxSlotBarPosition(int id, SlotBarPos pos);
+	void SetIndicateBoxSlotColors(int id, const std::vector<COLORREF>& colors);
+	void SetSlotBarSize(int size);
 
 private:
 	void DrawImage(HDC hMemDC, IMAGE& item);
@@ -191,6 +204,7 @@
 	std::vector<INDICATEBKGND> m_indicateBkgnds;
 	void* m_pHighItem;
 	HWND m_hWndTooltip;
+	int m_slotBarSize;
 };
 
 #endif // !defined(AFX_EQUIPMENTGRAPH_H__FBB8916A_DE77_4EA3_9C21_E51E6B06194C__INCLUDED_)

--
Gitblit v1.9.3