| | |
| | | public UserManagement(ZigBee.Device.DoorLock doorLock) |
| | | { |
| | | this.doorLock = doorLock; |
| | | localAllAccountListTemp = doorLock.localAllAccountList; |
| | | localDoorLockUserListTemp = doorLock.localDoorLockUserList; |
| | | } |
| | | |
| | | #region ◆ 变量申明__________________________ |
| | | ZigBee.Device.DoorLock doorLock; |
| | | VerticalRefreshLayout midVerticalScrolViewLayout; |
| | | public List<Shared.Phone.UserCenter.MemberInfoRes> localAllAccountListTemp = new List<Shared.Phone.UserCenter.MemberInfoRes> { }; |
| | | public Dictionary<int, DoorLockCommonInfo.LocaDoorLockObj> localDoorLockUserListTemp = new Dictionary<int, DoorLockCommonInfo.LocaDoorLockObj>(); |
| | | |
| | | |
| | | #endregion |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | doorLock.localAllAccountList.Clear(); |
| | | doorLock.localAllAccountList = localAccountListTemp; |
| | | localAllAccountListTemp = doorLock.localAllAccountList; |
| | | |
| | | //初始化权限信息 |
| | | foreach (var sub in localAccountListTemp) |
| | |
| | | } |
| | | |
| | | //获取本地门锁列表 |
| | | var list = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetDoorLockAllAcountUserlist(doorLock); |
| | | if (localDoorLockUserListTemp.Count == 0) |
| | | { |
| | | var list = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetDoorLockAllAcountUserlist(doorLock); |
| | | localDoorLockUserListTemp = doorLock.localDoorLockUserList; |
| | | } |
| | | doorLock.ReSave(); |
| | | } |
| | | else |
| | |
| | | { |
| | | MidFrameLayoutContent(); |
| | | CommonPage.Loading.Hide(); |
| | | midVerticalScrolViewLayout.EndHeaderRefreshing(); |
| | | }); |
| | | } |
| | | }); |
| | |
| | | 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, |
| | | IsBold = true, |
| | | TextSize = 13, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | btnAddFrameLayout.AddChidren(btnUndistributeText); |
| | |
| | | { |
| | | }; |
| | | this.midFrameLayout.AddChidren(midVerticalScrolViewLayout); |
| | | |
| | | if (localAllAccountListTemp.Count == 0) |
| | | { |
| | | CommonPage.Loading.Start("Loading..."); |
| | | ReadAccountDoorLockInfoList(); |
| | | } |
| | | else |
| | | { |
| | | MidFrameLayoutContent(); |
| | | } |
| | | |
| | | midVerticalScrolViewLayout.BeginHeaderRefreshingAction += () => |
| | | { |
| | | midVerticalScrolViewLayout.BeginHeaderRefreshing(); |
| | | |
| | | midVerticalScrolViewLayout.EndHeaderRefreshing(); |
| | | ReadAccountDoorLockInfoList(); |
| | | }; |
| | | CommonPage.Loading.Start("Loading..."); |
| | | ReadAccountDoorLockInfoList(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | 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, |
| | | }; |
| | |
| | | line2.Visible = false; |
| | | } |
| | | |
| | | if (currentAccount.UserName != null) |
| | | if (!string.IsNullOrEmpty(currentAccount.UserName)) |
| | | { |
| | | btnText.Text = currentAccount.UserName; |
| | | } |