From 3793a9a38ac6c4c4111c2bba3a35a71c30601e82 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 13 四月 2020 19:38:24 +0800
Subject: [PATCH] 上传个东西

---
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs |   71 ++++++++++++++++++++---------------
 1 files changed, 40 insertions(+), 31 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
index 50ddc77..bf61365 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
@@ -207,8 +207,8 @@
             btnFuncSet = new Button
             {
                 X = Application.GetRealWidth(103),
-                Height = Application.GetRealHeight(69),
-                Width = Application.GetRealWidth(69),
+                Height = Application.GetMinReal(69),
+                Width = Application.GetMinReal(69),
                 UnSelectedImagePath = "DoorLock/SettingIcon.png",
             };
             btnFuncSetFrameLayout.AddChidren(btnFuncSet);
@@ -269,8 +269,8 @@
             midTopFrameLayout.AddChidren(btnRecordFrameLayout);
             btnRecord = new Button()
             {
-                Width = Application.GetRealWidth(69),
-                Height = Application.GetRealHeight(69),
+                Width = Application.GetMinReal(69),
+                Height = Application.GetMinReal(69),
                 X = Application.GetRealWidth(46),
                 Y = Application.GetRealHeight(46),
                 UnSelectedImagePath = "DoorLock/RecordIcon.png",
@@ -287,8 +287,8 @@
             midTopFrameLayout.AddChidren(btnCollectFrameLayout);
             btnCollect = new Button()
             {
-                Width = Application.GetRealWidth(69),
-                Height = Application.GetRealHeight(69),
+                Width = Application.GetMinReal(69),
+                Height = Application.GetMinReal(69),
                 X = Application.GetRealWidth(15),
                 Y = Application.GetRealHeight(46),
                 UnSelectedImagePath = "Item/Collection.png",
@@ -329,8 +329,8 @@
             //闂ㄩ攣寮�/鍏冲浘鐗�
             btnDoorLockPic = new Button()
             {
-                Width = Application.GetRealWidth(383),
-                Height = Application.GetRealHeight(343),
+                Width = Application.GetMinReal(383),
+                Height = Application.GetMinReal(343),
                 X = Application.GetRealWidth(161),
                 Y = Application.GetRealHeight(415),
                 UnSelectedImagePath = "DoorLock/DoorLockPicClose.png",
@@ -378,8 +378,8 @@
 
             progressButton = new Button()
             {
-                Width = Application.GetRealWidth(84),//639-35
-                Height = Application.GetRealHeight(93),
+                Width = Application.GetMinReal(84),//639-35
+                Height = Application.GetMinReal(93),
                 X = Application.GetRealWidth(58),
                 Y = Application.GetRealHeight(347),
                 UnSelectedImagePath = "DoorLock/UnLockButton.png",
@@ -388,8 +388,8 @@
 
             btnDoorOpenPic = new Button()
             {
-                Width = Application.GetRealWidth(81),
-                Height = Application.GetRealHeight(81),
+                Width = Application.GetMinReal(81),
+                Height = Application.GetMinReal(81),
                 X = Application.GetRealWidth(164),
                 Y = Application.GetRealHeight(6),
                 UnSelectedImagePath = "DoorLock/DoorLockOpen.png",
@@ -398,8 +398,8 @@
 
             btnDoorClosePic = new Button()
             {
-                Width = Application.GetRealWidth(81),
-                Height = Application.GetRealHeight(81),
+                Width = Application.GetMinReal(81),
+                Height = Application.GetMinReal(81),
                 X = Application.GetRealWidth(164),
                 Y = Application.GetRealHeight(117),
                 UnSelectedImagePath = "DoorLock/DoorLockClose.png",
@@ -410,8 +410,8 @@
             //鐢甸噺
             btnPower = new Button()
             {
-                Width = Application.GetRealWidth(81),
-                Height = Application.GetRealHeight(81),
+                Width = Application.GetMinReal(81),
+                Height = Application.GetMinReal(81),
                 X = Application.GetRealWidth(253),
                 Y = Application.GetRealHeight(994),
                 UnSelectedImagePath = "DoorLock/PowerOffline.png",
@@ -429,8 +429,8 @@
             midTopFrameLayout.AddChidren(btnVolumeFrameLayout);
             btnVolume = new Button()
             {
-                Width = Application.GetRealWidth(81),
-                Height = Application.GetRealHeight(81),
+                Width = Application.GetMinReal(81),
+                Height = Application.GetMinReal(81),
                 X = Application.GetRealWidth(40),
                 Y = Application.GetRealHeight(40),
                 UnSelectedImagePath = "DoorLock/VolumeIcon.png",
@@ -449,8 +449,8 @@
             midTopFrameLayout.AddChidren(btnNormallyOpenFrameLayout);
             btnNormallyOpen = new Button()
             {
-                Width = Application.GetRealWidth(81),
-                Height = Application.GetRealHeight(81),
+                Width = Application.GetMinReal(81),
+                Height = Application.GetMinReal(81),
                 X = Application.GetRealWidth(40),
                 Y = Application.GetRealHeight(40),
                 UnSelectedImagePath = "DoorLock/NormallyOpen.png",
@@ -482,8 +482,8 @@
             #region 褰撳墠鎴块棿
             var btnCurrentRoomPic = new Button()
             {
-                Width = Application.GetRealWidth(81),
-                Height = Application.GetRealHeight(81),
+                Width = Application.GetMinReal(81),
+                Height = Application.GetMinReal(81),
                 X = Application.GetRealWidth(58),
                 Y = Application.GetRealHeight(29),
                 UnSelectedImagePath = "DoorLock/RoomPic.png",
@@ -786,10 +786,13 @@
             //璁剧疆
             EventHandler<MouseEventArgs> btnFuncSetHander = (sender, e) =>
             {
-                var functionSetting = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(doorLock);
+                //鎵撳紑鍏朵粬鐣岄潰鏃跺墠绉婚櫎
+                RemoveFromParent();
+                var functionSetting = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(currentRoom, doorLock);
                 Shared.Phone.UserView.HomePage.Instance.AddChidren(functionSetting);
                 Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
                 functionSetting.Show();
+
                 functionSetting.devicNameAction += (deviceRename) =>
                 {
                     if (!string.IsNullOrEmpty(deviceRename))
@@ -910,7 +913,6 @@
             EventHandler<MouseEventArgs> handerNormallyOpen = (sender, e) =>
             {
                 NomallyOpenDialog();
-
             };
             btnNormallyOpenFrameLayout.MouseUpEventHandler += handerNormallyOpen;
             btnNormallyOpen.MouseUpEventHandler += handerNormallyOpen;
@@ -932,15 +934,15 @@
             {
                 btnPower.UnSelectedImagePath = "DoorLock/Power40.png";
             }
-            else if (currentPower <= 60 && currentPower > 40 || currentPower == 60)
+            else if (currentPower <= 60 && currentPower > 40)
             {
                 btnPower.UnSelectedImagePath = "DoorLock/Power60.png";
             }
-            else if (currentPower <= 80 && currentPower >= 60)
+            else if (currentPower <= 80 && currentPower > 60)
             {
                 btnPower.UnSelectedImagePath = "DoorLock/Power80.png";
             }
-            else if (currentPower <= 100 && currentPower >= 80)
+            else if (currentPower <= 100 && currentPower > 80)
             {
                 btnPower.UnSelectedImagePath = "DoorLock/Power100.png";
             }
@@ -1052,7 +1054,7 @@
             {
                 if (UserCenterResourse.UserInfo.AuthorityNo != 1)
                 {
-                    this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.NoAccess));
+                    this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.OnlyMasterOperate));
                     return;
                 }
 
@@ -1087,6 +1089,9 @@
                         }
                         else
                         {
+                            //娣诲姞App寮�鍚父寮�妯″紡鐨勫巻鍙茶褰�
+                            HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog(this.doorLock, 9001, string.Empty);
+
                             //姣忔閲嶆柊璁剧疆甯稿紑锛岄粯璁ゆ椂闂撮兘鏄�12灏忔椂
                             DoorLockCommonInfo.NormallyOpenModeInvalidTime = 12;
                             NormallyOpenModeValue(true);
@@ -1128,6 +1133,7 @@
         {
             if (UserCenterResourse.UserInfo.AuthorityNo != 1)
             {
+                this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.OnlyMasterOperate));
                 return;
             }
             string msg = Language.StringByID(R.MyInternationalizationString.NomallyModeIsCanceled).Replace("{0}", "\r\n");
@@ -1215,7 +1221,10 @@
                         return;
                     }
                     else
-                    {
+                    {
+                        //娣诲姞App寮�鍚父寮�妯″紡鐨勫巻鍙茶褰�
+                        HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog(this.doorLock, 9002, string.Empty);
+
                         NormallyOpenModeValue(false);
                         UpdateNomallyOpenStatus();
                         string msg2 = Language.StringByID(R.MyInternationalizationString.CloseNormallyOpenModeSuccess);
@@ -1305,7 +1314,7 @@
                     var result1 = await DoorLockCommonInfo.GetDoorLockUnlockAccess(doorLock, Shared.Common.Config.Instance.Guid);
                     if (result1 == true)
                     {
-                        RemoteUnlockRequest(doorLock, action, progressButton, btnDoorLockPic, btnStatus, btnDoorLockTitle);
+                        RemoteUnlockRequest(currentRoom, deviceUI, action, progressButton, btnDoorLockPic, btnStatus, btnDoorLockTitle);
                         devicNameSecAction += (deviceRename) =>
                         {
                             if (!string.IsNullOrEmpty(deviceRename))
@@ -1335,7 +1344,7 @@
             }
             else
             {
-                RemoteUnlockRequest(doorLock, action, progressButton, btnDoorLockPic, btnStatus, btnDoorLockTitle);
+                RemoteUnlockRequest(currentRoom, deviceUI, action, progressButton, btnDoorLockPic, btnStatus, btnDoorLockTitle);
                 devicNameSecAction += (deviceRename) =>
                 {
                     if (!string.IsNullOrEmpty(deviceRename))

--
Gitblit v1.8.0