| | |
| | | var myDevice = Common.LocalDevice.Current.GetDevice(DeviceAddr, DeviceEpoint);
|
| | | if (myDevice != null)
|
| | | {
|
| | | return $"DeviceUI_{myDevice.FilePath}";
|
| | | return myDevice.FilePath;
|
| | | } |
| | | return $"DeviceUI_Unkwon"; |
| | | return $"Device_Unkwon"; |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | #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 |
| | | } |
| | | } |