设置界面优化

This commit is contained in:
hsc
2026-06-09 09:19:35 +08:00
parent bb4fe61ded
commit c01aa6e545
16 changed files with 196 additions and 59 deletions

View File

@@ -8,7 +8,26 @@ namespace UIShare.GlobalVariable
public static class ConfigService
{
private static readonly object _fileLock = new();
/// <summary>
/// 根据标题查询配置文件是否存在
/// </summary>
public static bool IsExit(string title)
{
if (string.IsNullOrEmpty(title))
{
return false;
}
// 临时实例化一个对象以获取默认的 SystemPath
var dummy = new SystemConfig();
string configPath = Path.Combine(dummy.SystemPath, $"{title}.json");
if (!File.Exists(configPath))
{
return false;
}
return true;
}
/// <summary>
/// 根据标题(格子标识)加载独立的配置文件
/// </summary>