陈嘉乐
2020-04-27 18b93d511dc764b469d7c4a7e755f7274f89cdb4
ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceCurtainRowControl.cs
@@ -61,6 +61,13 @@
            btnOpen.X = Application.GetRealWidth(625) - btnOpen.XOffset;
            btnOpen.ButtonClickEvent += (sender, e) =>
            {
                //如果住宅为虚拟住宅,直接修改缓存
                if (Common.Config.Instance.Home.IsVirtually == true)
                {
                    ((Rollershade)i_device).WcdCurrentPositionLiftPercentage = 100;
                    base.RefreshControlInfo(i_device);
                    return;
                }
                ((Rollershade)i_device).CurtainUpDownStopControl(0);
            };
@@ -74,7 +81,11 @@
            btnStop.X = Application.GetRealWidth(769) - btnOpen.XOffset;
            btnStop.ButtonClickEvent += (sender, e) =>
            {
                //如果住宅为虚拟住宅,此功能无效
                if (Common.Config.Instance.Home.IsVirtually == false)
                {
                ((Rollershade)i_device).CurtainUpDownStopControl(2);
                }
            };
            //关闭
@@ -85,6 +96,13 @@
            btnClose.X = Application.GetRealWidth(896) - btnOpen.XOffset;
            btnClose.ButtonClickEvent += (sender, e) =>
            {
                //如果住宅为虚拟住宅,直接修改缓存
                if (Common.Config.Instance.Home.IsVirtually == true)
                {
                    ((Rollershade)i_device).WcdCurrentPositionLiftPercentage = 0;
                    base.RefreshControlInfo(i_device);
                    return;
                }
                ((Rollershade)i_device).CurtainUpDownStopControl(1);
            };
@@ -104,12 +122,10 @@
            //深度卡片信息
            this.frameTable.ButtonClickEvent += (sender, e) =>
            {
                var rollerShadeControl = new Phone.Device.Curtain.RollerShadeControl();
                UserView.HomePage.Instance.AddChidren(rollerShadeControl);
                UserView.HomePage.Instance.PageIndex += 1;
                UserView.HomePage.Instance.ScrollEnabled = false;
                rollerShadeControl.Show(i_device, UserCenter.HdlRoomLogic.Current.CurrentRoom);
                rollerShadeControl.action += this.CardDetailInfoBackEvent;
                //窗帘类型的深度卡片界面
                var form = new MainPage.ControlForm.DeviceCurtainDetailCardForm();
                form.AddForm(i_device, HdlRoomLogic.Current.CurrentRoom, 965, 1316);
                form.FormCloseEvent += this.CardDetailInfoBackEvent;
            };
        }
@@ -124,7 +140,7 @@
        /// <returns></returns>
        public override bool CheckIsOpenStatu(CommonDevice i_device)
        {
            return ((Rollershade)i_device).WcdCurrentPositionLiftPercentage > 10;
            return ((Rollershade)i_device).WcdCurrentPositionLiftPercentage > 0;
        }
        #endregion
@@ -136,10 +152,15 @@
        /// </summary>
        public override void SendStatuComand()
        {
            //如果住宅为虚拟住宅,此功能无效
            if (Common.Config.Instance.Home.IsVirtually == true)
            {
                return;
            }
            //检测能否发送获取状态命令
            if (this.CheckCanSendStatuComand() == true)
            {
                Device.DeviceLogic.ReadDeviceAttributeLogic.Instance.SendCurtainStatuComand(this.device);
                HdlDeviceAttributeLogic.Current.SendCurtainStatuComand(this.device);
            }
            if (((Rollershade)this.device).WcdType == -1)
            {
@@ -183,6 +204,7 @@
                //无需变更
                return;
            }
            this.WcdType = wcdType;
            if (this.WcdType == 0)
            {
                btnOpen.UnSelectedImagePath = "RollerShade/Up.png";