From b8c9d61850c5876631275335243c1d207ee01b33 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期五, 29 十月 2021 09:53:57 +0800
Subject: [PATCH] 2021-10-29 1.用虚拟机重新生成萤石和乐橙dll库。2.乐橙更新新SDK,适配单元机呼叫问题。
---
HDL_ON/Entity/Function/SecurityAlarm.cs | 90 +++++++++++++++++++++++++++++++++++++++++---
1 files changed, 83 insertions(+), 7 deletions(-)
diff --git a/HDL_ON/Entity/Function/SecurityAlarm.cs b/HDL_ON/Entity/Function/SecurityAlarm.cs
index b226d7e..68cc8d8 100644
--- a/HDL_ON/Entity/Function/SecurityAlarm.cs
+++ b/HDL_ON/Entity/Function/SecurityAlarm.cs
@@ -6,6 +6,78 @@
namespace HDL_ON.Entity
{
+
+ public class SecurityCenter111111
+ {
+ static SecurityCenter111111 _securityCenter;
+
+ public static SecurityCenter111111 Ins
+ {
+ get
+ {
+ if (_securityCenter == null)
+ {
+ _securityCenter = new SecurityCenter111111();
+ }
+ return _securityCenter;
+ }
+ }
+
+ /// <summary>
+ /// 甯冮槻涓�
+ /// </summary>
+ public bool InDefense
+ {
+ get
+ {
+ lock (FunctionList.List.securities)
+ {
+ var temp = FunctionList.List.securities.Find((obj) => obj.status == "enable");
+ return temp == null ? false : true;
+ }
+ }
+ }
+
+ /// <summary>
+ /// 鎶ヨ涓�
+ /// </summary>
+ public bool InAlarm
+ {
+ get
+ {
+ lock (FunctionList.List.securities)
+ {
+ var temp = FunctionList.List.securities.Find((obj) => obj.alarm == true);
+ return temp == null ? false : true;
+ }
+ }
+ }
+
+ SecurityAlarm _inDefenseMode;
+ /// <summary>
+ /// 褰撳墠甯冮槻妯″紡
+ /// </summary>
+ public SecurityAlarm InDefenseMode
+ {
+ get
+ {
+ if (_inDefenseMode == null)
+ {
+ lock (FunctionList.List.securities)
+ {
+ var temp = FunctionList.List.securities.Find((obj) => obj.status == "enable");
+ return temp;
+ }
+ }
+ return _inDefenseMode;
+ }
+ }
+
+
+ }
+
+
+
public class SecurityAlarm
{
public SecurityAlarm()
@@ -39,6 +111,10 @@
/// 鎾掗槻:disable
/// </summary>
public string status = "disable";
+ /// <summary>
+ /// 鎶ヨ鐘舵��
+ /// </summary>
+ public bool alarm = false;
/// <summary>
/// 绫诲瀷
/// "all"--鍏ㄥ畢甯冮槻锛�
@@ -351,11 +427,11 @@
case SPK.SensorSmoke:
foreach (var con in condition)
{
- if (con.value == "true")
+ if (con.value == "true" || con.value == "alarm")
{
text += Language.StringByID(StringId.InAlarm) + " ";
}
- else if (con.value == "false")
+ else if (con.value == "false" || con.value == "normal")
{
text += Language.StringByID(StringId.Normal) + " ";
}
@@ -377,11 +453,11 @@
case SPK.SensorWater:
foreach (var con in condition)
{
- if (con.value == "true")
+ if (con.value == "true" || con.value == "alarm")
{
text += Language.StringByID(StringId.WaterLeakage) + " ";
}
- else if (con.value == "false")
+ else if (con.value == "false" || con.value == "normal")
{
text += Language.StringByID(StringId.Normal) + " ";
}
@@ -390,11 +466,11 @@
case SPK.SensorDoorWindow:
foreach (var con in condition)
{
- if (con.value == "true")
+ if (con.value == "true" || con.value == "open")
{
text += Language.StringByID(StringId.Open) + " ";
}
- else if (con.value == "false")
+ else if (con.value == "false" || con.value == "close")
{
text += Language.StringByID(StringId.Close) + " ";
}
@@ -572,6 +648,6 @@
{
public string sid;
public string status ="disable" ;
- public string alarm ="false";
+ public bool alarm = false;
}
}
--
Gitblit v1.8.0