| | |
| | | { |
| | | currentTitle = Language.StringByID(R.MyInternationalizationString.AddFingerprint); |
| | | } |
| | | else |
| | | else if (currentType == "proximity") |
| | | { |
| | | currentTitle = Language.StringByID(R.MyInternationalizationString.AddIcCard); |
| | | } |
| | |
| | | |
| | | EventHandler<MouseEventArgs> eHandlerBack = (sender, e) => |
| | | { |
| | | if (doorLock.Gateway != null || doorLock.Gateway.GwResDataAction != null) |
| | | { |
| | | doorLock.Gateway.GwResDataAction -= action; |
| | | } |
| | | |
| | | this.RemoveFromParent(); |
| | | }; |
| | | this.btnBack.MouseUpEventHandler += eHandlerBack; |
| | |
| | | this.MidFrameLayout(this); |
| | | |
| | | MidFrameLayoutContent(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 重写移除方法 |
| | | /// </summary> |
| | | public override void RemoveFromParent() |
| | | { |
| | | ZbGateway.StatusList.Remove(this); |
| | | if (doorLock.Gateway != null || doorLock.Gateway.GwResDataAction != null) |
| | | { |
| | | doorLock.Gateway.GwResDataAction -= action; |
| | | } |
| | | base.RemoveFromParent(); |
| | | } |
| | | |
| | | public void MidFrameLayoutContent() |
| | |
| | | { |
| | | X = Application.GetRealWidth(446), |
| | | Y = Application.GetRealHeight(330), |
| | | Height = Application.GetRealHeight(81 / 2), |
| | | Height = Application.GetRealHeight(76 / 2), |
| | | Width = Application.GetRealWidth(407), |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMBlack, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMGray2, |
| | | TextSize = 10, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | |
| | | { |
| | | X = Application.GetRealWidth(446), |
| | | Y = btnPicTip1.Bottom, |
| | | Height = Application.GetRealHeight(81 / 2), |
| | | Height = Application.GetRealHeight(76 / 2), |
| | | Width = Application.GetRealWidth(207), |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMBlack, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMGray2, |
| | | TextSize = 10, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | |
| | | { |
| | | X = Application.GetRealWidth(294), |
| | | Y = Application.GetRealHeight(1089), |
| | | Height = Application.GetRealHeight(173 / 2), |
| | | Height = Application.GetRealHeight(100 / 2), |
| | | Width = Application.GetRealWidth(488), |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMBlack, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMGray2, |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextSize = 14, |
| | | }; |
| | |
| | | var btnPicTip4 = new Button |
| | | { |
| | | X = Application.GetRealWidth(397), |
| | | Y = btnPicTip3.Bottom, |
| | | Y = btnPicTip3.Y + Application.GetRealHeight(50), |
| | | Width = Application.GetRealWidth(288), |
| | | Height = Application.GetRealHeight(173 / 2), |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMBlack, |
| | | Height = Application.GetRealHeight(100 / 2), |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMGray2, |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextSize = 14, |
| | | }; |
| | |
| | | X = Application.GetRealWidth(202), |
| | | Y = Application.GetRealHeight(1388), |
| | | Height = Application.GetRealHeight(49), |
| | | Width = Application.GetRealWidth(674), |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMBlack, |
| | | Width = Application.GetRealWidth(685), |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextSize = 12, |
| | | }; |
| | |
| | | Y = Application.GetRealHeight(1472), |
| | | Height = Application.GetRealHeight(127), |
| | | Width = Application.GetRealWidth(907), |
| | | Text = Language.StringByID(R.MyInternationalizationString.NextStep), |
| | | Text = Language.StringByID(R.MyInternationalizationString.NextStepXm), |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMWhite, |
| | | Gravity = Gravity.CenterHorizontal, |
| | | Radius = 10, |
| | | TextSize = 20, |
| | | Radius = (uint)Application.GetRealHeight(127 / 2), |
| | | TextSize = 16, |
| | | IsBold =true, |
| | | Enable = false, |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect, |
| | | }; |
| | |
| | | btnPicTip1.X = Application.GetRealWidth(450); |
| | | btnPicTip5.Text = Language.StringByID(R.MyInternationalizationString.EntryTip); |
| | | } |
| | | else |
| | | else if (currentType == "proximity") |
| | | { |
| | | topMidFrameLayout.BackgroundImagePath = "DoorLock/AddIcCardTipPic.png"; |
| | | btnPicTip3.Width = Application.GetRealWidth(495); |
| | |
| | | var ProgrammingEventNotificationData = Newtonsoft.Json.JsonConvert.DeserializeObject<ZigBee.Device.DoorLock.DoorLockProgrammingEventNotificationCommand>(jObjectdata["Data"].ToString()); |
| | | if (ProgrammingEventNotificationData != null) |
| | | { |
| | | doorLock.doorLockProgrammingEventNotificationCommand = ProgrammingEventNotificationData; |
| | | var localDoorLockObj = new ZigBee.Device.DoorLock.LocaDoorLockObj() { }; |
| | | localDoorLockObj.UserID = ProgrammingEventNotificationData.UserID; |
| | | localDoorLockObj.UnlockType = ProgrammingEventNotificationData.ProgramEventSoure; |
| | | var entryTime = Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetLocalTime(ProgrammingEventNotificationData.ZigbeeLocalTime); |
| | | localDoorLockObj.EntryTime = entryTime; |
| | | if (!doorLock.localDoorLockUserList.ContainsKey(localDoorLockObj.UserID)) |
| | | int curMethod = -1; |
| | | if (currentType == "password") |
| | | { |
| | | doorLock.localDoorLockUserList.Add(ProgrammingEventNotificationData.UserID, localDoorLockObj); |
| | | curMethod = 0; |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | else if (currentType == "fingerprint") |
| | | { |
| | | nextBtn.Enable = true; |
| | | nextBtn.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | }); |
| | | curMethod = 15; |
| | | } |
| | | else if (currentType == "proximity") |
| | | { |
| | | curMethod = 3; |
| | | } |
| | | else |
| | | { |
| | | return; |
| | | } |
| | | if (ProgrammingEventNotificationData.ProgramEventSoure == curMethod) |
| | | { |
| | | doorLock.doorLockProgrammingEventNotificationCommand = ProgrammingEventNotificationData; |
| | | var localDoorLockObj = new ZigBee.Device.DoorLock.LocaDoorLockObj() { }; |
| | | localDoorLockObj.UserID = ProgrammingEventNotificationData.UserID; |
| | | localDoorLockObj.UnlockType = ProgrammingEventNotificationData.ProgramEventSoure; |
| | | localDoorLockObj.EntryTime = System.DateTime.Now; |
| | | //先暂时加入,等云端添加和获取真正成功后才真的加入 |
| | | if (!doorLock.localDoorLockUserList.ContainsKey(localDoorLockObj.UserID)) |
| | | { |
| | | doorLock.localDoorLockUserList.Add(ProgrammingEventNotificationData.UserID, localDoorLockObj); |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | nextBtn.Enable = true; |
| | | nextBtn.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | |
| | | |
| | | nextBtn.MouseDownEventHandler += (sende, e) => |
| | | { |
| | | this.RemoveFromParent(); |
| | | var entryStatusPage = new Shared.Phone.UserCenter.DoorLock.EntryStatusPage(doorLock, curAccountObj, currentType); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(entryStatusPage); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | entryStatusPage.Show(); |
| | | this.RemoveFromParent(); |
| | | }; |
| | | } |
| | | |