From 23fb45dd846ed8b62304c408c6bbe64265d4ac8b Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期五, 20 十二月 2019 18:57:16 +0800 Subject: [PATCH] 代码合并 --- ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserManagement.cs | 25 +++++++++++++++++++++---- 1 files changed, 21 insertions(+), 4 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserManagement.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserManagement.cs index a34d257..194f8d7 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)); @@ -141,13 +147,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(); @@ -205,7 +222,7 @@ line2.Visible = false; } - if (currentAccount.UserName != null) + if (!string.IsNullOrEmpty(currentAccount.UserName)) { btnText.Text = currentAccount.UserName; } -- Gitblit v1.8.0