| | |
| | | |
| | | #region ◆ 变量申明__________________________ |
| | | ZigBee.Device.DoorLock doorLock; |
| | | VerticalScrolViewLayout midVerticalScrolViewLayout; |
| | | VerticalRefreshLayout midVerticalScrolViewLayout; |
| | | #endregion |
| | | |
| | | void ReadAccountList() |
| | | /// <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(); |
| | |
| | | { |
| | | doorLock.localAllAccountList.Clear(); |
| | | doorLock.localAllAccountList = localAccountListTemp; |
| | | |
| | | //初始化权限信息 |
| | | foreach (var sub in localAccountListTemp) |
| | | { |
| | | //初始化权限信息 |
| | | if (doorLock.IsFreezeAccount.ContainsKey(sub.SubAccountDistributedMark) == false) |
| | | { |
| | | doorLock.IsFreezeAccount.Add(sub.SubAccountDistributedMark, false); |
| | |
| | | doorLock.IsFailedToGetDoorLockInfo.Add(sub.SubAccountDistributedMark, false); |
| | | } |
| | | } |
| | | |
| | | //获取本地门锁列表 |
| | | var list = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetDoorLockAllAcountUserlist(doorLock); |
| | | doorLock.ReSave(); |
| | | } |
| | | else |
| | |
| | | }); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 显示界面 |
| | | /// </summary> |
| | | public void Show() |
| | | { |
| | | this.TopFrameLayout(this, Language.StringByID(R.MyInternationalizationString.UserManagement)); |
| | |
| | | btnAddFrameLayout.MouseDownEventHandler += eHandler; |
| | | btnUndistributeText.MouseDownEventHandler += eHandler; |
| | | btnUndistributeIcon.MouseDownEventHandler += eHandler; |
| | | midVerticalScrolViewLayout = new VerticalScrolViewLayout() |
| | | midVerticalScrolViewLayout = new VerticalRefreshLayout() |
| | | { |
| | | }; |
| | | this.midFrameLayout.AddChidren(midVerticalScrolViewLayout); |
| | | ReadAccountList(); |
| | | midVerticalScrolViewLayout.BeginHeaderRefreshingAction += () => |
| | | { |
| | | midVerticalScrolViewLayout.BeginHeaderRefreshing(); |
| | | |
| | | midVerticalScrolViewLayout.EndHeaderRefreshing(); |
| | | }; |
| | | CommonPage.Loading.Start("Loading..."); |
| | | ReadAccountDoorLockInfoList(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 中部布局显示 |
| | | /// </summary> |
| | | async void MidFrameLayoutContent() |
| | | { |
| | | midVerticalScrolViewLayout.RemoveAll(); |