黄学彪
2020-04-13 3793a9a38ac6c4c4111c2bba3a35a71c30601e82
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))