gxc
2020-01-10 b8cbf4a8b6910eefcb83b6d3a39e9b5b5a9cd79e
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;
                }