| | |
| | | /// 楼层Id |
| | | /// 新增时使用Guid |
| | | /// </summary> |
| | | public string FloorId = "Floor1"; |
| | | public string FloorId = string.Empty; |
| | | /// <summary> |
| | | /// 楼层名称 |
| | | /// </summary> |
| | |
| | | //设备(deviceUI) |
| | | beforeRoom.DeviceUIList.Clear(); |
| | | foreach (var deviceFilePath in beforeRoom.DeviceUIFilePathList) |
| | | { |
| | | var jsonInfo = Encoding.UTF8.GetString(Global.ReadFileByHomeId(deviceFilePath)); |
| | | var tempDeviceUI = Newtonsoft.Json.JsonConvert.DeserializeObject<DeviceUI>(jsonInfo); |
| | | if (tempDeviceUI != null) |
| | | { |
| | | var delCommon = tempDeviceUIList.Find((obj) => obj.CommonDevice != null && tempDeviceUI.CommonDevice != null && obj.CommonDevice.Type == tempDeviceUI.CommonDevice.Type && obj.CommonDevice.CommonDeviceAddrEpoint == tempDeviceUI.CommonDevice.CommonDeviceAddrEpoint); |
| | | if (delCommon != null) |
| | | { |
| | | beforeRoom.DeviceUIList.Add(delCommon); |
| | | } |
| | | else |
| | | { |
| | | beforeRoom.AddDevice(deviceFilePath); |
| | | } |
| | | } |
| | | {
|
| | | beforeRoom.DeviceUIList.Add(Common.LocalDevice.Current.GetDeviceUI(deviceFilePath)); |
| | | } |
| | | //场景(SceneUI) |
| | | beforeRoom.SceneUIList.Clear(); |