From 07466c19110693e3e439a7d7c8ad0bc21d9b3287 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期三, 29 四月 2020 09:14:01 +0800
Subject: [PATCH] 优化代码,更改门锁需求接口

---
 ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs b/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs
index 8ee6132..d89aea9 100755
--- a/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs
@@ -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();
             //鑾峰彇鎵ц鐩爣鍒楄〃

--
Gitblit v1.8.0