From 9c16d3614d9b88c637f967518a329f239fcd3aaf Mon Sep 17 00:00:00 2001 From: lss <316519258@qq.com> Date: 星期五, 12 六月 2020 09:22:04 +0800 Subject: [PATCH] 2020.06.12 --- ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs | 31 +++++++++++++++++++++++++------ 1 files changed, 25 insertions(+), 6 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs b/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs index 2e2916f..a51a0e1 100755 --- a/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs +++ b/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs @@ -159,8 +159,8 @@ //鍦烘櫙鍥剧墖 this.btnScenePic = new ImageView(); btnScenePic.Y = Application.GetRealHeight(46); - btnScenePic.Width = Application.GetMinRealAverage(887); - btnScenePic.Height = Application.GetMinRealAverage(444); + btnScenePic.Width = this.GetPictrueRealSize(887); + btnScenePic.Height = this.GetPictrueRealSize(444); btnScenePic.Radius = (uint)Application.GetRealHeight(17); btnScenePic.Gravity = Gravity.CenterHorizontal; if (this.editorScene == null) @@ -259,7 +259,7 @@ /// </summary> private void InitAddTargetControl() { - if (this.frameTargetTableControl == null) + if (this.frameTargetTableControl == null || this.frameTargetTableControl.Parent == null) { //娣诲姞鐩爣鐨勭殑瀹瑰櫒鎺т欢 this.frameTargetTableControl = new FrameListControl(); @@ -295,8 +295,11 @@ { //浠庣綉鍏宠幏鍙栧満鏅殑鎵ц鐩爣 var result = await this.GetSceneTargetList(); - //娣诲姞銆愭墽琛岀洰鏍囪銆� - this.AddTargetRow(); + if (result == true) + { + //娣诲姞銆愭墽琛岀洰鏍囪銆� + this.AddTargetRow(); + } }); } @@ -636,6 +639,7 @@ { return true; } + //鎵撳紑杩涘害鏉� this.ShowProgressBar(); //鑾峰彇鎵ц鐩爣鍒楄〃 @@ -672,7 +676,7 @@ //閭d釜鐗规畩鐨勬帶浠� this.frameBottomTemp = new FrameLayout(); frameBottomTemp.Height = bodyFrameLayout.Height - btnTemp.Yaxis + Application.GetRealHeight(23); - this.listBodyControl.AddChidrenFrame(frameBottomTemp); + this.listBodyControl.AddChidren(frameBottomTemp); } #endregion @@ -818,6 +822,9 @@ this.editorScene.IconPath = this.cloneScene.IconPath; this.editorScene.Save(); + //鏂板缓鍦烘櫙,涓婚〉闇�瑕侀噸鏂板埛鏂� + UserView.UserPage.Instance.RefreshForm = true; + HdlThreadLogic.Current.RunMain(() => { //璋冪敤鍥炶皟鍑芥暟 @@ -857,6 +864,15 @@ //鍙樻洿鎴块棿 HdlSceneLogic.Current.ChangedSceneRoom(this.editorScene, this.nowRoomId); } + else + { + //绉婚櫎鍑烘埧闂� + var room = HdlRoomLogic.Current.GetRoomBySceneId(this.editorScene.Id); + if (room != null) + { + HdlSceneLogic.Current.DeleteSceneFromRoom(room, this.editorScene); + } + } //鍥剧墖鏀瑰彉浜� if (isScenePictrueChanged == true) @@ -885,6 +901,9 @@ this.editorScene.IconPath = this.cloneScene.IconPath; this.editorScene.Save(); + //缂栬緫鍦烘櫙,涓婚〉闇�瑕侀噸鏂板埛鏂� + UserView.UserPage.Instance.RefreshForm = true; + HdlThreadLogic.Current.RunMain(() => { //璋冪敤鍥炶皟鍑芥暟 -- Gitblit v1.8.0