From fe2aa4880d5c9fd88088ad0ed81ebaca05629f5f Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 02 十一月 2026 17:59:45 +0800
Subject: [PATCH] feat: 集成CAN驱动/模拟器 + 仪器仪表注册/硬件调试模块

---
 Plugin.TestResult/Model/BaseConfig.cs |  101 +++++++++++++++++++++++++++++++++++---------------
 1 files changed, 71 insertions(+), 30 deletions(-)

diff --git a/Plugin.TestResult/Model/BaseConfig.cs b/Plugin.TestResult/Model/BaseConfig.cs
index 4e0d5e0..686ee89 100644
--- a/Plugin.TestResult/Model/BaseConfig.cs
+++ b/Plugin.TestResult/Model/BaseConfig.cs
@@ -1,4 +1,7 @@
-锘縰sing System.Collections;
+锘縰sing HMI.Core.Entity;
+using HMI.Core.Manager;
+using System;
+using System.Collections;
 using System.Configuration;
 using System.Runtime.CompilerServices;
 
@@ -7,6 +10,12 @@
     public class BaseConfig
     {
         private static Hashtable customConfig = (Hashtable)ConfigurationManager.GetSection("TestResultConfig");
+
+        private string GetValue([CallerMemberName] string propertyName = null)
+        {
+            return (customConfig != null && customConfig.ContainsKey(propertyName)) ? customConfig[propertyName].ToString() : null;
+        }
+
         /// <summary>
         /// 棣栭〉甯冨眬琛屾暟
         /// </summary>
@@ -18,11 +27,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>
@@ -35,6 +43,10 @@
             {
                 var data = GetValue();
                 return data == null ? column : int.Parse(data);
+            }
+            set
+            {
+                customConfig[nameof(Column)] = value;
             }
         }
 
@@ -49,6 +61,27 @@
                 var data = GetValue();
                 return data == null ? cellCount : int.Parse(data);
             }
+            set
+            {
+                customConfig[nameof(CellCount)] = value;
+            }
+        }
+
+        /// <summary>
+        /// 鐐逛綅鍒楁暟
+        /// </summary>
+        private int positionColumn = 6;
+        public int PositionColumn
+        {
+            get
+            {
+                var data = GetValue();
+                return data == null ? positionColumn : int.Parse(data);
+            }
+            set
+            {
+                customConfig[nameof(PositionColumn)] = value;
+            }
         }
 
         /// <summary>
@@ -61,6 +94,10 @@
             {
                 var data = GetValue();
                 return data == null ? positionCount : int.Parse(data);
+            }
+            set
+            {
+                customConfig[nameof(PositionCount)] = value;
             }
         }
 
@@ -75,6 +112,10 @@
                 var data = GetValue();
                 return data == null ? maxSize : int.Parse(data);
             }
+            set
+            {
+                customConfig[nameof(MaxSize)] = value;
+            }
         }
 
         /// <summary>
@@ -87,6 +128,10 @@
             {
                 var data = GetValue();
                 return data == null ? refreshInterval : int.Parse(data);
+            }
+            set
+            {
+                customConfig[nameof(RefreshInterval)] = value;
             }
         }
 
@@ -101,31 +146,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;
             }
         }
 
@@ -140,6 +163,10 @@
                 var data = GetValue();
                 return data == null ? cellListMaxSize : int.Parse(data);
             }
+            set
+            {
+                customConfig[nameof(CellListMaxSize)] = value;
+            }
         }
 
         private int portStart = 6660;
@@ -150,6 +177,20 @@
                 var data = GetValue();
                 return data == null ? portStart : int.Parse(data);
             }
+            set
+            {
+                customConfig[nameof(PortStart)] = value;
+            }
+        }
+
+        private string codeParserType;
+        public string CodeParserType
+        {
+            get
+            {
+                var data = GetValue();
+                return data == null ? codeParserType : data.ToString();
+            }
         }
 
         public bool testing = false;

--
Gitblit v1.9.1