gxc
2019-12-03 a7a6907b3df65db9c4b2bb1237f709db5c985b52
ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs
@@ -59,7 +59,7 @@
        /// <summary>
        /// backGround
        /// </summary>
        private Button backGround;
        private ImageView backGround;
        /// <summary>
        /// 是否修改
@@ -320,13 +320,13 @@
            };
            bodyFrameLayout.AddChidren(imgFL);
            backGround = new Button()
            backGround = new ImageView()
            {
                Width = Application.GetMinRealAverage(930),
                Height = Application.GetMinRealAverage(464),
                Gravity = Gravity.Center,
                Radius = (uint)Application.GetMinRealAverage(CommonFormResouce.BigFormRadius),
                UnSelectedImagePath = "SceneIcon/3.jpg"
                ImagePath = "SceneIcon/3.jpg"
            };
            imgFL.AddChidren(backGround);
            backGround.SetViewShadow(true);
@@ -436,11 +436,11 @@
                }
                if (modifySceneUI.IconPathType==0)
                {
                    backGround.UnSelectedImagePath = modifySceneUI.IconPath;
                    backGround.ImagePath = modifySceneUI.IconPath;
                }
                else
                {
                    backGround.UnSelectedImagePath = System.IO.Path.Combine(Config.Instance.FullPath, modifySceneUI.IconPath);
                    backGround.ImagePath = System.IO.Path.Combine(Config.Instance.FullPath, modifySceneUI.IconPath);
                }
                nameRow.SetTitle(modifySceneUI.Name);
                zoneRow.SetTitle($"{Config.Instance.Home.GetFloorNameById(modifyRoom.FloorId)},{modifyRoom.Name}");
@@ -544,7 +544,7 @@
                    {
                        IconPathType = 0;
                        backGround.ImageBytes = null;
                        backGround.UnSelectedImagePath = imgPath;
                        backGround.ImagePath = imgPath;
                    };
                };
                selectPhotographBtn.MouseUpEventHandler += (send, ee) =>
@@ -559,13 +559,13 @@
                        {
                            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);
@@ -583,13 +583,13 @@
                        {
                            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);
@@ -871,7 +871,7 @@
                            }
                            else
                            {
                                modifySceneUI.IconPath = backGround.UnSelectedImagePath;
                                modifySceneUI.IconPath = backGround.ImagePath;
                            }
                            modifySceneUI.IconPathType = IconPathType;
@@ -1027,7 +1027,7 @@
                            }
                            else
                            {
                                imgPath = backGround.UnSelectedImagePath;
                                imgPath = backGround.ImagePath;
                            }
                            if (Common.Room.CurrentRoom.GetSameFloorScenes(curRoom.FloorId).Find(s => s.Name == nameRow.NameText.Text.Trim()) != null)
                            {