diff --git a/RustTools/App.xaml.cs b/RustTools/App.xaml.cs index 4cda49c..ebbf1d7 100644 --- a/RustTools/App.xaml.cs +++ b/RustTools/App.xaml.cs @@ -51,7 +51,11 @@ public partial class App : Microsoft.UI.Xaml.Application public App() { - InitializeComponent(); + InitializeComponent(); + if (!Directory.Exists(wj.CD)) + { + Directory.CreateDirectory(wj.CD); + } // 注册激活事件处理程序 Host = Microsoft.Extensions.Hosting.Host. CreateDefaultBuilder(). diff --git a/RustTools/Assets/WindowIcon.ico b/RustTools/Assets/WindowIcon.ico index c89274d..b6c9dd1 100644 Binary files a/RustTools/Assets/WindowIcon.ico and b/RustTools/Assets/WindowIcon.ico differ diff --git a/RustTools/MainWindow.xaml.cs b/RustTools/MainWindow.xaml.cs index 5130ca1..7431703 100644 --- a/RustTools/MainWindow.xaml.cs +++ b/RustTools/MainWindow.xaml.cs @@ -12,7 +12,7 @@ public sealed partial class MainWindow : WindowEx public MainWindow() { - gj.SetBackTheme(this); + //gj.SetBackTheme(this); InitializeComponent(); //AppWindow.SetIcon("Assets/tool.png"); AppWindow.SetIcon(Path.Combine(AppContext.BaseDirectory, "Assets/WindowIcon.ico")); diff --git a/RustTools/RustTools.csproj b/RustTools/RustTools.csproj index 4d9850f..1ccf886 100644 --- a/RustTools/RustTools.csproj +++ b/RustTools/RustTools.csproj @@ -30,6 +30,7 @@ D:\RustTools + diff --git a/RustTools/muqing/IniHelper.cs b/RustTools/muqing/IniHelper.cs index 9bb0deb..54e18ad 100644 --- a/RustTools/muqing/IniHelper.cs +++ b/RustTools/muqing/IniHelper.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.IO; +using RustTools.muqing; public class IniHelper { @@ -60,10 +61,10 @@ public class IniHelper /// public void Load(string a) { - filePath = a; - if (!File.Exists(a)) + filePath = Path.Combine(wj.CD,a); + if (!File.Exists(filePath)) { - File.Create(a); + File.Create(filePath); return; //throw new FileNotFoundException("The specified file does not exist.", filePath); } diff --git a/RustTools/muqing/wj.cs b/RustTools/muqing/wj.cs index 35fe2a2..d3979e8 100644 --- a/RustTools/muqing/wj.cs +++ b/RustTools/muqing/wj.cs @@ -7,7 +7,7 @@ namespace RustTools.muqing; class wj { //存储主要文件的路径 - public static string CD = ApplicationData.Current.LocalFolder.Path; + public static string CD = "C:\\RustTools"; //缓存路径 public const string Cache = "";