From 203c3a3ffde6259413d9743f6a723b95b1e7989c Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 06 七月 2023 22:43:05 +0800 Subject: [PATCH] 门锁功能 --- HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | 65 +++++++++++++++++++++++++++----- 1 files changed, 55 insertions(+), 10 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs index 7055171..430bd42 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs @@ -247,7 +247,7 @@ { inputView.btnState.Text = Language.StringByID(StringId.kaiqi); } - + } break; case SPK.SensorUtrasonic: @@ -307,12 +307,14 @@ { string value = this.GetValue(dicList); inputView.btnState.Text = Language.StringByID(StringId.wuren); - if (value == "fall") { + if (value == "fall") + { inputView.btnState.Text = Language.StringByID(StringId.diedao); } } break; - case SPK.SensorEnvironment:case SPK.SensorEnvironmentHailin: + case SPK.SensorEnvironment: + case SPK.SensorEnvironmentHailin: case SPK.SensorEnvironment2: case SPK.SensorEnvironment3: { @@ -376,7 +378,7 @@ case SPK.SensorTemperature: { - string str =this.GetText(dicList, "temperature"); + string str = this.GetText(dicList, "temperature"); inputView.btnState.Text = str; } break; @@ -451,7 +453,7 @@ } - + } inputView.btnState.Text = s; } @@ -462,7 +464,32 @@ { inputView.btnState.Text = Language.StringByID(StringId.quyuruqingaojing); } - + + } + break; + case SPK.SensorPirHold: + { + string value = this.GetKeyValue("people_status", dicList); + if (string.IsNullOrEmpty(value)) + { + inputView.btnState.Text = inputCondition.hold_time + "s"; + break; + + } + + inputView.btnState.Text = Language.StringByID(StringId.wuren); + if (value == "true") + { + inputView.btnState.Text = Language.StringByID(StringId.youren); + + } + if (!string.IsNullOrEmpty(inputCondition.hold_time) && int.Parse(inputCondition.hold_time) > 0) + { + + inputView.btnState.Text += "鎸佺画" + inputCondition.hold_time + "s"; + } + + } break; } @@ -1143,8 +1170,8 @@ if (set_temp != "") { - - stateStr += set_temp + "鈩�,"; + string unit = device.GetAttribute("temperature_type") == null ? "掳" : device.GetAttribute("temperature_type").state; + stateStr += set_temp + unit+","; } if (mode != "") @@ -1241,8 +1268,8 @@ } if (set_temp != "") { - - stateStr += set_temp + "鈩�,"; + string unit = device.GetAttribute("temperature_type") == null ? "掳" : device.GetAttribute("temperature_type").state; + stateStr += set_temp + unit + ","; } if (mode != "") { @@ -1978,6 +2005,7 @@ } } break; + case SPK.SensorGas: case SPK.SensorSmoke: { @@ -2046,6 +2074,23 @@ } } break; + case SPK.SensorPirHold: + { + foreach (var dic in dicList) + { + string value = dic["value"]; + if (value == "true") + { + button1.Text = Language.StringByID(StringId.youren); + } + else + { + button1.Text = Language.StringByID(StringId.wuren); + } + } + + } + break; case SPK.SensorDoorWindow: { foreach (var dic in dicList) -- Gitblit v1.8.0