HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2020-12-31 fe3b2466c68b5db70d38e78039703add3b8b1dfe
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
@@ -51,9 +51,9 @@
        /// </summary>
        DateTime waitGetDoorLockPower = DateTime.MaxValue;
        /// <summary>
        /// 逻辑中是否有常开模式
        /// 逻辑中是否有常开模式
        /// </summary>
        private bool haveLogicNormallyOpenMode = false;
        private bool haveLogicNormallyOpenMode = false;
        /// <summary>
        /// 当前电量
@@ -194,11 +194,11 @@
        bool IsClick = true;
        #endregion
        /// <summary>
        /// UI显示
        /// <summary>
        /// UI显示
        /// </summary>
        public void Show()
        {
        {
            this.TopFrameLayout(this, "");
            this.MidFrameLayout(this);
@@ -255,7 +255,7 @@
                Height = Application.GetRealHeight(1238),
                Width = Application.GetRealWidth(965),
                BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite,
                Radius = 6,
                Radius = (uint)Application.GetRealHeight(17),
            };
            this.midFrameLayout.AddChidren(midTopFrameLayout);
@@ -266,6 +266,10 @@
            btnDoorLockTitle.IsBold = true;
            btnDoorLockTitle.Text = Common.LocalDevice.Current.GetDeviceMacName(doorLock);
            btnDoorLockTitle.Width = btnDoorLockTitle.GetRealWidthByText();
            if (btnDoorLockTitle.Width > 664)
            {
                btnDoorLockTitle.Width = 664;
            }
            btnDoorLockTitle.TextAlignment = TextAlignment.Center;
            btnDoorLockTitle.Gravity = Gravity.CenterHorizontal;
            midTopFrameLayout.AddChidren(btnDoorLockTitle);
@@ -305,9 +309,9 @@
                UnSelectedImagePath = "Item/Collection.png",
                SelectedImagePath = "Item/CollectionSelected.png"
            };
            btnCollectFrameLayout.AddChidren(btnCollect);
            //当前状态
            btnCollectFrameLayout.AddChidren(btnCollect);
            //当前状态
            btnStatus = new Button()
            {
                Width = Application.GetRealWidth(132 + 351),
@@ -332,9 +336,9 @@
                TextSize = 10,
                TextAlignment = TextAlignment.CenterLeft,
            };
            midTopFrameLayout.AddChidren(btnCurrentPowerText);
#if Android
            btnCurrentPowerText.X = btnStatus.Right + Application.GetRealWidth(20);
            midTopFrameLayout.AddChidren(btnCurrentPowerText);
#if Android
            btnCurrentPowerText.X = btnStatus.Right + Application.GetRealWidth(20);
#endif
            //门锁开/关图片
@@ -380,7 +384,7 @@
            progressFrameLayoutMatch = new FrameLayout()
            {
                Width = Application.GetRealHeight(84),//639-35
                Height = Application.GetRealHeight(446),
                Height = Application.GetRealHeight(446 + 30),
                X = Application.GetMinReal(51),
                BackgroundColor = ZigbeeColor.Current.XMWhite,
            };
@@ -388,7 +392,9 @@
            var progressFrameLayout = new FrameLayout()
            {
                Width = Application.GetRealHeight(17),//639-35
                Width = Application.GetRealHeight(15),//639-35
                Height = Application.GetRealHeight(440),
                Radius = (uint)Application.GetRealHeight(17),
                Gravity = Gravity.CenterHorizontal,
                BackgroundColor = ZigbeeColor.Current.XMVerticalSeekBar,
            };
@@ -492,7 +498,7 @@
                Height = Application.GetRealHeight(138),
                Y = Application.GetRealHeight(1100),
                BackgroundColor = ZigbeeColor.Current.XMBlack,
                Radius = 6,
                Radius = (uint)Application.GetRealHeight(17),
            };
            midTopFrameLayout.AddChidren(btnCurrentFrameLayout);
            #endregion
