From 00ab3ddb140ba8bb88b5cf572b004a85e1da85e9 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期四, 02 一月 2020 19:51:56 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev-tzy' into DEV_GXC

---
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserManagement.cs |   35 +++++++++++++++++++++++++++--------
 1 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserManagement.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserManagement.cs
index a34d257..381fa8d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserManagement.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserManagement.cs
@@ -31,14 +31,16 @@
 
         #region 鈼� 鍙橀噺鐢虫槑__________________________
         ZigBee.Device.DoorLock doorLock;
-        VerticalScrolViewLayout midVerticalScrolViewLayout;
+        VerticalRefreshLayout midVerticalScrolViewLayout;
         #endregion
 
+        /// <summary>
+        /// 鏁版嵁鍒锋柊
+        /// </summary>
         void ReadAccountDoorLockInfoList()
         {
             System.Threading.Tasks.Task.Run(async () =>
             {
-                Application.RunOnMainThread(() => { CommonPage.Loading.Start("Loading..."); });
                 try
                 {
                     var localAccountListTemp = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.LocalAccountList();
@@ -83,11 +85,15 @@
                     {
                         MidFrameLayoutContent();
                         CommonPage.Loading.Hide();
+                        midVerticalScrolViewLayout.EndHeaderRefreshing();
                     });
                 }
             });
         }
 
+        /// <summary>
+        /// 鏄剧ず鐣岄潰
+        /// </summary>
         public void Show()
         {
             this.TopFrameLayout(this, Language.StringByID(R.MyInternationalizationString.UserManagement));
@@ -119,12 +125,14 @@
             var btnUndistributeText = new Button
             {
                 Height = Application.GetRealHeight(72),
-                Width = Application.GetRealWidth(121),
+                Width = Application.GetRealWidth(150),
                 TextID = R.MyInternationalizationString.Undistributed,
                 TextColor = Shared.Common.ZigbeeColor.Current.XMTopTitleText,
                 X = btnUndistributeIcon.Right,
-                TextAlignment = TextAlignment.CenterLeft,
-            };
+                IsBold =true,
+                TextSize =13,
+                TextAlignment = TextAlignment.CenterLeft, 
+             };
             btnAddFrameLayout.AddChidren(btnUndistributeText);
             if (UserCenterResourse.UserInfo.AuthorityNo != 1)
             {
@@ -141,13 +149,24 @@
             btnAddFrameLayout.MouseDownEventHandler += eHandler;
             btnUndistributeText.MouseDownEventHandler += eHandler;
             btnUndistributeIcon.MouseDownEventHandler += eHandler;
-            midVerticalScrolViewLayout = new VerticalScrolViewLayout()
+            midVerticalScrolViewLayout = new VerticalRefreshLayout()
             {
             };
             this.midFrameLayout.AddChidren(midVerticalScrolViewLayout);
+
+            CommonPage.Loading.Start("Loading...");
             ReadAccountDoorLockInfoList();
+
+            midVerticalScrolViewLayout.BeginHeaderRefreshingAction += () =>
+            {
+                midVerticalScrolViewLayout.BeginHeaderRefreshing();
+                ReadAccountDoorLockInfoList();
+            };
         }
 
+        /// <summary>
+        /// 涓儴甯冨眬鏄剧ず
+        /// </summary>
         async void MidFrameLayoutContent()
         {
             midVerticalScrolViewLayout.RemoveAll();
@@ -166,7 +185,7 @@
                     X = Application.GetRealWidth(58),
                     Width = Application.GetRealWidth(300),
                     TextAlignment = TextAlignment.CenterLeft,
-                    TextColor = Shared.Common.ZigbeeColor.Current.XMTopTitleText,
+                    TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
                     Gravity = Gravity.CenterVertical,
                     TextSize = 14,
                 };
@@ -205,7 +224,7 @@
                     line2.Visible = false;
                 }
 
-                if (currentAccount.UserName != null)
+                if (!string.IsNullOrEmpty(currentAccount.UserName))
                 {
                     btnText.Text = currentAccount.UserName;
                 }

--
Gitblit v1.8.0