From fe2b566c8d9c097d2568ad211088fa5bc6f8c229 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期二, 23 三月 2021 13:48:25 +0800
Subject: [PATCH] 2.增加住宅绑定网关判断,没有绑定网关的住宅,ON+不再显示

---
 HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs
index 682700c..c7da6e2 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs
@@ -18,7 +18,7 @@
             brand = integratedBrand;
         }
 
-        public void LoadPage()
+        public void LoadPage(VerticalRefreshLayout refreshView)
         {
             new TopViewDiv(bodyView, Language.StringByID(StringId.AddDevice)).LoadTopView();
             bodyView.BackgroundColor = CSS_Color.BackgroundColor;
@@ -33,16 +33,16 @@
 
 
 
-            Load3tyBrandDeviceList();
+            Load3tyBrandDeviceList(refreshView);
 
             contentView.BeginHeaderRefreshingAction = () =>
             {
                 contentView.EndHeaderRefreshing();
-                Load3tyBrandDeviceList();
+                Load3tyBrandDeviceList(refreshView);
             };
         }
 
-        void Load3tyBrandDeviceList()
+        void Load3tyBrandDeviceList(VerticalRefreshLayout refreshView)
         {
             var waitPage = new Loading();
             waitPage.Start();
@@ -57,7 +57,7 @@
                         var revData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<IntegratedBrandDevice>>(pack.Data.ToString());
                         Application.RunOnMainThread(() =>
                         {
-                            LoadRow(revData);
+                            LoadRow(revData, refreshView);
                         });
                     }
                     else
@@ -77,7 +77,7 @@
             { IsBackground = true }.Start();
         }
 
-        void LoadRow(List<IntegratedBrandDevice> deviceList)
+        void LoadRow(List<IntegratedBrandDevice> deviceList, VerticalRefreshLayout refreshView)
         {
             contentView.RemoveAll();
             bool isFrist = true;
@@ -143,6 +143,9 @@
                         case SPK.IrModule:
                             var form = new AddMiniRemoteControlDirection1Page();
                             form.AddForm();
+                            form.AddDeviceEvent = (functionObj) => {
+                                refreshView.BeginHeaderRefreshing();
+                            }; 
                             break;
                     }
                 };

--
Gitblit v1.8.0