From 07466c19110693e3e439a7d7c8ad0bc21d9b3287 Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期三, 29 四月 2020 09:14:01 +0800 Subject: [PATCH] 优化代码,更改门锁需求接口 --- ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceCurtainRowControl.cs | 27 +++++++++++++++++++++++++-- 1 files changed, 25 insertions(+), 2 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceCurtainRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceCurtainRowControl.cs index 325d9ac..72e5900 100755 --- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceCurtainRowControl.cs +++ b/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) => { - ((Rollershade)i_device).CurtainUpDownStopControl(2); + //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,姝ゅ姛鑳芥棤鏁� + 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); }; @@ -134,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) { -- Gitblit v1.8.0