mirror of
https://github.com/jie65535/GrasscutterCommandGenerator.git
synced 2025-10-21 19:53:29 +08:00
Change the record files storage location
This commit is contained in:
@@ -38,7 +38,7 @@ namespace GrasscutterTools.Pages
|
||||
/// <summary>
|
||||
/// 自定义命令保存位置
|
||||
/// </summary>
|
||||
private readonly string CustomCommandsFilePath = Path.Combine(Application.LocalUserAppDataPath, "CustomCommands.txt");
|
||||
private readonly string CustomCommandsFilePath = Common.GetAppDataFile("CustomCommands.txt");
|
||||
|
||||
/// <summary>
|
||||
/// 自定义命令是否存在更改
|
||||
|
@@ -100,7 +100,7 @@ namespace GrasscutterTools.Pages
|
||||
/// <summary>
|
||||
/// 获取物品记录文件路径
|
||||
/// </summary>
|
||||
private readonly string GiveItemCommandsRecordPath = Path.Combine(Application.LocalUserAppDataPath, "GiveItemCommands.txt");
|
||||
private readonly string GiveItemCommandsRecordPath = Common.GetAppDataFile("GiveItemCommands.txt");
|
||||
|
||||
/// <summary>
|
||||
/// 获取物品记录
|
||||
|
@@ -208,7 +208,7 @@ namespace GrasscutterTools.Pages
|
||||
/// <summary>
|
||||
/// 获取物品记录文件路径
|
||||
/// </summary>
|
||||
private readonly string MailListPath = Path.Combine(Application.LocalUserAppDataPath, "MailList.json");
|
||||
private readonly string MailListPath = Common.GetAppDataFile("MailList.json");
|
||||
|
||||
/// <summary>
|
||||
/// 邮件列表
|
||||
|
@@ -156,7 +156,7 @@ namespace GrasscutterTools.Pages
|
||||
/// <summary>
|
||||
/// 生成命令记录文件路径
|
||||
/// </summary>
|
||||
private readonly string SpawnCommandsRecordPath = Path.Combine(Application.LocalUserAppDataPath, "SpawnCommands.txt");
|
||||
private readonly string SpawnCommandsRecordPath = Common.GetAppDataFile("SpawnCommands.txt");
|
||||
|
||||
/// <summary>
|
||||
/// 生成命令记录
|
||||
|
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
using GrasscutterTools.Game;
|
||||
using GrasscutterTools.OpenCommand;
|
||||
@@ -21,5 +22,14 @@ namespace GrasscutterTools.Utils
|
||||
/// 开放命令接口
|
||||
/// </summary>
|
||||
public static OpenCommandAPI OC { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 应用数据目录
|
||||
/// </summary>
|
||||
public static string GetAppDataFile(string filename) =>
|
||||
Path.Combine(
|
||||
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
|
||||
"GrasscutterTools",
|
||||
filename);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user