| | |
| | | { |
| | | currentTitle = Language.StringByID(R.MyInternationalizationString.AddFingerprint); |
| | | } |
| | | else |
| | | else if (currentType == "proximity") |
| | | { |
| | | currentTitle = Language.StringByID(R.MyInternationalizationString.AddIcCard); |
| | | } |
| | |
| | | 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 = System.DateTime.Now; //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; |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | //Application.RunOnMainThread(() => |
| | | //{ |
| | | //new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.EntryCurrentUnlockMethod), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip); |
| | | //}); |
| | | } |
| | | } |
| | | } |
| | | }; |