From df3906c03db154e8622b7caeaa3bf93b67c6d40a Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期五, 15 十月 2021 10:25:35 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/newBranch1' into CJL-Linphone --- 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