From 72be4f06a683de33ddd563c8447c39f7f17e5b7d Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期一, 06 一月 2020 13:03:50 +0800 Subject: [PATCH] 合并代码 --- ZigbeeApp/Shared/Common/DeviceUI.cs | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Common/DeviceUI.cs b/ZigbeeApp/Shared/Common/DeviceUI.cs index 7c6a101..e217927 100755 --- a/ZigbeeApp/Shared/Common/DeviceUI.cs +++ b/ZigbeeApp/Shared/Common/DeviceUI.cs @@ -532,6 +532,27 @@ } return null; } + else if (device.Type == DeviceType.TemperatureSensor) + { + var tempera = CommonDevice as TemperatureSensor; + if(tempera.SensorDiv==1) + { + if (tempera.Temperatrue == 0) + { + return "--鈩�"; + } + return $"{tempera.Temperatrue}鈩�"; + } + else if(tempera.SensorDiv==2) + { + if (tempera.Humidity == 0) + { + return "--%"; + } + return $"{tempera.Humidity}%"; + } + return null; + } else { return null; -- Gitblit v1.8.0