| | |
| | | /// <summary> |
| | | /// backGround |
| | | /// </summary> |
| | | private Button backGround; |
| | | private ImageView backGround; |
| | | |
| | | /// <summary> |
| | | /// 是否修改 |
| | |
| | | }; |
| | | 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); |
| | |
| | | } |
| | | 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}"); |
| | |
| | | { |
| | | IconPathType = 0; |
| | | backGround.ImageBytes = null; |
| | | backGround.UnSelectedImagePath = imgPath; |
| | | backGround.ImagePath = imgPath; |
| | | }; |
| | | }; |
| | | selectPhotographBtn.MouseUpEventHandler += (send, ee) => |
| | |
| | | { |
| | | 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); |
| | |
| | | { |
| | | 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); |
| | |
| | | } |
| | | else |
| | | { |
| | | modifySceneUI.IconPath = backGround.UnSelectedImagePath; |
| | | modifySceneUI.IconPath = backGround.ImagePath; |
| | | } |
| | | modifySceneUI.IconPathType = IconPathType; |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | imgPath = backGround.UnSelectedImagePath; |
| | | imgPath = backGround.ImagePath; |
| | | } |
| | | if (Common.Room.CurrentRoom.GetSameFloorScenes(curRoom.FloorId).Find(s => s.Name == nameRow.NameText.Text.Trim()) != null) |
| | | { |