From a79fcf6a937e1bfe57014d2c99f1bb9f98bfa892 Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期二, 10 二月 2026 10:20:17 +0800
Subject: [PATCH] 1.完善日志; 2.背景图表配置 3.更改EAP通讯端口和设备名;
---
SourceCode/Bond/Servo/ServoGraph.h | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/SourceCode/Bond/Servo/ServoGraph.h b/SourceCode/Bond/Servo/ServoGraph.h
index 445d676..296aae7 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
{
@@ -75,6 +80,7 @@
HBITMAP hBitmap;
int bmWidth;
int bmHeight;
+ float angle;
} IMAGE;
@@ -93,6 +99,8 @@
this->box2BackgroundColor = RGB(0, 255, 255);;
this->box2FrameColor = RGB(255, 255, 0);;
this->bBox2Visible = FALSE;
+ this->m_pData = nullptr;
+ this->slotBarPos = SlotBarPos::None;
};
~INDICATEBOX() {};
@@ -109,6 +117,9 @@
COLORREF box2FrameColor;
BOOL bBox2Visible;
std::vector<void*> m_contexts;
+ void* m_pData;
+ SlotBarPos slotBarPos;
+ std::vector<COLORREF> slotColors;
};
class INDICATEBKGND
@@ -141,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,
@@ -153,6 +166,8 @@
BOOL RemoveIndicateBoxAllContext(int id);
const std::vector<void*>& GetIndicateBoxContexts(int id);
bool IsIndicateBoxContextsEmpty(int id);
+ void SetIndicateBoxData(int id, void* pData);
+ void* GetIndicateBoxData(int id);
void ShowIndicateBoxInterior(int id, COLORREF color);
void HideIndicateBoxInterior(int id);
CServoGraph::INDICATEBOX* GetIndicateBox(int id);
@@ -168,6 +183,16 @@
HWND GetSafeWnd();
void UpdateImageCoordinates(int id, int newX, int newY);
void UpdateIndicateBoxCoordinates(int id, int newX, int newY);
+ 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);
+ void SetSlotBarSizeByCount(int size8, int sizeOther);
+
+private:
+ void DrawImage(HDC hMemDC, IMAGE& item);
private:
HWND m_hWnd;
@@ -180,6 +205,9 @@
std::vector<INDICATEBKGND> m_indicateBkgnds;
void* m_pHighItem;
HWND m_hWndTooltip;
+ int m_slotBarSize;
+ int m_slotBarSize8;
+ int m_slotBarSizeOther;
};
#endif // !defined(AFX_EQUIPMENTGRAPH_H__FBB8916A_DE77_4EA3_9C21_E51E6B06194C__INCLUDED_)
--
Gitblit v1.9.3