From b544d5cccd76735e034c8055918a50927b437474 Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期二, 10 十一月 2026 08:29:04 +0800
Subject: [PATCH] fix: 维护模式重复进入失败与按钮灰死 + Broker 并发验证用例

---
 Plugin.CurrentSensorControl/Entity/BaseConfig.cs |  131 ++++++++++++++++++++++++++++++++-----------
 1 files changed, 98 insertions(+), 33 deletions(-)

diff --git a/Plugin.CurrentSensorControl/Entity/BaseConfig.cs b/Plugin.CurrentSensorControl/Entity/BaseConfig.cs
index fe1c99d..80ebe5a 100644
--- a/Plugin.CurrentSensorControl/Entity/BaseConfig.cs
+++ b/Plugin.CurrentSensorControl/Entity/BaseConfig.cs
@@ -1,4 +1,6 @@
-锘縰sing System.Collections;
+锘縰sing HMI.Core.Entity;
+using HMI.Core.Manager;
+using System.Collections;
 using System.Configuration;
 using System.Runtime.CompilerServices;
 
@@ -10,14 +12,68 @@
 
         public static readonly BaseConfig Instance = new BaseConfig();
 
-        private BaseConfig() { 
-            
+        private BaseConfig()
+        {
+            RefreshNumberConfig(this);
         }
 
+        private void RefreshNumberConfig(BaseConfig config)
+        {
+            ParameterData value = null;
+            try
+            {
+                value = ParameterManager.GetCommonParameterByName("BurnInOvenCount");
+                string[] datas = value.Value.Trim().Split(',');
+                config.Row = int.Parse(datas[0]);
+                config.Column = int.Parse(datas[1]);
+            }
+            catch (Exception ex)
+            {
+
+            }
+
+            try
+            {
+                value = ParameterManager.GetCommonParameterByName("BurnInOvenName");
+                config.NameStr = value.Value;
+            }
+            catch (Exception ex)
+            {
+
+            }
+
+            try
+            {
+                value = ParameterManager.GetCommonParameterByName("BurnInOvenPort");
+                config.PortStart = value == null ? config.PortStart : int.Parse(value.Value);
+            }
+            catch (Exception ex)
+            {
+
+            }
+
+            try
+            {
+                value = ParameterManager.GetCommonParameterByName("BurnInCellCount");
+                string[] datas = value.Value.Trim().Split(',');
+                config.PositionColumn = int.Parse(datas[0]);
+                config.PositionCount = int.Parse(datas[1]);
+            }
+            catch (Exception ex)
+            {
+
+            }
+        }
+
+        private string GetValue([CallerMemberName] string propertyName = null)
+        {
+            return (customConfig != null && customConfig.ContainsKey(propertyName)) ? customConfig[propertyName].ToString() : null;
+        }
+
+        private int row = 1;
         /// <summary>
         /// 棣栭〉甯冨眬琛屾暟
         /// </summary>
-        private int row = 1;
         public int Row
         {
             get
@@ -25,11 +81,10 @@
                 var data = GetValue();
                 return data == null ? row : int.Parse(data);
             }
-        }
-
-        private string GetValue([CallerMemberName] string propertyName = null)
-        {
-            return (customConfig != null && customConfig.ContainsKey(propertyName)) ? customConfig[propertyName].ToString() : null;
+            set
+            {
+                customConfig[nameof(Row)] = value;
+            }
         }
 
         /// <summary>
@@ -42,6 +97,10 @@
             {
                 var data = GetValue();
                 return data == null ? column : int.Parse(data);
+            }
+            set
+            {
+                customConfig[nameof(Column)] = value;
             }
         }
 
@@ -56,6 +115,10 @@
                 var data = GetValue();
                 return data == null ? cellCount : int.Parse(data);
             }
+            set
+            {
+                customConfig[nameof(CellCount)] = value;
+            }
         }
 
         /// <summary>
@@ -68,6 +131,10 @@
             {
                 var data = GetValue();
                 return data == null ? positionColumn : int.Parse(data);
+            }
+            set
+            {
+                customConfig[nameof(PositionColumn)] = value;
             }
         }
 
@@ -82,6 +149,10 @@
                 var data = GetValue();
                 return data == null ? positionCount : int.Parse(data);
             }
+            set
+            {
+                customConfig[nameof(PositionCount)] = value;
+            }
         }
 
         /// <summary>
@@ -94,6 +165,10 @@
             {
                 var data = GetValue();
                 return data == null ? maxSize : int.Parse(data);
+            }
+            set
+            {
+                customConfig[nameof(MaxSize)] = value;
             }
         }
 
@@ -108,6 +183,10 @@
                 var data = GetValue();
                 return data == null ? refreshInterval : int.Parse(data);
             }
+            set
+            {
+                customConfig[nameof(RefreshInterval)] = value;
+            }
         }
 
         /// <summary>
@@ -121,31 +200,9 @@
                 var data = GetValue();
                 return data == null ? nameStr : data;
             }
-        }
-
-        /// <summary>
-        /// 榛樿灞曠ず鐨勫浘琛ㄦ爣棰�
-        /// </summary>
-        private string mainChartTitle = "骞冲潎娓╁害";
-        public string MainChartTitle
-        {
-            get
+            set
             {
-                var data = GetValue();
-                return data == null ? mainChartTitle : data;
-            }
-        }
-
-        /// <summary>
-        /// 鍙屽嚮鎵撳紑鐨勮缁嗗浘琛ㄦ爣棰�
-        /// </summary>
-        private string detailChartTitle = "璇︾粏娓╁害";
-        public string DetailChartTitle
-        {
-            get
-            {
-                var data = GetValue();
-                return data == null ? detailChartTitle : data;
+                customConfig[nameof(NameStr)] = value;
             }
         }
 
@@ -160,6 +217,10 @@
                 var data = GetValue();
                 return data == null ? cellListMaxSize : int.Parse(data);
             }
+            set
+            {
+                customConfig[nameof(CellListMaxSize)] = value;
+            }
         }
 
         private int portStart = 6660;
@@ -170,6 +231,10 @@
                 var data = GetValue();
                 return data == null ? portStart : int.Parse(data);
             }
+            set
+            {
+                customConfig[nameof(PortStart)] = value;
+            }
         }
 
         private string codeParserType;

--
Gitblit v1.9.1