From 0d9f64668fd7350d6a21fd157e32009a96d98134 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期三, 16 十二月 2020 13:09:08 +0800 Subject: [PATCH] 新云端代码Ver1.2 --- ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs | 126 ++++++++++++++++------------------------- 1 files changed, 49 insertions(+), 77 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/EntryStatusPage.cs index 97eb5c7..34f7364 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, 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); + //} } } -- Gitblit v1.8.0