From 98ceb6bd2021f9ff136cda27eef28676dd7b5d92 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 21 五月 2020 13:24:02 +0800
Subject: [PATCH] 最后的版本

---
 ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs b/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs
index 156f29f..0c86547 100755
--- a/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs
@@ -639,6 +639,7 @@
             {
                 return true;
             }
+
             //鎵撳紑杩涘害鏉�
             this.ShowProgressBar();
             //鑾峰彇鎵ц鐩爣鍒楄〃
@@ -821,6 +822,9 @@
             this.editorScene.IconPath = this.cloneScene.IconPath;
             this.editorScene.Save();
 
+            //鏂板缓鍦烘櫙,涓婚〉闇�瑕侀噸鏂板埛鏂�
+            UserView.UserPage.Instance.RefreshForm = true;
+
             HdlThreadLogic.Current.RunMain(() =>
             {
                 //璋冪敤鍥炶皟鍑芥暟
@@ -860,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)
@@ -888,6 +901,9 @@
             this.editorScene.IconPath = this.cloneScene.IconPath;
             this.editorScene.Save();
 
+            //缂栬緫鍦烘櫙,涓婚〉闇�瑕侀噸鏂板埛鏂�
+            UserView.UserPage.Instance.RefreshForm = true;
+
             HdlThreadLogic.Current.RunMain(() =>
             {
                 //璋冪敤鍥炶皟鍑芥暟

--
Gitblit v1.8.0