From d1444a09d4a4811a9ea7b86cb264d753ef14088c Mon Sep 17 00:00:00 2001
From: C3204 <zhengyabo@lanpucloud.cn>
Date: 星期三, 08 四月 2026 08:31:59 +0800
Subject: [PATCH] 运行目录添加对应相机dll文件以及修复相机取图。

---
 LB_SmartVision/Forms/Pages/CommunicatorPage/CommunicatorsEditPage.cs |   31 +++++++++++++++++++++++++++++--
 1 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/LB_SmartVision/Forms/Pages/CommunicatorPage/CommunicatorsEditPage.cs b/LB_SmartVision/Forms/Pages/CommunicatorPage/CommunicatorsEditPage.cs
index 9db3588..8755df3 100644
--- a/LB_SmartVision/Forms/Pages/CommunicatorPage/CommunicatorsEditPage.cs
+++ b/LB_SmartVision/Forms/Pages/CommunicatorPage/CommunicatorsEditPage.cs
@@ -128,12 +128,39 @@
 
                 if (GlobalVar.dicCommunicators.ContainsKey(name))
                 {
-                    CommunicatorForm cameraForm = new CommunicatorForm(GlobalVar.dicCommunicators[name], name);
-                    cameraForm.Show();
+                    CommunicatorForm communicatorFForm = new CommunicatorForm(GlobalVar.dicCommunicators[name], name);
+                    communicatorFForm.CommunicatorChanged += CommunicatorFForm_CommunicatorChanged;
+                    communicatorFForm.Show();
                 }
             }
         }
 
+        private void CommunicatorFForm_CommunicatorChanged(BaseCommunicator communicator)
+        {
+            if (this.InvokeRequired)
+            {
+                this.Invoke(new Action<BaseCommunicator>(CommunicatorFForm_CommunicatorChanged), communicator);
+                return;
+            }
+
+            for (int i = 0; i < uiFlowLayoutPanel1.Controls.Count; i++)
+            {
+                if (uiFlowLayoutPanel1.Controls[i] is UserItem flow && flow.Name == communicator.CommunicatorName)
+                {
+                    string ClassName = communicator.GetType().Name;
+                    string IP = communicator.CommunicatorConnections["鍦板潃"].ToString();
+                    string PORT = communicator.CommunicatorConnections["绔彛"].ToString();
+                    string DataType = communicator.CommunicatorConnections.Contains("鏁版嵁绫诲瀷") ?
+                        communicator.CommunicatorConnections["鏁版嵁绫诲瀷"].ToString() : "String";
+
+                    flow.Text = $"({ClassName}){IP}:{PORT} [{DataType}]";
+                    flow.Refresh();
+                    break;
+                }
+            }
+        }
+
+
         // 绉婚櫎閫氳鍙�
         private void DeleteEvent(string Name, string Text)
         {

--
Gitblit v1.9.3