| | |
| | | /// 构造函数 |
| | | /// </summary> |
| | | /// <param name="doorLock"></param> |
| | | public UndistributeDoorlockUserPage(ZigBee.Device.DoorLock doorLock, List<Shared.Phone.UserCenter.MemberInfoRes> localAccountList) |
| | | public UndistributeDoorlockUserPage(ZigBee.Device.DoorLock doorLock, List<MemberInfoRes> localAccountList) |
| | | { |
| | | this.doorLock = doorLock; |
| | | this.localAccountList = localAccountList; |
| | |
| | | /// <summary> |
| | | /// 本地账户列表 |
| | | /// </summary> |
| | | List<Shared.Phone.UserCenter.MemberInfoRes> localAccountList; |
| | | List<MemberInfoRes> localAccountList; |
| | | /// <summary> |
| | | /// 滑动布局View |
| | | /// </summary> |
| | |
| | | }); |
| | | } |
| | | |
| | | /// <summary>
|
| | | /// UI显示
|
| | | /// <summary> |
| | | /// UI显示 |
| | | /// </summary> |
| | | public void Show() |
| | | { |
| | |
| | | btnLine.Visible = false; |
| | | } |
| | | |
| | | if (!string.IsNullOrEmpty(currentAccount.UserName)) |
| | | { |
| | | btnUserName.Text = currentAccount.UserName; |
| | | } |
| | | else |
| | | { |
| | | btnUserName.Text = currentAccount.Account; |
| | | } |
| | | btnUserName.Text = currentAccount.ShowName; |
| | | |
| | | EventHandler<MouseEventArgs> eHandler = (sender, e) => |
| | | { |
| | | if (doorLock.IsFreezeAccount[currentAccount.SubAccountDistributedMark] == true) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = btnUserName.Text + Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | }); |
| | | return; |
| | | } |
| | | //☆マーク☆ |
| | | //if (doorLock.IsFreezeAccount[currentAccount.SubAccountDistributedMark] == true) |
| | | //{ |
| | | // Application.RunOnMainThread(() => |
| | | // { |
| | | // new Tip() { MaxWidth = 150, Text = btnUserName.Text + Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | // }); |
| | | // return; |
| | | //} |
| | | |
| | | if (!btnChoose.IsSelected) |
| | | { |
| | |
| | | oldbuttonChoose.IsSelected = true; |
| | | oldbuttonChoose.Visible = true; |
| | | oldUserName.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | curAccountId = currentAccount.SubAccountDistributedMark; |
| | | //☆マーク☆ |
| | | //curAccountId = currentAccount.SubAccountDistributedMark; |
| | | } |
| | | }; |
| | | btnChoose.MouseUpEventHandler += eHandler; |
| | |
| | | else |
| | | { |
| | | var addLockInfo = new ZigBee.Device.DoorLock.AddDoorLockData(); |
| | | if (UserCenterResourse.UserInfo.AuthorityNo != 1) |
| | | if (HdlUserCenterResourse.ResidenceOption.AuthorityNo != 1) |
| | | { |
| | | addLockInfo.LoginAccessToken = UserCenterLogic.GetConnectMainToken(); |
| | | //☆マーク☆ |
| | | //addLockInfo.LoginAccessToken = UserCenterLogic.GetConnectMainToken(); |
| | | addLockInfo.IsOtherAccountCtrl = true; |
| | | } |
| | | addLockInfo.CloudAccountId = curAccountId; |
| | |
| | | var result = await ZigBee.Device.DoorLock.SendDoorLockToServer("DoorLock/AddDoorLock", addLockInfo); |
| | | if (result != null) |
| | | { |
| | | if (result.StateCode == "Success") |
| | | if (result.Code == HttpMessageEnum.A成功) |
| | | { |
| | | //存门锁信息 |
| | | var resultList = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetCloudLocalDoorLocklist(doorLock, curAccountId); |