wei
2021-03-09 555a2bd930cd86e220ab7146ae4655a6cafe9ca3
Merge remote-tracking branch 'origin/dev-tzy' into temp-wxr
1个文件已修改
25 ■■■■■ 已修改文件
HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs
@@ -73,9 +73,9 @@
        /// </summary>
        private MostRightIconControl btnAnionSwitch = null;
        /// <summary>
        /// 滤芯复位开关控件
        /// 滤芯复位开关控件 2021.03.09控件变更
        /// </summary>
        private MostRightIconControl btnResetSwitch = null;
        //private MostRightIconControl btnResetSwitch = null;
        /// <summary>
        /// 空气质量数据
        /// </summary>
@@ -331,9 +331,8 @@
            FrameWhiteCentet2.AddChidren(rowReset);
            rowReset.AddLeftCaption(Language.StringByID(StringId.FilterElementReset), 200);
            rowReset.AddBottomLine();
            this.btnResetSwitch = rowReset.AddMostRightSwitchIcon();
            btnResetSwitch.IsSelected = this.airCleanerData.FilterReset;
            btnResetSwitch.ButtonClickEvent += (sender, e) =>
            rowReset.AddRightArrow();
            rowReset.ButtonClickEvent += (sender, e) =>
            {
                if (this.btnSwitch.IsSelected == false)
                {
@@ -345,7 +344,7 @@
                this.ShowMassage(ShowMsgType.Confirm, msg, () =>
                {
                    //发送使能命令
                    this.SendEnableComand(btnResetSwitch, "filter_reset", btnResetSwitch.IsSelected == true ? "false" : "true");
                    this.SendEnableComand(null, "filter_reset", "true");
                });
            };
        }
@@ -624,12 +623,18 @@
        /// </summary>
        private void SendEnableComand(MostRightIconControl btnSwitch, string sendKey, string value)
        {
            if (btnSwitch != null)
            {
            btnSwitch.CanClick = false;
            }
            HdlThreadLogic.Current.RunThread(() =>
            {
                var dic = new Dictionary<string, string>();
                dic.Add(sendKey, value);
                Control.Ins.SendWriteCommand(this.device, dic, true);
                if (btnSwitch == null) { return; }
                HdlThreadLogic.Current.RunMain(() =>
                {
                    btnSwitch.CanClick = true;
@@ -769,10 +774,10 @@
                this.btnAnionSwitch.IsSelected = this.airCleanerData.Anion;
            }
            //滤芯复位
            if (this.btnResetSwitch.IsSelected != this.airCleanerData.FilterReset)
            {
                this.btnResetSwitch.IsSelected = this.airCleanerData.FilterReset;
            }
            //if (this.btnResetSwitch.IsSelected != this.airCleanerData.FilterReset)
            //{
            //    this.btnResetSwitch.IsSelected = this.airCleanerData.FilterReset;
            //}
        }
        #endregion