xm
2020-05-07 c1de48884fa145a16a0f8bcee93274dcfaa0ff82
ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceColorLightRowControl.cs
@@ -14,14 +14,6 @@
        #region ■ 初始化_____________________________
        /// <summary>
        /// 分类界面的彩灯(调光器)设备行控件
        /// </summary>
        /// <param name="i_ChidrenYaxis">子控件Y轴偏移量(真实值,有些界面需要这种特殊操作)</param>
        public DeviceColorLightRowControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
        {
        }
        /// <summary>
        /// 初始化控件
        /// </summary>
        /// <param name="i_device"></param>
@@ -36,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);
@@ -99,6 +99,11 @@
        /// </summary>
        public override void SendStatuComand()
        {
            //如果住宅为虚拟住宅,此功能无效
            if (Common.Config.Instance.Home.IsVirtually == true)
            {
                return;
            }
            //检测能否发送获取状态命令
            if (this.CheckCanSendStatuComand() == true)
            {