From 2109463fab2eb1caed189e4f258e0e763c5cea7b Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期四, 07 十一月 2019 11:58:53 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev-tzy' into dev-wjc

---
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs |   41 +++++++++++++++++++++++++++++++----------
 1 files changed, 31 insertions(+), 10 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs
index 6812b14..a78b742 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonLayout.cs
@@ -96,6 +96,14 @@
         };
 
         /// <summary>
+        /// 鏍囬杩斿洖鎸夐敭
+        /// </summary>
+        public Button btnTip = new Button
+        {
+            Gravity = Gravity.Center,
+        };
+
+        /// <summary>
         /// 鏍囬涓嬬嚎
         /// </summary>
         public Button btnTitleLine = new Button
@@ -143,6 +151,7 @@
             titleFrameLayout.AddChidren(title);
             titleFrameLayout.AddChidren(btnBackFrameLayout);
             btnBackFrameLayout.AddChidren(btnBack);
+            this.midFrameLayout.AddChidren(this.btnTip);
         }
         /// <summary>
         /// 闂ㄩ攣涓儴甯冨眬
@@ -228,22 +237,22 @@
                 if (DateTime.Now < ZigBee.Device.DoorLock.minValue)
                 {
                     CommonPage.Loading.Hide();
-                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AfterThirtySeconds), Direction = AMPopTipDirection.Down, CloseTime = 2 }.Show(editInputPassword);
+                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AfterFiftySeconds), Direction = AMPopTipDirection.Down, CloseTime = 2 }.Show(editInputPassword);
                     return;
                 }
 
                 if (DateTime.Now >= oldTime && ZigBee.Device.DoorLock.RemoteUnlockCount == 0)
                 {
-                    ZigBee.Device.DoorLock.RemoteUnlockCount = 3;
+                    ZigBee.Device.DoorLock.RemoteUnlockCount = 5;
                     oldTime = DateTime.MaxValue;
                 }
 
                 if (ZigBee.Device.DoorLock.RemoteUnlockCount <= 0)
                 {
-                    ZigBee.Device.DoorLock.minValue = DateTime.Now.AddSeconds(+20);
+                    ZigBee.Device.DoorLock.minValue = DateTime.Now.AddSeconds(+15);
                     oldTime = ZigBee.Device.DoorLock.minValue;
                     CommonPage.Loading.Hide();
-                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AfterThirtySeconds), Direction = AMPopTipDirection.Down, CloseTime = 2 }.Show(editInputPassword);
+                    new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AfterFiftySeconds), Direction = AMPopTipDirection.Down, CloseTime = 2 }.Show(editInputPassword);
                     return;
                 }
 
@@ -262,7 +271,7 @@
                     System.Threading.Thread.Sleep(500);
                     ZigBee.Device.DoorLock.RemoteUnlockPassword = editInputPassword.Text;
                     ZigBee.Device.DoorLock.minValue = DateTime.MinValue;
-                    ZigBee.Device.DoorLock.RemoteUnlockCount = 3;
+                    ZigBee.Device.DoorLock.RemoteUnlockCount = 5;
                     oldTime = DateTime.MaxValue;
                     CommonPage.Loading.Hide();
                     dialog.Close();
@@ -353,11 +362,23 @@
                 };
                 doorDialog.dialogBtnConfirm.MouseUpEventHandler += (sender1, e1) =>
                 {
-                    var userDoorLockPage = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(doorLock);
-                    Shared.Phone.UserView.HomePage.Instance.AddChidren(userDoorLockPage);
-                    Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
-                    userDoorLockPage.Show();
-                    dialog.Close();
+                    if (UserCenterResourse.UserInfo.AuthorityNo == 3)
+                    {
+                        var userDoorLockPage = new Shared.Phone.UserCenter.DoorLock.FunctionSettingSub(doorLock);
+                        Shared.Phone.UserView.HomePage.Instance.AddChidren(userDoorLockPage);
+                        Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
+                        userDoorLockPage.Show();
+                        dialog.Close();
+                    }
+                    else
+                    {
+                        var userDoorLockPage = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(doorLock);
+                        Shared.Phone.UserView.HomePage.Instance.AddChidren(userDoorLockPage);
+                        Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
+                        userDoorLockPage.Show();
+                        dialog.Close();
+                    }
+
                 };
                 return;
             }

--
Gitblit v1.8.0