old mode 100755
new mode 100644
| | |
| | | //设备(deviceUI) |
| | | beforeRoom.DeviceUIList.Clear(); |
| | | foreach (var deviceFilePath in beforeRoom.DeviceUIFilePathList) |
| | | {
|
| | | beforeRoom.DeviceUIList.Add(Common.LocalDevice.Current.GetDeviceUI(deviceFilePath)); |
| | | { |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | | //场景(SceneUI) |
| | | beforeRoom.SceneUIList.Clear(); |
| | |
| | | System.Console.WriteLine(ex.Message); |
| | | return null; |
| | | } |
| | | |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 获取当前楼层的房间名称 |
| | |
| | | |
| | | if (sceneUI.IconPathType == 1 || sceneUI.IconPathType == 2) |
| | | { |
| | | if (Global.IsExistsByHomeId(sceneUI.IconPath)) |
| | | { |
| | | Global.DeleteFilebyHomeId(sceneUI.IconPath); |
| | | HdlAutoBackupLogic.DeleteFile(sceneUI.IconPath); |
| | | if (Global.IsExistsByHomeId(sceneUI.IconPath))
|
| | | {
|
| | | Global.DeleteFilebyHomeId(sceneUI.IconPath);
|
| | | HdlAutoBackupLogic.DeleteFile(sceneUI.IconPath);
|
| | | } |
| | | } |
| | | |
| | |
| | | SceneUIList.Remove(sceneUI); |
| | | SceneUIFilePathList.Remove(sceneUI.FileName); |
| | | Save(); |
| | | |
| | | |
| | | Global.DeleteFilebyHomeId(sceneUI.FileName); |
| | | HdlAutoBackupLogic.DeleteFile(sceneUI.FileName); |
| | | } |