From e90209beae6a4e822cecb18e6889f8bda23f630e Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 14 十二月 2020 11:16:06 +0800
Subject: [PATCH] 合并了晾衣架(非新云端)

---
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs |  126 +++++++++++++++++++++++++----------------
 1 files changed, 77 insertions(+), 49 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs
index 34f7364..97eb5c7 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs
+++ b/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, MemberInfoRes accountObj, string entryType)
+        public EntryStatusPage(ZigBee.Device.DoorLock doorLock, Shared.Phone.UserCenter.MemberInfoRes accountObj, string entryType)
         {
             this.doorLock = doorLock;
             this.curAccountObj = accountObj;
@@ -32,7 +32,7 @@
         /// <summary>
         /// 褰撳墠璐︽埛
         /// </summary>
-        MemberInfoRes curAccountObj;
+        Shared.Phone.UserCenter.MemberInfoRes curAccountObj;
         /// <summary>
         /// 褰撳墠绫诲瀷
         /// </summary>
@@ -69,8 +69,8 @@
             {
                 X = Application.GetRealWidth(297),
                 Y = Application.GetRealHeight(268),
-                Height = Application.GetRealHeight(363),
-                Width = Application.GetRealWidth(452),
+                Height = Application.GetMinRealAverage(363),
+                Width = Application.GetMinRealAverage(452),
                 UnSelectedImagePath = "DoorLock/EntrySuccessIcon.png",
             };
             this.midFrameLayout.AddChidren(entryStatusPic);
@@ -94,6 +94,14 @@
             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
             {
@@ -227,13 +235,36 @@
                 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;
             }
 
-            btnMatchPersonContent.Text = curAccountObj.ShowName;
+            if (!string.IsNullOrEmpty(curAccountObj.UserName))
+            {
+                btnMatchPersonContent.Text = curAccountObj.UserName;
+            }
+            else
+            {
+                btnMatchPersonContent.Text = curAccountObj.Account;
+            }
 
             completeBtn.MouseDownEventHandler += async (sender, e) =>
              {
@@ -243,15 +274,13 @@
                      return;
                  }
                  var addLockInfo = new ZigBee.Device.DoorLock.AddDoorLockData();
-                 if (HdlUserCenterResourse.ResidenceOption.AuthorityNo != 1)
+                 if (UserCenterResourse.UserInfo.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;
@@ -273,50 +302,49 @@
                      var result = await ZigBee.Device.DoorLock.SendDoorLockToServer("DoorLock/AddDoorLock", addLockInfo);
                      if (result != null)
                      {
-                         if (result.Code == HttpMessageEnum.A鎴愬姛)
+                         if (result.StateCode == "Success")
                          {
                              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);
+                                 }
 
                              }
                          }

--
Gitblit v1.8.0