gxc
2019-11-07 a4924de3136289d10cabbf2f61a228387d44ded7
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/AddUnLockMethodTip.cs
@@ -40,7 +40,7 @@
            {
                currentTitle = Language.StringByID(R.MyInternationalizationString.AddFingerprint);
            }
            else
            else if (currentType == "proximity")
            {
                currentTitle = Language.StringByID(R.MyInternationalizationString.AddIcCard);
            }
@@ -126,7 +126,7 @@
                X = Application.GetRealWidth(202),
                Y = Application.GetRealHeight(1388),
                Height = Application.GetRealHeight(49),
                Width = Application.GetRealWidth(674),
                Width = Application.GetRealWidth(685),
                TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
                Gravity = Gravity.CenterHorizontal,
                TextSize = 12,
@@ -139,7 +139,7 @@
                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,
@@ -178,7 +178,7 @@
                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);
@@ -214,12 +214,31 @@
                    var ProgrammingEventNotificationData = Newtonsoft.Json.JsonConvert.DeserializeObject<ZigBee.Device.DoorLock.DoorLockProgrammingEventNotificationCommand>(jObjectdata["Data"].ToString());
                    if (ProgrammingEventNotificationData != null)
                    {
                        int curMethod = -1;
                        if (currentType == "password")
                        {
                            curMethod = 0;
                        }
                        else if (currentType == "fingerprint")
                        {
                            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;
                        var entryTime = ZigBee.Device.DoorLock.GetLocalTime(ProgrammingEventNotificationData.ZigbeeLocalTime, false);
                        localDoorLockObj.EntryTime = entryTime;
                            localDoorLockObj.EntryTime = System.DateTime.Now;
                            //先暂时加入,等云端添加和获取真正成功后才真的加入
                        if (!doorLock.localDoorLockUserList.ContainsKey(localDoorLockObj.UserID))
                        {
                            doorLock.localDoorLockUserList.Add(ProgrammingEventNotificationData.UserID, localDoorLockObj);
@@ -229,6 +248,14 @@
                            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);
                            //});
                        }
                    }
                }
            };
@@ -240,11 +267,11 @@
            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();
            };
        }