From 0f5a53c7b36c27a0f2bec12e6119207edb6860f8 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期二, 29 十月 2019 14:29:21 +0800 Subject: [PATCH] 修改主页卡死问题 --- ZigbeeApp/Shared/Common/DeviceUI.cs | 27 +++++++++++++++++++++++++-- 1 files changed, 25 insertions(+), 2 deletions(-) diff --git a/ZigbeeApp/Shared/Common/DeviceUI.cs b/ZigbeeApp/Shared/Common/DeviceUI.cs index c91f9ec..7bad709 100755 --- a/ZigbeeApp/Shared/Common/DeviceUI.cs +++ b/ZigbeeApp/Shared/Common/DeviceUI.cs @@ -35,9 +35,9 @@ var myDevice = Common.LocalDevice.Current.GetDevice(DeviceAddr, DeviceEpoint); if (myDevice != null) { - return $"DeviceUI_{myDevice.FilePath}"; + return myDevice.FilePath; } - return $"DeviceUI_Unkwon"; + return $"Device_Unkwon"; } } @@ -312,5 +312,28 @@ } #endregion + + #region 鈼� 閫氳繃id鑾峰彇璁惧鍖哄煙_____________ + + /// <summary> + /// GetZone + /// </summary> + /// <returns></returns> + public string GetZone() + { + var room = Room.CurrentRoom.GetRoomByDevice(CommonDevice); + if (room == null) + { + return null; + } + var floorName = Shared.Common.Config.Instance.Home.GetFloorNameById(room.FloorId); + if (floorName == null) + { + return room.Name; + } + return $"{floorName},{room.Name}"; + } + + #endregion } } -- Gitblit v1.8.0