From fb4b8642cfbd157ae0635b182b4f578bf337dbef Mon Sep 17 00:00:00 2001
From: C3204 <zhengyabo@lanpucloud.cn>
Date: 星期一, 19 一月 2026 08:41:11 +0800
Subject: [PATCH] user

---
 LB_SmartVision/VisionForm.cs |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/LB_SmartVision/VisionForm.cs b/LB_SmartVision/VisionForm.cs
index 173b0fd..7b5d3c5 100644
--- a/LB_SmartVision/VisionForm.cs
+++ b/LB_SmartVision/VisionForm.cs
@@ -852,7 +852,7 @@
                             string ClassName = match.Groups["ClassName"].Value;   // "TCP"
                             string IP = match.Groups["IP"].Value;          // "127.0.0.1"
                             string Slot = match.Groups["Slot"].Value;        // "1111"
-                            string CpuType= match.Groups["CpuType"].Value;
+                            string CpuType = match.Groups["CpuType"].Value;
                             string PlcAddress = match.Groups["PlcAddress"].Value;
                             string DataType = match.Groups["DataType"].Success ? match.Groups["DataType"].Value : "String";
 
@@ -1029,7 +1029,6 @@
             {
                 string strJson = string.Empty;
                 GlobalVar.allCommunicatorsConnectionString = new ConcurrentDictionary<string, string>();
-
                 foreach (var item in GlobalVar.dicCommunicators)
                 {
                     string ClassName = item.Value.GetType().FullName;// "TCP"
@@ -1058,6 +1057,7 @@
                         string CommunicatorConnectionString = $"({ClassName})[{IP}][{PORT}]";
                         GlobalVar.allCommunicatorsConnectionString.TryAdd(item.Key, CommunicatorConnectionString);
                     }
+                    GlobalVar.dicCommunicators[item.Key].ClassName = ClassName;
                 }
                 var settings = new JsonSerializerSettings
                 {
@@ -1082,6 +1082,11 @@
                     { }
                 }
                 File.WriteAllText(GlobalVar.allCommunicatorsConnectionStringPath, strJson, Encoding.UTF8);
+                foreach (var item in GlobalVar.dicCommunicators)
+                {
+                    string ClassName = item.Value.GetType().FullName;// "TCP"
+                }
+                ConfigManager<ObservableConcurrentDictionary<string, BaseCommunicator>>.SaveConfig<ObservableConcurrentDictionary<string, BaseCommunicator>>(GlobalVar.dicCommunicators, GlobalVar.strApplicationPath + "\\鎵�鏈変骇鍝乗\" + GlobalVar.strProductName + "\\dicCommunicators.json");
                 return true;
             }
             catch { return false; }

--
Gitblit v1.9.3