@@ -611,12 +617,12 @@
                    if (tempDoor.doorLockOperatingEventNotificationCommand != null)
                    {
                        //非主人不弹这个窗口
                        if (UserCenterResourse.UserInfo.AuthorityNo != 1)
                        {
                            return;
                        if (UserCenterResourse.UserInfo.AuthorityNo != 1)
                        {
                            return;
                        }
                        if (doorLock.IsDoorLockNormallyMode)
                        {
                        if (doorLock.IsDoorLockNormallyMode)
                        {
                            if (canOpenNormallyMode)
                            {
                                Application.RunOnMainThread(() =>
@@ -733,7 +739,7 @@
                            var listDevice = new List<CommonDevice> { };
                            listDevice.Add(doorLock);
                            var devTemp = Common.LocalDevice.Current.GetMyDeviceEnumInfo(listDevice);
                            if (devTemp.ConcreteType == DeviceConcreteType.IntelligentLocks_Sone)
                            if (devTemp.ConcreteType != DeviceConcreteType.IntelligentLocks_H06C)
                            {
                                Application.RunOnMainThread(() =>
                                {
@@ -863,8 +869,8 @@
            {
                if (doorLock.IsDoorLockNormallyMode)
                {
                    if (canOpenNormallyMode)
                    {
                    if (canOpenNormallyMode)
                    {
                        Application.RunOnMainThread(() =>
                        {
                            Action<bool> action = (obj) =>
@@ -878,7 +884,7 @@
                    {
                        OpenDoorLockHandle(progressButton, btnDoorLockPic, btnStatus);
                    }
                }
                }
                else
                {
                    OpenDoorLockHandle(progressButton, btnDoorLockPic, btnStatus);
@@ -1069,27 +1075,27 @@
            action = () =>
            {
                //WJC的代码:系统密码支持操作门锁后,调用温居城的界面【常开自动化】
                if (doorLock == null)
                {
                if (doorLock == null)
                {
                    ///防止抛异常
                    return;
                }
                ///备注:WJC的
                Shared.Phone.Device.Logic.Send.CurrentDoorLock = doorLock;
                ///进来刷新一次设备列表;
                Common.Logic.LogicDviceList.Clear();
                if (Common.Logic.LogicDviceList.Count == 0)
                {
                    Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray());
                }
                var addLogicPage = new Shared.Phone.Device.Logic.SoneLogicList();
                UserView.HomePage.Instance.AddChidren(addLogicPage);
                UserView.HomePage.Instance.PageIndex += 1;
                addLogicPage.Show();
                addLogicPage.action += async (w) =>
                 {
                     DoorLockCommonInfo.NormallyOpenModeValue(doorLock, w);
                     UpdateNomallyOpenStatus();
                    return;
                }
                ///备注:WJC的
                Shared.Phone.Device.Logic.Send.CurrentDoorLock = doorLock;
                ///进来刷新一次设备列表;
                Common.Logic.LogicDviceList.Clear();
                if (Common.Logic.LogicDviceList.Count == 0)
                {
                    Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray());
                }
                var addLogicPage = new Shared.Phone.Device.Logic.SoneLogicList();
                UserView.HomePage.Instance.AddChidren(addLogicPage);
                UserView.HomePage.Instance.PageIndex += 1;
                addLogicPage.Show();
                addLogicPage.action += async (w) =>
                 {
                     DoorLockCommonInfo.NormallyOpenModeValue(doorLock, w);
                     UpdateNomallyOpenStatus();
                     //返回按键清空当前逻辑定义的LogicAction
                     UserCenter.DoorLock.DoorLockCommonInfo.LogicAction = null;
                     //是否存在常开模式
@@ -1108,9 +1114,9 @@
            };
            HdlCheckLogic.Current.CheckSecondarySecurity(action);
        }
        /// <summary>
        }
        /// <summary>
        /// 常开模式状态更新
        /// </summary>
        private void UpdateNomallyOpenStatus()
@@ -1192,8 +1198,8 @@
                {
                    if (!string.IsNullOrEmpty(deviceRename))
                    {
                        btnDoorLockTitle.Text = deviceRename;
                        //改房间
                        btnDoorLockTitle.Text = deviceRename;
                        //改房间
                        HdlRoomLogic.Current.ChangedRoom(deviceUI, currentRoom.Id);
                        deviceUI.ReSave();
                    }