From 9f326f4000847e6167d8166fa2f6a66f53cb3734 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 17 十二月 2020 09:07:13 +0800
Subject: [PATCH] 新云端Ver1.3

---
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs |  138 ++++++++++++++++-----------------------------
 1 files changed, 50 insertions(+), 88 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs
index 0217b3a..34f7364 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs
@@ -8,7 +8,7 @@
 
 namespace Shared.Phone.UserCenter.DoorLock
 {
-    public class EntryStatusPage : DoorLockCommonLayout, ZigBee.Common.IStatus
+    public class EntryStatusPage : DoorLockCommonLayout
     {
         /// <summary>
         /// 鏋勯�犲嚱鏁�
@@ -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);
+                                 //}
 
                              }
                          }
@@ -343,39 +339,5 @@
                  }
              };
         }
-
-        #region 鎺ュ彛瀹炵幇
-        /// <summary>
-        /// 澶勭悊鍙樺寲浜嬩欢 --灏嗗純鐢� 鏀圭敤DeviceInfoChange()
-        /// </summary>
-        /// <returns>The changed.</returns>
-        /// <param name="common">Common.</param>
-        public void Changed(CommonDevice common)
-        {
-
-        }
-        /// <summary>
-        /// 澶勭悊鍙樺寲浜嬩欢
-        /// </summary>
-        /// <param name="common"></param>
-        /// <param name="typeTag"></param>
-        public void DeviceInfoChange(CommonDevice common, string typeTag)
-        {
-        }
-        /// <summary>
-        /// Changeds the IL ogic status.
-        /// </summary>
-        /// <param name="logic">Logic.</param>
-        public void ChangedILogicStatus(ZigBee.Device.Logic logic)
-        {
-        }
-        /// <summary>
-        /// Changeds the IS cene status.
-        /// </summary>
-        /// <param name="scene">Scene.</param>
-        public void ChangedISceneStatus(Scene scene)
-        {
-        }
-        #endregion
     }
 }

--
Gitblit v1.8.0