From 2be70a32d2a8c517bd9868fb60913fcc843e66fe Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期三, 13 五月 2020 11:21:32 +0800 Subject: [PATCH] 上传代码 --- ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceColorLightRowControl.cs | 26 ++++++++++++++++---------- 1 files changed, 16 insertions(+), 10 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceColorLightRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceColorLightRowControl.cs index a3ab47f..247ce4f 100755 --- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceColorLightRowControl.cs +++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceColorLightRowControl.cs @@ -1,4 +1,5 @@ -锘縰sing System; +锘縰sing Shared.Phone.UserCenter; +using System; using System.Collections.Generic; using System.Text; using ZigBee.Device; @@ -11,14 +12,6 @@ public class DeviceColorLightRowControl : DeviceRowCommon { #region 鈻� 鍒濆鍖朹____________________________ - - /// <summary> - /// 鍒嗙被鐣岄潰鐨勫僵鐏�(璋冨厜鍣�)璁惧琛屾帶浠� - /// </summary> - /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param> - public DeviceColorLightRowControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis) - { - } /// <summary> /// 鍒濆鍖栨帶浠� @@ -35,6 +28,14 @@ var btnSwitch = this.AddSwitchControl(); btnSwitch.ButtonClickEvent += (sender, e) => { + //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鐩存帴淇敼缂撳瓨 + if (Common.Config.Instance.Home.IsVirtually == true) + { + //鐩存帴鍙樻洿缂撳瓨 + ((LightBase)i_device).OnOffStatus = btnSwitch.IsSelected == true ? 0 : 1; + this.RefreshControlInfo(this.device); + return; + } bool setStatu = !btnSwitch.IsSelected; //鍙樻洿鍗$墖鐘舵�� this.SetRowOpenStatu(setStatu); @@ -98,10 +99,15 @@ /// </summary> public override void SendStatuComand() { + //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,姝ゅ姛鑳芥棤鏁� + if (Common.Config.Instance.Home.IsVirtually == true) + { + return; + } //妫�娴嬭兘鍚﹀彂閫佽幏鍙栫姸鎬佸懡浠� if (this.CheckCanSendStatuComand() == true) { - Device.DeviceLogic.ReadDeviceAttributeLogic.Instance.SendDimmableLightStatuComand(this.device); + HdlDeviceAttributeLogic.Current.SendDimmableLightStatuComand(this.device); } } -- Gitblit v1.8.0