From a7a6907b3df65db9c4b2bb1237f709db5c985b52 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期二, 03 十二月 2019 10:25:20 +0800
Subject: [PATCH] 2019.12.3

---
 ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs b/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs
index 7145309..b0c6df1 100644
--- a/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs
@@ -116,10 +116,14 @@
                 Height = Application.GetMinRealAverage(444),
                 Gravity = Gravity.CenterHorizontal,
                 Radius = (uint)Application.GetRealHeight(CommonFormResouce.BigFormRadius),
-                ImagePath = room.BackgroundImageType==0? room.BackgroundImage: System.IO.Path.Combine(Config.Instance.FullPath, room.BackgroundImage)
+                ImagePath = room.BackgroundImageType == 0 ? room.BackgroundImage : System.IO.Path.Combine(Config.Instance.FullPath, room.BackgroundImage)
             };
             bodyFrameLayout.AddChidren(backGround);
             backGround.SetViewShadow(true);
+            if (room.BackgroundImageType != 0)
+            {
+                backGround.ImageBytes = Shared.IO.FileUtils.ReadFile(backGround.ImagePath);
+            }
             backGround.MouseUpEventHandler += backGroundIMGHander;
 
             var infoFL = new FrameLayout
@@ -150,6 +154,10 @@
             nameRow.SetTipTitle($"{Language.StringByID(R.MyInternationalizationString.RoomName)} :");
             nameRow.SetTitle(room.Name);
             infoFL.AddChidren(nameRow);
+            if(room.IsLove)
+            {
+                nameRow.NameText.Enable = false;
+            }
 
             var floorRow = new DeviceInfoRow(308);
             floorRow.Init();
@@ -397,7 +405,7 @@
                 }
                 if (IconPathType == 0)
                 {
-                    room.BackgroundImage = backGround.UnSelectedImagePath;
+                    room.BackgroundImage = backGround.ImagePath;
                 }
                 else
                 {
@@ -509,7 +517,7 @@
                 {
                     IconPathType = 0;
                     backGround.ImageBytes = null;
-                    backGround.UnSelectedImagePath = imgPath;
+                    backGround.ImagePath = imgPath;
                 };
             };
             selectPhotographBtn.MouseUpEventHandler += (send, ee) =>
@@ -522,12 +530,12 @@
                 {
                     if (IconPathType != 0)
                     {
-                        Global.DeleteFilebyHomeId(backGround.UnSelectedImagePath);
+                        Global.DeleteFilebyHomeId(backGround.ImagePath);
                     }
 
                     IconPathType = 1;
                     backGround.ImageBytes = Shared.IO.FileUtils.ReadFile(imagePath);
-                    backGround.UnSelectedImagePath = imagePath;
+                    backGround.ImagePath = imagePath;
                     System.IO.File.Delete(imagePath);
 
                 }, fileName, 2, 1);
@@ -543,12 +551,12 @@
                 {
                     if (IconPathType != 0)
                     {
-                        Global.DeleteFilebyHomeId(backGround.UnSelectedImagePath);
+                        Global.DeleteFilebyHomeId(backGround.ImagePath);
                     }
 
                     IconPathType = 2;
                     backGround.ImageBytes = Shared.IO.FileUtils.ReadFile(imagePath);
-                    backGround.UnSelectedImagePath = imagePath;
+                    backGround.ImagePath = imagePath;
                     System.IO.File.Delete(imagePath);
 
                 }, fileName, 2, 1);

--
Gitblit v1.8.0