| | |
| | | /// </summary>
|
| | | private MostRightIconControl btnAnionSwitch = null;
|
| | | /// <summary>
|
| | | /// 滤芯复位开关控件
|
| | | /// 滤芯复位开关控件 2021.03.09控件变更
|
| | | /// </summary>
|
| | | private MostRightIconControl btnResetSwitch = null;
|
| | | //private MostRightIconControl btnResetSwitch = null;
|
| | | /// <summary>
|
| | | /// 空气质量数据
|
| | | /// </summary>
|
| | |
| | | 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)
|
| | | {
|
| | |
| | | this.ShowMassage(ShowMsgType.Confirm, msg, () =>
|
| | | {
|
| | | //发送使能命令
|
| | | this.SendEnableComand(btnResetSwitch, "filter_reset", btnResetSwitch.IsSelected == true ? "false" : "true");
|
| | | this.SendEnableComand(null, "filter_reset", "true");
|
| | | });
|
| | | };
|
| | | }
|
| | |
| | | /// </summary>
|
| | | private void SendEnableComand(MostRightIconControl btnSwitch, string sendKey, string value)
|
| | | {
|
| | | btnSwitch.CanClick = false;
|
| | | 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;
|
| | |
| | | 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
|