修复64位运行失败的问题

This commit is contained in:
muqing 2024-08-04 10:31:05 +08:00
parent ed685cce49
commit 5843c2deb9
6 changed files with 12 additions and 6 deletions

View File

@ -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().

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 KiB

After

Width:  |  Height:  |  Size: 206 KiB

View File

@ -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"));

View File

@ -30,6 +30,7 @@
<AppxPackageDir>D:\RustTools</AppxPackageDir>
</PropertyGroup>
<ItemGroup>
<Content Remove="Assets\WindowIcon.ico" />
</ItemGroup>
<ItemGroup>
<None Remove="Assets\image\image_106.svg" />

View File

@ -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
/// <exception cref="FileNotFoundException"></exception>
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);
}

View File

@ -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 = "";