增加摄像头中控台项目

This commit is contained in:
2025-12-30 10:53:02 +08:00
parent 471b8c50b6
commit de3adf0339
31 changed files with 2736 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
namespace SHH.CameraDashboard;
public class CameraInfo
{
// --- 原始 JSON 属性 ---
public int Id { get; set; }
public string Name { get; set; }
public string IpAddress { get; set; }
public DeviceBrand Brand { get; set; }
public string Status { get; set; } // "Playing", "Disconnected" 等
public bool IsPhysicalOnline { get; set; } // 物理在线 (网络)
public bool IsOnline { get; set; } // 业务在线 (登录)
public bool IsRunning { get; set; } // 正在运行 (拉流)
public int RealFps { get; set; }
public int Width { get; set; }
public int Height { get; set; }
// --- UI 分离状态逻辑 ---
// 状态 1: 登录状态 (在线/离线)
public string OnlineStatusText => (IsPhysicalOnline && IsOnline) ? "在线" : "离线";
// 状态 2: 运行状态 (运行/停止)
public string RunningStatusText => IsRunning ? "运行中" : "已停止";
// 品牌信息
public string BrandName => Brand.ToString();
public string DisplayName => string.IsNullOrEmpty(Name) ? IpAddress : Name;
public string MediaDetail => IsRunning && Width > 0 ? $"{Width}x{Height} | {RealFps}fps" : "无信号";
}