29 lines
926 B
C#
29 lines
926 B
C#
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);
|
|
}
|
|
}
|
|
}
|
|
} |