From 3176cd34e79151c89cfba06540c6a5f892883fb3 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期三, 17 三月 2021 11:07:23 +0800
Subject: [PATCH] 1.添加功能优化

---
 HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs  |   58 ++++++++++++----------------
 HDL-ON_iOS/Resources/Language.ini                            |    4 ++
 HDL-ON_Android/Assets/Language.ini                           |    5 ++
 HDL_ON/Common/R.cs                                           |    2 +
 HDL_ON/DAL/Server/HttpServerRequest.cs                       |    2 +
 HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs |   10 +++-
 HDL_ON/UI/MainPage.cs                                        |    2 
 7 files changed, 46 insertions(+), 37 deletions(-)

diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index a042891..10278a9 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -411,6 +411,7 @@
 426=Air dry time
 427=Disinfect time
 428=Anion Time
+
 429=H
 430=Min
 431=You are currently adding any platform devices to
@@ -418,6 +419,8 @@
 433=Water valve
 434=Time switch
 435=Remote control
+436=Added Devices
+437=Device List
 
 1000=Indoor Humidity
 1001=V-chip
@@ -1178,6 +1181,8 @@
 433=姘撮榾
 434=瀹氭椂寮�鍏�
 435=閬ユ帶鍣�
+436=宸叉坊鍔犲姛鑳�
+437=璁惧鍒楄〃
 
 
 1000=瀹ゅ唴婀垮害
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index 765e310..10278a9 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -419,6 +419,8 @@
 433=Water valve
 434=Time switch
 435=Remote control
+436=Added Devices
+437=Device List
 
 1000=Indoor Humidity
 1001=V-chip
@@ -1179,6 +1181,8 @@
 433=姘撮榾
 434=瀹氭椂寮�鍏�
 435=閬ユ帶鍣�
+436=宸叉坊鍔犲姛鑳�
+437=璁惧鍒楄〃
 
 
 1000=瀹ゅ唴婀垮害
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index 3d2d9c9..8a16b35 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -4,6 +4,8 @@
 {
     public static class StringId
     {
+        public const int DeviceList = 437;
+        public const int AddedDevice = 436;
         public const int RemoteControl = 435;
         public const int TimeSwitch = 434;
         public const int WaterValve = 433;
diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index 7dd8e14..6720c2b 100644
--- a/HDL_ON/DAL/Server/HttpServerRequest.cs
+++ b/HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -1808,6 +1808,8 @@
             d.Add("categoryType", 1);
             d.Add("productPlatform", productPlatform);
             d.Add("productBrand", productBrand);
+            d.Add("networkConfig", true);
+            
 
             var requestJson = HttpUtil.GetSignRequestJson(d);
             return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_Get3tyBrandDevcieList, requestJson);
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index 1850d6b..227e21f 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -192,7 +192,7 @@
                         waitPage.RemoveFromParent();
                         BaseView.RemoveAll();
                         BasePageView = new PageLayout();
-                        BasePageView.ScrollEnabled = false;
+                        BasePageView.ScrollEnabled = true;
                         BasePageView.IsShowPoint = false;
                         BasePageView.PageChange = (sender, e) =>
                         {
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs
index ae8c28d..b8f0a39 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs
@@ -21,13 +21,7 @@
 
         public void LoadPage()
         {
-            Action<string,string> action = (s,a) => {
-                var page = new AddThirdPartyBrandListpage(brandList);
-                MainPage.BasePageView.AddChidren(page);
-                page.LoadPage();
-                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
-            };
-            new TopViewDiv(bodyView, Language.StringByID(StringId.FunctionBrand)).LoadTopView_AddIcon("3ty",action);
+            new TopViewDiv(bodyView, Language.StringByID(StringId.FunctionBrand)).LoadTopView();//.LoadTopView_AddIcon("3ty",action);
 
             bodyView.BackgroundColor = CSS_Color.BackgroundColor;
 
@@ -193,32 +187,30 @@
             };
             contentView.AddChidren(btnTipText1);
 
-            var btnAdd = new Button()
-            {
-                Y = Application.GetRealHeight(500),
-                Gravity = Gravity.CenterHorizontal,
-                Width = Application.GetRealWidth(220),
-                Height = Application.GetRealWidth(44),
-                BackgroundColor = CSS_Color.MainColor,
-                TextAlignment = TextAlignment.Center,
-                TextColor = CSS_Color.MainBackgroundColor,
-                TextSize = CSS_FontSize.SubheadingFontSize,
-                IsBold = true,
-                Radius = (uint)Application.GetRealWidth(22),
-                BorderColor = 0x00000000,
-                BorderWidth = 0,
-                TextID = StringId.Add,
-            };
-            contentView.AddChidren(btnAdd);
-
-
-            btnAdd.MouseUpEventHandler = (sender, e) => {
-                var page = new AddThirdPartyBrandListpage(brandList);
-                MainPage.BasePageView.AddChidren(page);
-                page.LoadPage();
-                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
-                this.RemoveFromParent();
-            };
+            //var btnAdd = new Button()
+            //{
+            //    Y = Application.GetRealHeight(500),
+            //    Gravity = Gravity.CenterHorizontal,
+            //    Width = Application.GetRealWidth(220),
+            //    Height = Application.GetRealWidth(44),
+            //    BackgroundColor = CSS_Color.MainColor,
+            //    TextAlignment = TextAlignment.Center,
+            //    TextColor = CSS_Color.MainBackgroundColor,
+            //    TextSize = CSS_FontSize.SubheadingFontSize,
+            //    IsBold = true,
+            //    Radius = (uint)Application.GetRealWidth(22),
+            //    BorderColor = 0x00000000,
+            //    BorderWidth = 0,
+            //    TextID = StringId.Add,
+            //};
+            //contentView.AddChidren(btnAdd);
+            //btnAdd.MouseUpEventHandler = (sender, e) => {
+            //    var page = new AddThirdPartyBrandListpage(brandList);
+            //    MainPage.BasePageView.AddChidren(page);
+            //    page.LoadPage();
+            //    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+            //    this.RemoveFromParent();
+            //};
 
 
 
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
index df95071..38b2ef2 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
@@ -20,7 +20,13 @@
 
         public void LoadPage()
         {
-            new TopViewDiv(bodyView, Language.StringByID(StringId.AddDevice)).LoadTopView();
+            Action<string,string> action = (s,a) => {
+                var page = new AddDevciePage(brand);
+                MainPage.BasePageView.AddChidren(page);
+                page.LoadPage();
+                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+            };
+            new TopViewDiv(bodyView, Language.StringByID(StringId.Devices)).LoadTopView_AddIcon("3ty",action);
             bodyView.BackgroundColor = CSS_Color.BackgroundColor;
 
             contentView = new VerticalRefreshLayout()
@@ -69,8 +75,6 @@
 
         void LoadRow(List<Function> deviceList)
         {
-            deviceList.Add(new Function() { name ="娴嬭瘯绾㈠瀹�",spk = SPK.IrModule});
-
             contentView.RemoveAll();
             bool isFrist = true;
             foreach (var device in deviceList)

--
Gitblit v1.8.0