黄学彪
2020-12-17 9f326f4000847e6167d8166fa2f6a66f53cb3734
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs
@@ -16,7 +16,7 @@
        /// <param name="doorLock"></param>
        /// <param name="accountObj"></param>
        /// <param name="entryType"></param>
        public EntryStatusPage(ZigBee.Device.DoorLock doorLock, Shared.Phone.UserCenter.MemberInfoRes accountObj, string entryType)
        public EntryStatusPage(ZigBee.Device.DoorLock doorLock, MemberInfoRes accountObj, string entryType)
        {
            this.doorLock = doorLock;
            this.curAccountObj = accountObj;
@@ -32,7 +32,7 @@
        /// <summary>
        /// 当前账户
        /// </summary>
        Shared.Phone.UserCenter.MemberInfoRes curAccountObj;
        MemberInfoRes curAccountObj;
        /// <summary>
        /// 当前类型
        /// </summary>
@@ -43,8 +43,8 @@
        FrameLayout bottomFrameLayout;
        #endregion
        /// <summary>
        /// UI显示
        /// <summary>
        /// UI显示
        /// </summary>
        public void Show()
        {
@@ -233,14 +233,7 @@
                btnPasswordRemarkContent.PlaceholderText = Language.StringByID(R.MyInternationalizationString.IcCard) + "ID" + doorLock.doorLockProgrammingEventNotificationCommand.UserID;
            }
            if (!string.IsNullOrEmpty(curAccountObj.UserName))
            {
                btnMatchPersonContent.Text = curAccountObj.UserName;
            }
            else
            {
                btnMatchPersonContent.Text = curAccountObj.Account;
            }
            btnMatchPersonContent.Text = curAccountObj.ShowName;
            completeBtn.MouseDownEventHandler += async (sender, e) =>
             {
@@ -250,13 +243,15 @@
                     return;
                 }
                 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 = curAccountObj.SubAccountDistributedMark;
                 //☆マーク☆
                 //addLockInfo.CloudAccountId = curAccountObj.SubAccountDistributedMark;
                 if (doorLock.DeviceAddr != null)
                 {
                     addLockInfo.DoorLockId = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint;
@@ -278,49 +273,50 @@
                     var result = await ZigBee.Device.DoorLock.SendDoorLockToServer("DoorLock/AddDoorLock", addLockInfo);
                     if (result != null)
                     {
                         if (result.StateCode == "Success")
                         if (result.Code == HttpMessageEnum.A成功)
                         {
                             if (doorLock.localDoorLockUserList.ContainsKey(doorLock.doorLockProgrammingEventNotificationCommand.UserID))
                             {
                                 //☆マーク☆
                                 //存门锁信息
                                 var resultList = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetCloudLocalDoorLocklist(doorLock, curAccountObj.SubAccountDistributedMark);
                                 if (resultList != null)
                                 {
                                     if (resultList.ContainsKey(doorLock.doorLockProgrammingEventNotificationCommand.UserID) == true)
                                     {
                                         var a = resultList[doorLock.doorLockProgrammingEventNotificationCommand.UserID];
                                         if (a?.ConnectedAccount == curAccountObj.SubAccountDistributedMark)
                                         {
                                             completeBtn.Enable = true;
                                             this.RemoveFromParent();
                                             for (int i = UserView.HomePage.Instance.ChildrenCount - 1; i >= 0; i--)
                                             {
                                                 var form = UserView.HomePage.Instance.GetChildren(i);
                                 //var resultList = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetCloudLocalDoorLocklist(doorLock, curAccountObj.SubAccountDistributedMark);
                                 //if (resultList != null)
                                 //{
                                 //    if (resultList.ContainsKey(doorLock.doorLockProgrammingEventNotificationCommand.UserID) == true)
                                 //    {
                                 //        var a = resultList[doorLock.doorLockProgrammingEventNotificationCommand.UserID];
                                 //        if (a?.ConnectedAccount == curAccountObj.SubAccountDistributedMark)
                                 //        {
                                 //            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)
                                                 {
                                                     doorLock.currentUserDisplayMethod = "";
                                                     ((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);
                                 }
                                 //                if (form is UnLockMethod)
                                 //                {
                                 //                    doorLock.currentUserDisplayMethod = "";
                                 //                    ((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);
                                 //}
                             }
                         }