From 270b3d8539f6b4a991a9ebf3b3a9eceb436d61d5 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期四, 28 十月 2021 17:08:02 +0800
Subject: [PATCH] 自动化地址问题修复
---
HDL_ON/Entity/Function/SecurityAlarm.cs | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/HDL_ON/Entity/Function/SecurityAlarm.cs b/HDL_ON/Entity/Function/SecurityAlarm.cs
index b226d7e..6260cba 100644
--- a/HDL_ON/Entity/Function/SecurityAlarm.cs
+++ b/HDL_ON/Entity/Function/SecurityAlarm.cs
@@ -6,6 +6,9 @@
namespace HDL_ON.Entity
{
+ /// <summary>
+ ///
+ /// </summary>
public class SecurityAlarm
{
public SecurityAlarm()
@@ -39,6 +42,10 @@
/// 鎾掗槻:disable
/// </summary>
public string status = "disable";
+ /// <summary>
+ /// 鎶ヨ鐘舵��
+ /// </summary>
+ public bool alarm = false;
/// <summary>
/// 绫诲瀷
/// "all"--鍏ㄥ畢甯冮槻锛�
@@ -351,11 +358,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 +384,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 +397,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 +579,6 @@
{
public string sid;
public string status ="disable" ;
- public string alarm ="false";
+ public bool alarm = false;
}
}
--
Gitblit v1.8.0