From 43b0d5870d528f23ecd6aeceb6cfd4325188b46f Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 01 七月 2021 15:50:43 +0800
Subject: [PATCH] Revert "1"

---
 HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs |   73 +++++++++++++++++++-----------------
 1 files changed, 38 insertions(+), 35 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs
index ae8c28d..4d894c0 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs
@@ -1,5 +1,6 @@
 锘縰sing System;
 using System.Collections.Generic;
+using HDL_ON.DAL.Server;
 using HDL_ON.Entity;
 using HDL_ON.UI.CSS;
 using Shared;
@@ -9,7 +10,7 @@
     {
         FrameLayout bodyView;
 
-        VerticalScrolViewLayout contentView;
+        VerticalRefreshLayout contentView;
 
         List<IntegratedBrand> brandList;
 
@@ -21,17 +22,11 @@
 
         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;
 
-            contentView = new  VerticalScrolViewLayout()
+            contentView = new VerticalRefreshLayout()
             {
                 Y = Application.GetRealHeight(64),
                 Height = Application.GetRealHeight(603),
@@ -39,6 +34,12 @@
             bodyView.AddChidren(contentView);
 
             GetBindList();
+
+            contentView.BeginHeaderRefreshingAction = () =>
+            {
+                contentView.EndHeaderRefreshing();
+                GetBindList();
+            };
 
         }
         /// <summary>
@@ -70,6 +71,10 @@
                               
                             });
                         }
+                    }
+                    else
+                    {
+                        IMessageCommon.Current.ShowErrorInfoAlter(pack.Code);
                     }
                 }
                 catch (Exception ex)
@@ -193,32 +198,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();
+            //};
 
 
 

--
Gitblit v1.8.0