From a3ba25607612818c28d421bfa8eb2f92339d71ac Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期四, 13 三月 2025 20:30:48 +0800
Subject: [PATCH] 优化项目;

---
 HMI.Core/Util/PathHelper.cs |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/HMI.Core/Util/PathHelper.cs b/HMI.Core/Util/PathHelper.cs
index be757b0..0d67354 100644
--- a/HMI.Core/Util/PathHelper.cs
+++ b/HMI.Core/Util/PathHelper.cs
@@ -10,6 +10,8 @@
         public static string ConfigFolder { get; private set; }
         public static string DatabaseFolder { get; private set; }
         public static string DatabasePath { get; private set; }
+        public static string LangFolder { get; private set; }
+        public static string SettingFolder { get; private set; }
 
         /// <summary>
         /// 搴旂敤绋嬪簭鐨勬牴鐩綍
@@ -17,19 +19,15 @@
         /// <returns></returns>
         private static string RootPath()
         {
-            string DllPath = DllHelper.GetAssemblyPath();
+            string DllPath = AppDomain.CurrentDomain.BaseDirectory;
             string path = Path.GetFullPath(".");
             IconFolder = InitFolder(path + "\\Icon");
             ConfigFolder = InitFolder(path + "\\Config");
             DatabaseFolder = InitFolder(ConfigFolder + "\\Database");
             DatabasePath = DatabaseFolder + "\\database.db";
+            LangFolder = InitFolder(path + "\\Lang");
+            SettingFolder = InitFolder(ConfigFolder + "\\SystemSetting");
             return path;
-        }
-
-        public static string SettingFolder()
-        {
-            string Path = RootPath() + "\\Config\\Setting";
-            return Path;
         }
 
         /// <summary>
@@ -102,7 +100,7 @@
             return Path;
         }
 
-        private static string InitFolder(string path)
+        public static string InitFolder(string path)
         {
             try
             {

--
Gitblit v1.9.1