From e747e6d8524e3146bb48dc304a713f309966b1c6 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期二, 19 五月 2020 13:10:03 +0800
Subject: [PATCH] 新版本

---
 ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs |   20 ++++++--------------
 1 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs
index 29cdfe9..647af1d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs
@@ -14,10 +14,9 @@
         /// 鏋勯�犲嚱鏁�
         /// </summary>
         /// <param name="doorLock"></param>
-        public AddScenePage(ZigBee.Device.Panel key, List<ScenesListInfo> gwScenesList)
+        public AddScenePage(ZigBee.Device.Panel key)
         {
             this.currentKey = key;
-            gwCurScenesList = gwScenesList;
         }
 
         #region  鍙橀噺鐢虫槑
@@ -62,10 +61,7 @@
         /// </summary>
         Dictionary<string, string> dicFloor;
         List<SceneUI> currentKeyAllRoomSceneList = new List<SceneUI>();
-        /// <summary>
-        /// 缃戝叧涓殑鍦烘櫙鍒楄〃
-        /// </summary>
-        public List<ScenesListInfo> gwCurScenesList = new List<ScenesListInfo>();
+
         #endregion
 
         /// <summary>
@@ -279,7 +275,7 @@
                     Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); });
                     if (currentKey.bindList.Count != 0)
                     {
-                        var bindResult = await currentKey.ClearBindInfoAsync();
+                        var bindResult = HdlDeviceBindLogic.Current.ClearBindInfoAsync(currentKey);
                         if (bindResult != null && bindResult.clearBindInfoResponseData != null)
                         {
                             if (bindResult.clearBindInfoResponseData.Result != 0)
@@ -315,7 +311,7 @@
                         }
                     }
 
-                    var temp = await currentKey.ConfigureHdlKeyValueAsync(Panel.KeyMode.Scene_Trigger);
+                    var temp = HdlDeviceBindLogic.Current.ConfigureHdlKeyValueAsync(currentKey, Panel.KeyMode.Scene_Trigger);
                     if (temp == null || temp.setWritableValueResponData == null)
                     {
                         Application.RunOnMainThread(() =>
@@ -374,7 +370,7 @@
                         }
 
                         var dev = new AddedDeviceBindResponseAllData();
-                        dev = await currentKey.AddDeviceBindAsync(addBindeDev);
+                        dev = HdlDeviceBindLogic.Current.AddDeviceBindAsync(addBindeDev);
                         if (dev != null && dev.addedDeviceBindResponseData != null)
                         {
                             if (dev.addedDeviceBindResponseData.Result == 0)
@@ -989,11 +985,7 @@
                 {
                     continue;
                 }
-                var gwSc = gwCurScenesList.Find(obj => (obj.ScenesId == sceneId));
-                if (gwSc != null)
-                {
-                    tempSceneUIList.Add(scene);
-                }
+                tempSceneUIList.Add(scene);
             }
             return tempSceneUIList;
         }

--
Gitblit v1.8.0