old mode 100755
new mode 100644
| | |
| | | using Shared.Common; |
| | | using Shared.Phone.Device.CommonForm; |
| | | using Shared.Phone.Device.Room; |
| | | using Shared.Phone.UserCenter; |
| | | using static ZigBee.Device.Scene; |
| | | |
| | | namespace Shared.Phone.Device.Category |
| | |
| | | /// <summary> |
| | | /// selectedTimeAction |
| | | /// </summary> |
| | | public Action<SceneTargetDeviceUI> selectedAction; |
| | | |
| | | |
| | | private Action<SceneTargetDeviceUI> selectedAction; |
| | | /// <summary> |
| | | /// 修改场景action |
| | | /// </summary> |
| | | public Action<SceneUI, Common.Room> EditorAction; |
| | | |
| | | #endregion |
| | | |
| | |
| | | /// </summary> |
| | | public override void RemoveFromParent() |
| | | { |
| | | Category.instance?.RefreshBodyView(); |
| | | base.RemoveFromParent(); |
| | | } |
| | | /// <summary> |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | if (sceneTargetDevicesList.Count > 1) |
| | | { |
| | | var targetRowLayout = new RowLayout() |
| | |
| | | { |
| | | selectFL.RemoveFromParent(); |
| | | var tradeTime = DateTime.Now.ToString("yyyyMMddHHmmss", DateTimeFormatInfo.InvariantInfo); |
| | | var fileName = $"SceneIcon_{tradeTime}"; |
| | | var fileName = $"SceneIcon_{tradeTime}.png"; |
| | | //通过相机拍照裁剪 |
| | | CropImage.TakePicture((imagePath) => |
| | | {
|
| | |
| | | if (IconPathType != 0) |
| | | { |
| | | Global.DeleteFilebyHomeId(backGround.ImagePath); |
| | | HdlAutoBackupLogic.DeleteFile(backGround.ImagePath); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | selectFL.RemoveFromParent(); |
| | | var tradeTime = DateTime.Now.ToString("yyyyMMddHHmmss", DateTimeFormatInfo.InvariantInfo); |
| | | var fileName = $"SceneIcon_{tradeTime}"; |
| | | var fileName = $"SceneIcon_{tradeTime}.png"; |
| | | //从相册选择图片裁剪 |
| | | CropImage.SelectPicture((imagePath) => |
| | | {
|
| | |
| | | if (IconPathType != 0) |
| | | { |
| | | Global.DeleteFilebyHomeId(backGround.ImagePath); |
| | | HdlAutoBackupLogic.DeleteFile(backGround.ImagePath); |
| | | } |
| | | } |
| | | |
| | |
| | | try |
| | | { |
| | | var tradeTime = DateTime.Now.ToString("yyyyMMddHHmmss", DateTimeFormatInfo.InvariantInfo); |
| | | var fileName = $"SceneIcon_{tradeTime}"; |
| | | var fileName = $"SceneIcon_{tradeTime}.png"; |
| | | if (modifySceneUI.Name != nameRow.NameText.Text.Trim()) |
| | | { |
| | | if (Common.Room.CurrentRoom.GetSameFloorScenes(curRoom.FloorId).Find(s => s.Name == nameRow.NameText.Text.Trim()) != null) |
| | |
| | | if (OldIconPathType != 0) |
| | | { |
| | | Shared.IO.FileUtils.DeleteFile(System.IO.Path.Combine(Config.Instance.FullPath, OldBackgroundImagePath)); |
| | | HdlAutoBackupLogic.DeleteFile(System.IO.Path.Combine(Config.Instance.FullPath, OldBackgroundImagePath)); |
| | | |
| | | } |
| | | if (IconPathType == 1 || IconPathType == 2) |
| | | { |
| | | Shared.IO.FileUtils.WriteFileByBytes(System.IO.Path.Combine(Config.Instance.FullPath, fileName), backGround.ImageBytes); |
| | | HdlAutoBackupLogic.AddOrEditorFile(System.IO.Path.Combine(Config.Instance.FullPath, fileName)); |
| | | modifySceneUI.IconPath = fileName; |
| | | } |
| | | else |
| | |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |