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/EnvironmentalScience/EnvironmentalPage.cs | 31 ++++++++++++++++++++++++++++++- 1 files changed, 30 insertions(+), 1 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs index 1ee72b4..9a624ea 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs @@ -803,6 +803,9 @@ case "tvoc": newTemp.spk = SPK.SensorTVOC; break; + case "hcho": + newTemp.spk = SPK.SensorHcho; + break; } if(!string.IsNullOrEmpty(newTemp.spk)) { @@ -828,10 +831,36 @@ { if (btn.Tag != null) { + FunctionAttributes attr = updateTemp.GetAttribute(FunctionAttributeKey.Value); + if(attr == null) + { + switch(updateTemp.spk) + { + case SPK.SensorCO2: + attr = updateTemp.GetAttribute(FunctionAttributeKey.Co2); + break; + case SPK.SensorTemperature: + attr = updateTemp.GetAttribute(FunctionAttributeKey.Temperature); + break; + case SPK.SensorTVOC: + attr = updateTemp.GetAttribute(FunctionAttributeKey.Tvoc); + break; + case SPK.SensorPm25: + attr = updateTemp.GetAttribute(FunctionAttributeKey.Pm25); + break; + case SPK.SensorHcho: + attr = updateTemp.GetAttribute(FunctionAttributeKey.Hcho); + break; + case SPK.SensorHumidity: + attr = updateTemp.GetAttribute(FunctionAttributeKey.Humidity); + break; + } + } + var tag = btn.Tag.ToString(); if (tag == "SensorValues") { - (btn as Button).Text = updateTemp.GetAttrState(FunctionAttributeKey.Value); + (btn as Button).Text = attr.state;// updateTemp.GetAttrState(FunctionAttributeKey.Value); } else if (tag == "SensorLevel") { -- Gitblit v1.8.0