具备界面基础功能
This commit is contained in:
29
SHH.CameraDashboard/Core/AppPaths.cs
Normal file
29
SHH.CameraDashboard/Core/AppPaths.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System.IO;
|
||||
|
||||
namespace SHH.CameraDashboard
|
||||
{
|
||||
public static class AppPaths
|
||||
{
|
||||
// 1. 基础目录:运行目录下的 Configs 文件夹
|
||||
public static readonly string BaseDir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Configs");
|
||||
|
||||
// 2. 具体的配置文件路径
|
||||
// 服务节点配置
|
||||
public static string ServiceNodesConfig => Path.Combine(BaseDir, "service_nodes.json");
|
||||
|
||||
// 用户偏好设置 (预留)
|
||||
public static string UserSettingsConfig => Path.Combine(BaseDir, "user_settings.json");
|
||||
|
||||
// 布局缓存 (预留)
|
||||
public static string LayoutCache => Path.Combine(BaseDir, "layout_cache.json");
|
||||
|
||||
// 静态构造函数:确保目录存在
|
||||
static AppPaths()
|
||||
{
|
||||
if (!Directory.Exists(BaseDir))
|
||||
{
|
||||
Directory.CreateDirectory(BaseDir);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user