From 4ad6d53e2a8dc59d99405a053ddc46f49ae7a1b3 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期四, 14 十月 2021 11:55:51 +0800 Subject: [PATCH] 干接点新spk 兼容问题 --- 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