From 9211ec11c112e18cd99e77f889a01110a70031ce Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期一, 24 十一月 2025 17:47:15 +0800
Subject: [PATCH] 优化项目结构

---
 HMI.Core/Setting/SystemSetting.cs |   29 +++++++++++++++++++++++++----
 1 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/HMI.Core/Setting/SystemSetting.cs b/HMI.Core/Setting/SystemSetting.cs
index 5378e82..319af95 100644
--- a/HMI.Core/Setting/SystemSetting.cs
+++ b/HMI.Core/Setting/SystemSetting.cs
@@ -25,11 +25,13 @@
 
         }
 
-        public string LogoPath { get; private set; }
-        public string WindowTitle { get; private set; }
-        public string PlcIp { get; private set; }
+        public string LogoPath { get; private set; } = ".\\JingCeLogo.png";
+        public string WindowTitle { get; private set; } = "浜у搧娴嬭瘯骞冲彴";
+        public string PlcIp { get; private set; } = "127.0.0.1";
+        public int PlcPort { get; private set; } = 102;
         public bool PlcEnabled { get; private set; }
-        public string CurrentLanguage { get; private set; }
+        public string CurrentLanguage { get; private set; } = "zh-CN";
+        public int LogExpiredDays { get; private set; } = 7;
 
         private static void LoadFromXml()
         {
@@ -45,6 +47,11 @@
                 BeanUtil.Copy(model, setting);
                 Instance = setting;
             }
+        }
+
+        public static SystemSettingModel GetModel()
+        {
+            return XmlHelper.DeserializeFromXml<SystemSettingModel>(FilePath);
         }
 
         public static void ReLoad()
@@ -88,6 +95,13 @@
             set { Set(ref plcIp, value); }
         }
 
+        private int plcPort;
+        public int PlcPort
+        {
+            get => plcPort;
+            set { Set(ref plcPort, value); }
+        }
+
         private bool plcEnabled;
         public bool PlcEnabled
         {
@@ -101,5 +115,12 @@
             get => currentLanguage;
             set { Set(ref currentLanguage, value); }
         }
+
+        private int logExpiredDays;
+        public int LogExpiredDays
+        {
+            get => logExpiredDays;
+            set { Set(ref logExpiredDays, value); }
+        }
     }
 }

--
Gitblit v1.9.1