From e5f993f52e09eb46878baced83bb8492f147d41c Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期一, 04 十一月 2019 17:58:40 +0800 Subject: [PATCH] 2019-11-04-1 --- 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