xm
2020-04-16 6fa9d69da922c8049f5acfcbb9ce9fd26811024c
ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceRelayCardControl.cs
@@ -29,7 +29,7 @@
            {
                bool setStatu = !btnSwitch.IsSelected;
                //变更卡片状态
                this.SetCardStatu(setStatu);
                this.SetCardOpenStatu(setStatu);
                //检测是否获取网关反馈的结果,如果网关没有回复,则会弹出消息
                this.StartCheckResponeResult(!setStatu);
@@ -62,12 +62,24 @@
            {
                Common.CommonPage.Instance.IsDrawerLockMode = true;
                var lightControl = new Phone.Device.Light.OnOffControl();
                UserView.HomePage.Instance.AddChidren(lightControl);
                UserView.HomePage.Instance.PageIndex += 1;
                lightControl.IsDrawerLockMode = true;
                lightControl.Show(i_device, UserCenter.HdlRoomLogic.Current.CurrentRoom);
                lightControl.action += this.CardDetailInfoBackEvent;
                int backHeight = 0;
                if (i_device.DfunctionType == DeviceFunctionType.A开关)
                {
                    backHeight = 1290;
                }
                else if (i_device.DfunctionType == DeviceFunctionType.A插座)
                {
                    backHeight = 1290;
                }
                else
                {
                    backHeight = 1316;
                }
                //继电器类型的深度卡片界面(含空气开关)
                var form = new ControlForm.DeviceRelayDetailCardForm();
                form.AddForm(i_device, UserCenter.HdlRoomLogic.Current.CurrentRoom, 965, backHeight);
                form.FormCloseEvent += this.CardDetailInfoBackEvent;
            };
        }
@@ -92,10 +104,13 @@
        /// <summary>
        /// 发送获取状态命令
        /// </summary>
        /// <param name="i_device"></param>
        public override void SendStatuComand(CommonDevice i_device)
        public override void SendStatuComand()
        {
            Device.DeviceLogic.ReadDeviceAttributeLogic.Instance.SendLightStatuComand(i_device);
            //检测能否发送获取状态命令
            if (this.CheckCanSendStatuComand() == true)
            {
                Device.DeviceLogic.ReadDeviceAttributeLogic.Instance.SendLightStatuComand(this.device);
            }
        }
        #endregion