From 9d1660270272180cd71147d6ddd53d1382643d2e Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 02 十一月 2026 18:00:14 +0800
Subject: [PATCH] merge: 并入远程 Initial commit 作为历史根节点

---
 HMI.Core/Setting/ParamSetting.cs |  241 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 241 insertions(+), 0 deletions(-)

diff --git a/HMI.Core/Setting/ParamSetting.cs b/HMI.Core/Setting/ParamSetting.cs
new file mode 100644
index 0000000..128326b
--- /dev/null
+++ b/HMI.Core/Setting/ParamSetting.cs
@@ -0,0 +1,241 @@
+锘縰sing HMI.Core.Manager;
+using HMI.Core.Util;
+using System.Collections;
+using System.Configuration;
+using System.IO;
+using System.Runtime.CompilerServices;
+
+namespace HMI.Core.Setting
+{
+    public class ParamSetting
+    {
+        private static Hashtable customConfig = (Hashtable)ConfigurationManager.GetSection("TestResultConfig");
+
+        private static string GetValue([CallerMemberName] string propertyName = null)
+        {
+            return (customConfig != null && customConfig.ContainsKey(propertyName)) ? customConfig[propertyName].ToString() : null;
+        }
+
+        /// <summary>
+        /// MesAddress
+        /// </summary>
+        public static string MesAddress { get; private set; } = "127.0.0.1:8080";
+        /// <summary>
+        /// 鑰佸寲瀵煎嚭琛岃浆鍒�
+        /// </summary>
+        public static bool ReverseCSV { get; private set; } = false;
+
+        /// <summary>
+        /// 瀹㈡埛缂栫爜
+        /// </summary>
+        public static string CustomerCode { get; private set; }
+
+        /// <summary>
+        /// 鐢熶骇鏁版嵁DB瀛樻斁鐩綍
+        /// </summary>
+
+        public static string DataLogFolder { get; private set; } = null;
+
+        /// <summary>
+        /// 鏄惁寮�鍚按鍐锋満璁剧疆
+        /// </summary>
+        public static bool ShowCoolerSetting { get; private set; } = false;
+
+        public static bool ShowWaterChart { get; private set; } = false;
+
+        /// <summary>
+        /// 鎸夊瀷鍙疯绠楁帰閽�
+        /// </summary>
+        public static bool ProbeByModel { get; private set; } = false;
+        public static int ReverseCSVSkipRow { get; private set; } = 3;
+
+        /// <summary>
+        /// 鎿嶄綔鏄惁闇�瑕佸瘑鐮�
+        /// </summary>
+
+        public static bool IsOptRequirePassword { get; private set; } = false;
+
+        /// <summary>
+        /// 鍚敤鎵爜鎹㈠瀷
+        /// </summary>
+        public static bool EnableAutoModel { get; private set; } = false;
+
+        public const string ShareConfigKey = "ShareConfig";
+        public static string ShareConfig { get; private set; } = null;
+        public static bool ShowBurnInAbort { get; private set; } = true;
+        public static string SocketNames { get; private set; } = string.Empty;
+        public static string StationName { get; private set; } = string.Empty;
+        public static string MainSeqPath { get; private set; } = string.Empty;
+
+
+        public static string EngineType
+        {
+            get
+            {
+                var data = GetValue();
+                return data == null ? "TestStand" : data.ToString();
+            }
+        }
+
+        static ParamSetting()
+        {
+            try
+            {
+                var value = ParameterManager.GetCommonParameterByName("MesAddress");
+                if (value != null)
+                {
+                    MesAddress = value.Value;
+                }
+            }
+            catch
+            {
+            }
+
+            try
+            {
+                var value = ParameterManager.GetCommonParameterByName("ReverseCSV");
+                if (value != null)
+                {
+                    ReverseCSV = bool.Parse(value.Value);
+                }
+            }
+            catch
+            {
+            }
+
+            try
+            {
+                var value = ParameterManager.GetCommonParameterByName("TS_DataLogPath");
+                DataLogFolder = value?.Value ?? Path.Combine(PathHelper.ConfigFolder, "DataBoard");
+            }
+            catch
+            {
+                DataLogFolder = Path.Combine(PathHelper.ConfigFolder, "DataBoard");
+            }
+
+            try
+            {
+                var value = ParameterManager.GetCommonParameterByName("ShowWaterChart");
+                if (value != null)
+                {
+                    ShowWaterChart = bool.Parse(value.Value);
+                }
+            }
+            catch
+            {
+            }
+
+            try
+            {
+                var value = ParameterManager.GetCommonParameterByName("ShowCoolerSetting");
+                if (value != null)
+                {
+                    ShowCoolerSetting = bool.Parse(value.Value);
+                }
+            }
+            catch
+            {
+            }
+
+            try
+            {
+                var value = ParameterManager.GetCommonParameterByName("CustomerCode");
+                if (value != null)
+                {
+                    CustomerCode = value.Value;
+                }
+            }
+            catch
+            {
+            }
+
+            try
+            {
+                var value = ParameterManager.GetCommonParameterByName("ProbeByModel");
+                if (value != null)
+                {
+                    ProbeByModel = bool.Parse(value.Value);
+                }
+            }
+            catch
+            {
+            }
+
+            try
+            {
+                var value = ParameterManager.GetCommonParameterByName("ReverseCSVSkipRow");
+                if (value != null)
+                {
+                    ReverseCSVSkipRow = int.Parse(value.Value);
+                }
+            }
+            catch
+            {
+            }
+
+            try
+            {
+                IsOptRequirePassword = ParameterManager.GetCommonParameterByName<bool>("IsOptRequirePassword", false);
+            }
+            catch
+            {
+
+            }
+
+            try
+            {
+                EnableAutoModel = ParameterManager.GetCommonParameterByName<bool>("EnableAutoModel", false);
+            }
+            catch
+            {
+
+            }
+
+            try
+            {
+                ShareConfig = ParameterManager.GetCommonParameterByName<string>(ShareConfigKey, null);
+            }
+            catch
+            {
+
+            }
+
+            try
+            {
+                ShowBurnInAbort = ParameterManager.GetCommonParameterByName<bool>("ShowBurnInAbort", true);
+            }
+            catch
+            {
+
+            }
+
+            try
+            {
+                SocketNames = ParameterManager.GetCommonParameterByName<string>("SocketNames", string.Empty);
+            }
+            catch
+            {
+
+            }
+
+            try
+            {
+                StationName = ParameterManager.GetCommonParameterByName<string>("StationName", string.Empty);
+            }
+            catch
+            {
+
+            }
+
+            try
+            {
+
+                MainSeqPath = ParameterManager.GetCommonParameterByName<string>("BurnInMainSeq", string.Empty);
+            }
+            catch
+            {
+
+            }
+        }
+    }
+}

--
Gitblit v1.9.1