Browse Source

321312312

master
fyf 2 years ago
parent
commit
a02ce550d6
1 changed files with 34 additions and 5 deletions
  1. +34
    -5
      DataVAPI.Tools/IOT/ScreenMonitorModel.cs

+ 34
- 5
DataVAPI.Tools/IOT/ScreenMonitorModel.cs View File

@@ -240,12 +240,24 @@ namespace DataVAPI.Tool.IOT
set
{
_DeviceZT = value;
if (_DeviceZT == "在线") DeviceColor = new ALYColor { r = 13, g = 254, b = 73, a = 1 };
else DeviceColor = new ALYColor { r = 249, g = 191, b = 0, a = 1 };
if (_DeviceZT == "在线") DeviceColor = new ALYColor { r = 0, g = 255, b = 0, a = 1 };
else DeviceColor = new ALYColor { r = 255, g = 55, b = 0, a = 1 };
}
}
private string _DeviceZT { get; set; }
/// <summary>
/// 设备状态异常
/// </summary>
public string DeviceStatus
{
get { return _DeviceStatus; }
set
{
_DeviceStatus = value;
}
}
private string _DeviceStatus { get; set; }
/// <summary>
/// 是否有告警
/// </summary>
public bool IsAlarm
@@ -254,8 +266,18 @@ namespace DataVAPI.Tool.IOT
set
{
_IsAlarm = value;
if (_IsAlarm) AlarmColor = new ALYColor { r = 245, g = 13, b = 13, a = 1 };
else AlarmColor = new ALYColor { r = 245, g = 13, b = 13, a = 0 };
if (_IsAlarm)
{
AlarmColor = new ALYColor { r = 255, g = 55, b = 0, a = 1 };
DeviceStatus = "异常";
StatusColor = new ALYColor { r = 255, g = 55, b = 0, a = 1 };
}
else
{
AlarmColor = new ALYColor { r = 245, g = 13, b = 13, a = 0 };
DeviceStatus = "正常";
StatusColor = new ALYColor { r = 0, g = 255, b = 0, a = 1 };
}
}
}
private bool _IsAlarm { get; set; }
@@ -269,13 +291,20 @@ namespace DataVAPI.Tool.IOT
/// </summary>
public ALYColor AlarmColor { get; set; }
/// <summary>
/// 颜色
/// </summary>
public ALYColor StatusColor { get; set; }
/// <summary>
/// 初始化
/// </summary>
public DevStatus()
{
IsAlarm = false;
AlarmColor = new ALYColor { r = 245, g = 13, b = 13, a = 0 };
DeviceColor = new ALYColor { r = 249, g = 191, b = 0, a = 1 };
DeviceColor = new ALYColor { r = 255, g = 55, b = 0, a = 1 };
StatusColor = new ALYColor { r = 255, g = 55, b = 0, a = 1 };

DeviceStatus = "正常";
}
/// <summary>
/// 设置属性


Loading…
Cancel
Save