| | |
| | | completeBtn.MouseDownEventHandler += async (sender, e) => |
| | | { |
| | | completeBtn.Enable = false; |
| | | if (doorLock.doorLockProgrammingEventNotificationCommand == null) |
| | | { |
| | | return; |
| | | } |
| | | var addLockInfo = new ZigBee.Device.DoorLock.AddDoorLockData(); |
| | | if (UserCenterResourse.UserInfo.AuthorityNo != 1) |
| | | { |
| | |
| | | { |
| | | if (doorLock.localDoorLockUserList.ContainsKey(doorLock.doorLockProgrammingEventNotificationCommand.UserID)) |
| | | { |
| | | //存账户信息 |
| | | // var resultList1 = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetCloudLocalAccountlist(doorLock, curAccountObj.SubAccountDistributedMark); |
| | | //存门锁信息 |
| | | var resultList = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetCloudLocalDoorLocklist(doorLock, curAccountObj.SubAccountDistributedMark); |
| | | if (resultList.ContainsKey(doorLock.doorLockProgrammingEventNotificationCommand.UserID) == true) |
| | | if (resultList != null) |
| | | { |
| | | var a = resultList[doorLock.doorLockProgrammingEventNotificationCommand.UserID]; |
| | | if (a?.ConnectedAccount == curAccountObj.SubAccountDistributedMark) |
| | | if (resultList.ContainsKey(doorLock.doorLockProgrammingEventNotificationCommand.UserID) == true) |
| | | { |
| | | completeBtn.Enable = true; |
| | | this.RemoveFromParent(); |
| | | for (int i = UserView.HomePage.Instance.ChildrenCount - 1; i >= 0; i--) |
| | | var a = resultList[doorLock.doorLockProgrammingEventNotificationCommand.UserID]; |
| | | if (a?.ConnectedAccount == curAccountObj.SubAccountDistributedMark) |
| | | { |
| | | var form = UserView.HomePage.Instance.GetChildren(i); |
| | | completeBtn.Enable = true; |
| | | this.RemoveFromParent(); |
| | | for (int i = UserView.HomePage.Instance.ChildrenCount - 1; i >= 0; i--) |
| | | { |
| | | var form = UserView.HomePage.Instance.GetChildren(i); |
| | | |
| | | if (form is UnLockMethod) |
| | | { |
| | | ((UnLockMethod)form).RefreshList(); |
| | | break; |
| | | } |
| | | else |
| | | { |
| | | form.RemoveFromParent(); |
| | | if (form is UnLockMethod) |
| | | { |
| | | ((UnLockMethod)form).RefreshList(); |
| | | break; |
| | | } |
| | | else |
| | | { |
| | | form.RemoveFromParent(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | completeBtn.Enable = true; |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnPasswordRemarkContent); |
| | | else |
| | | { |
| | | completeBtn.Enable = true; |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnPasswordRemarkContent); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | completeBtn.Enable = true; |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnPasswordRemarkContent); |
| | | } |
| | | |
| | | } |
| | | } |
| | | else |
| | | { |
| | | completeBtn.Enable = true; |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.ModigfyFailed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnPasswordRemarkContent); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AddFailed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnPasswordRemarkContent); |
| | | } |
| | | } |
| | | else |