From 99df058a665ea04065a23e729ec79a2f23f79881 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期二, 20 五月 2025 16:59:43 +0800
Subject: [PATCH] 优化

---
 HMI.Core/Setting/SystemSetting.cs |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/HMI.Core/Setting/SystemSetting.cs b/HMI.Core/Setting/SystemSetting.cs
index 5378e82..b7d76cf 100644
--- a/HMI.Core/Setting/SystemSetting.cs
+++ b/HMI.Core/Setting/SystemSetting.cs
@@ -25,11 +25,12 @@
 
         }
 
-        public string LogoPath { get; private set; }
-        public string WindowTitle { get; private set; }
+        public string LogoPath { get; private set; } = ".\\JingCeLogo.png";
+        public string WindowTitle { get; private set; } = "浜у搧娴嬭瘯骞冲彴";
         public string PlcIp { get; private set; }
         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 +46,11 @@
                 BeanUtil.Copy(model, setting);
                 Instance = setting;
             }
+        }
+
+        public static SystemSettingModel GetModel()
+        {
+            return XmlHelper.DeserializeFromXml<SystemSettingModel>(FilePath);
         }
 
         public static void ReLoad()
@@ -101,5 +107,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