From 66a9965c44ecc32a6696abca876ab9d1cd091584 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期五, 28 二月 2020 15:25:13 +0800 Subject: [PATCH] 2020.2.28 --- ZigbeeApp/Shared/Common/DeviceUI.cs | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 44 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Common/DeviceUI.cs b/ZigbeeApp/Shared/Common/DeviceUI.cs index f1c2b1b..88c0ada 100644 --- a/ZigbeeApp/Shared/Common/DeviceUI.cs +++ b/ZigbeeApp/Shared/Common/DeviceUI.cs @@ -339,6 +339,10 @@ { return Language.StringByID(R.MyInternationalizationString.UnallocatedArea); } + if(string.IsNullOrEmpty(room.FloorId)) + { + return room.Name; + } var floorName = Config.Instance.Home.GetFloorNameById(room.FloorId); if (floorName == null) { @@ -448,6 +452,7 @@ else if (device.Type == DeviceType.IASZone) { var ias = CommonDevice as IASZone; + //鍖哄垎浼犳劅鍣ㄥ叿浣撶被鍨� var info = Common.LocalDevice.Current.GetNotHdlMyDeviceEnumInfo(new List<CommonDevice> { device },false); if (info.ConcreteType == DeviceConcreteType.Sensor_Infrared) { @@ -512,6 +517,45 @@ } return Language.StringByID(R.MyInternationalizationString.IASZone_Statu_Normal); } + else if (info.ConcreteType == DeviceConcreteType.Sensor_Motion) + { + //杩愬姩浼犳劅鍣� + if (ias.iASInfo?.Alarm1 == 1) + { + return Language.StringByID(R.MyInternationalizationString.IASZone_Statu_Alarm); + } + return Language.StringByID(R.MyInternationalizationString.IASZone_Statu_Normal); + } + else if (info.ConcreteType == DeviceConcreteType.Sensor_EmergencyButton) + { + //绱ф�ユ寜閽� + if (ias.iASInfo?.Alarm1 == 1) + { + return Language.StringByID(R.MyInternationalizationString.IASZone_Statu_Alarm); + } + return Language.StringByID(R.MyInternationalizationString.IASZone_Statu_Normal); + } + 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 -- Gitblit v1.8.0