黄学彪
2020-12-16 0d9f64668fd7350d6a21fd157e32009a96d98134
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>
@@ -69,8 +69,8 @@
            {
                X = Application.GetRealWidth(297),
                Y = Application.GetRealHeight(268),
                Height = Application.GetMinRealAverage(363),
                Width = Application.GetMinRealAverage(452),
                Height = Application.GetRealHeight(363),
                Width = Application.GetRealWidth(452),
                UnSelectedImagePath = "DoorLock/EntrySuccessIcon.png",
            };
            this.midFrameLayout.AddChidren(entryStatusPic);
@@ -94,14 +94,6 @@
            else if (currentType == "fingerprint")
            {
                btnPicTip.Text = Language.StringByID(R.MyInternationalizationString.EntryFingerprintSuccess);
            }
            else if (currentType == "faceID")
            {
                btnPicTip.Text = Language.StringByID(R.MyInternationalizationString.EntryFaceIDSuccess);
            }
            else if (currentType == "calmFingerprint")
            {
                btnPicTip.Text = Language.StringByID(R.MyInternationalizationString.EntryCalmFingerprintSuccess);
            }
            else
            {
@@ -235,36 +227,13 @@
                btnPasswordRemark.Text = Language.StringByID(R.MyInternationalizationString.FingerprintRemark);
                btnPasswordRemarkContent.PlaceholderText = Language.StringByID(R.MyInternationalizationString.Fingerprint) + "ID" + doorLock.doorLockProgrammingEventNotificationCommand.UserID;
            }
            else if (currentType == "faceID")
            {
                btnPasswordRemark.Width = Application.GetRealWidth(222 + 75);
                btnPasswordRemarkContent.Width = Application.GetRealWidth(965 - 222 - 75);
                btnPasswordRemarkContent.X = Application.GetRealWidth(222 + 75 + 1);
                btnPasswordRemark.Text = Language.StringByID(R.MyInternationalizationString.FaceIDRemark);
                btnPasswordRemarkContent.PlaceholderText = Language.StringByID(R.MyInternationalizationString.FaceIDMark) + "ID" + doorLock.doorLockProgrammingEventNotificationCommand.UserID;
            }
            else if (currentType == "calmFingerprint")
            {
                btnPasswordRemark.Width = Application.GetRealWidth(222 + 25);
                btnPasswordRemarkContent.Width = Application.GetRealWidth(965 - 222 - 25);
                btnPasswordRemarkContent.X = Application.GetRealWidth(222 + 25 + 1);
                btnPasswordRemark.Text = Language.StringByID(R.MyInternationalizationString.CalmFingerprintRemark);
                btnPasswordRemarkContent.PlaceholderText = Language.StringByID(R.MyInternationalizationString.CalmFingerprintMark) + "ID" + doorLock.doorLockProgrammingEventNotificationCommand.UserID;
            }
            else
            {
                btnPasswordRemark.Text = Language.StringByID(R.MyInternationalizationString.ProximityRemark);
                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) =>
             {
@@ -274,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;
@@ -302,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);
                                 //}
                             }
                         }