From 82a773d1783549caca563831aac8affc059deedf Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 07 十一月 2019 10:56:13 +0800
Subject: [PATCH] 合并了全部的代码,IOS 图片需要从新引入工程

---
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/AddUnLockMethodTip.cs |   55 +++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 41 insertions(+), 14 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/AddUnLockMethodTip.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/AddUnLockMethodTip.cs
index 084d98a..910f6da 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/AddUnLockMethodTip.cs
+++ b/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);
             }
@@ -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,21 +214,48 @@
                     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);
+                            //});
+                        }
                     }
                 }
             };

--
Gitblit v1.8.0