From aed247d7fa4499665041864479fae82089eafe5f Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期二, 07 一月 2020 09:15:57 +0800 Subject: [PATCH] 2019.1.7 --- ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs b/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs index d912084..bc1f4e1 100644 --- a/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs +++ b/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs @@ -251,7 +251,6 @@ }; bodyFrameLayout.AddChidren(backGround1); - backGround = new ImageView() { Y = Application.GetRealHeight(60), @@ -422,7 +421,7 @@ 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)); + HdlAutoBackupLogic.DeleteFile(OldBackgroundImagePath); } if (IconPathType == 0) { @@ -431,7 +430,7 @@ else { Shared.IO.FileUtils.WriteFileByBytes(System.IO.Path.Combine(Config.Instance.FullPath, fileName), backGround.ImageBytes); - HdlAutoBackupLogic.AddOrEditorFile(System.IO.Path.Combine(Config.Instance.FullPath, fileName)); + HdlAutoBackupLogic.AddOrEditorFile(fileName); room.BackgroundImage = fileName; } room.BackgroundImageType = IconPathType; @@ -553,6 +552,10 @@ //閫氳繃鐩告満鎷嶇収瑁佸壀 CropImage.TakePicture((imagePath) => { + if (string.IsNullOrEmpty(imagePath)) + { + return; + } if (IconPathType != 0) { Global.DeleteFilebyHomeId(backGround.ImagePath); @@ -574,6 +577,10 @@ //浠庣浉鍐岄�夋嫨鍥剧墖瑁佸壀 CropImage.SelectPicture((imagePath) => { + if (string.IsNullOrEmpty(imagePath)) + { + return; + } if (IconPathType != 0) { Global.DeleteFilebyHomeId(backGround.ImagePath); -- Gitblit v1.8.0