From f982455916297ab07379d902a7f15b7a7a867c94 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期三, 20 十月 2021 09:19:20 +0800
Subject: [PATCH] 1
---
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddInputPage.cs | 30 +++++++++++++++++++++++++++---
1 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddInputPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddInputPage.cs
index ded7468..167b453 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddInputPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddInputPage.cs
@@ -86,7 +86,7 @@
functionListView = new VerticalScrolViewLayout()
{
Y = showdFunctionTypeRow.Bottom,
- Height = Application.GetRealHeight(530),
+ Height = Application.GetRealHeight(530-60),
BackgroundColor = CSS_Color.BackgroundColor,
};
bodyView.AddChidren(functionListView);
@@ -163,12 +163,36 @@
input = new SecurityInput();
input.sid = function.sid;
+ var inKey = "status";
+ var inValue = "true";
+ switch(function.spk)
+ {
+ case SPK.SensorWater:
+ inKey = "alarm_status";
+ inValue = "alarm";
+ break;
+ case SPK.SensorPir:
+ inKey = "people_status";
+ break;
+ case SPK.SensorSmoke:
+ inKey = "alarm_status";
+ inValue = "alarm";
+ break;
+ case SPK.SensorGas:
+ inKey = "alarm_status";
+ inValue = "alarm";
+ break;
+ case SPK.SensorDoorWindow:
+ inKey = "contact_status";
+ inValue = "open";
+ break;
+ }
input.condition = new List<SecurityInputCondition>()
{
new SecurityInputCondition()
{
- key = "status",
- value = "true",
+ key = inKey,
+ value = inValue,
}
};
--
Gitblit v1.8.0