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/DeviceRelayRowControl.cs | 22 ++++++++++++++-------- 1 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceRelayRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceRelayRowControl.cs index f8db2d5..34e1d60 100755 --- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceRelayRowControl.cs +++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceRelayRowControl.cs @@ -14,14 +14,6 @@ #region 鈻� 鍒濆鍖朹____________________________ /// <summary> - /// 鍒嗙被鐣岄潰鐨勭户鐢靛櫒璁惧琛屾帶浠� - /// </summary> - /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param> - public DeviceRelayRowControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis) - { - } - - /// <summary> /// 鍒濆鍖栨帶浠� /// </summary> /// <param name="i_device"></param> @@ -36,6 +28,15 @@ 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); @@ -113,6 +114,11 @@ /// </summary> public override void SendStatuComand() { + //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,姝ゅ姛鑳芥棤鏁� + if (Common.Config.Instance.Home.IsVirtually == true) + { + return; + } //妫�娴嬭兘鍚﹀彂閫佽幏鍙栫姸鎬佸懡浠� if (this.CheckCanSendStatuComand() == true) { -- Gitblit v1.8.0