gxc
2019-12-03 a7a6907b3df65db9c4b2bb1237f709db5c985b52
ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs
@@ -120,6 +120,10 @@
            };
            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);