From 57c036644fae5019385829edbd72be9a7e00fa7d Mon Sep 17 00:00:00 2001 From: Tong <1025782220@qq.com> Date: 星期二, 31 八月 2021 10:18:03 +0800 Subject: [PATCH] Merge branch 'newBranch1' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into jpush_tst --- HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs | 68 +--------------------------------- 1 files changed, 2 insertions(+), 66 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs index e6f08bd..1a7fb2e 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AirFreshRelayControlPage.cs @@ -67,20 +67,6 @@ btnFan.MouseUpEventHandler += (sender, e) => { ShowFanSelectView(); - //return; - //if ( !btnSwitch.IsSelected){return;} - //var curFanSpeedIndex = fanSpeedList.IndexOf(device.GetAttrState(FunctionAttributeKey.FanSpeed)); - //var sendFanSpeedIndex = curFanSpeedIndex == fanSpeedList.Count - 1 ? 0 : 1+curFanSpeedIndex; - - //device.SetAttrState(FunctionAttributeKey.FanSpeed, fanSpeedList[sendFanSpeedIndex]); - //new System.Threading.Thread(() => - //{ - // Dictionary<string, string> d = new Dictionary<string, string>(); - // d.Add(FunctionAttributeKey.FanSpeed, fanSpeedList[sendFanSpeedIndex]); - // Control.Ins.SendWriteCommand(device, d); - //}) - //{ IsBackground = true }.Start(); - //RefreshFanSpeed(); }; //椋庨�熸枃鏈� this.btnFanView = new NormalViewControl(this.FrameWhiteCentet1.Width / 3, Application.GetRealHeight(18), false); @@ -208,41 +194,6 @@ }); } - //if (fanAttr.value.Contains("low")) - //{ - // //1妗� - // var iconPath = this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "low" ? "FunctionIcon/AirFresh/Fan1Select.png" : "FunctionIcon/AirFresh/Fan1.png"; - // menuContr.AddRowMenu(Language.StringByID(StringId.FanOneGear), iconPath, this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "low", () => - // { - // frameBack.Close(); - // //鍙戦�佹。浣嶅懡浠� - // this.SendOtherComand(this.btnFan, FunctionAttributeKey.FanSpeed, "low"); - // }); - //} - - //if (fanAttr.value.Contains("medium")) - //{ - // //2妗� - // var iconPath = this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "medium" ? "FunctionIcon/AirFresh/Fan2Select.png" : "FunctionIcon/AirFresh/Fan2.png"; - // menuContr.AddRowMenu(Language.StringByID(StringId.FanTwoGear), iconPath, this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "medium", () => - // { - // frameBack.Close(); - // //鍙戦�佹。浣嶅懡浠� - // this.SendOtherComand(this.btnFan, FunctionAttributeKey.FanSpeed, "medium"); - // }); - //} - - //if (fanAttr.value.Contains("high")) - //{ - // //3妗� - // var iconPath = this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "high" ? "FunctionIcon/AirFresh/Fan3Select.png" : "FunctionIcon/AirFresh/Fan3.png"; - // menuContr.AddRowMenu(Language.StringByID(StringId.FanThreeGear), iconPath, this.device.GetAttrState(FunctionAttributeKey.FanSpeed) == "high", () => - // { - // frameBack.Close(); - // //鍙戦�佹。浣嶅懡浠� - // this.SendOtherComand(this.btnFan, FunctionAttributeKey.FanSpeed, "high"); - // }); - //} } #endregion @@ -323,29 +274,14 @@ HdlThreadLogic.Current.RunThread(() => { //鑾峰彇鍙戦�佸懡浠ょ殑鏍锋澘(bus鍗忚鏄渶瑕佷竴娆℃�ф妸鍏ㄩ儴鍛戒护涓�璧峰彂閫佺殑) - var dic = this.GetSendComandSample(); - dic[comadKey] = comadValue; + Dictionary<string, string> dic = new Dictionary<string, string>(); + dic.Add(comadKey, comadValue); Control.Ins.SendWriteCommand(this.device, dic); HdlThreadLogic.Current.RunMain(() => { btnIcon.CanClick = true; }); }); - } - - /// <summary> - /// 鑾峰彇鍙戦�佸懡浠ょ殑鏍锋澘(bus鍗忚鏄渶瑕佷竴娆℃�ф妸鍏ㄩ儴鍛戒护涓�璧峰彂閫佺殑) - /// </summary> - /// <returns></returns> - private Dictionary<string, string> GetSendComandSample() - { - var dic = new Dictionary<string, string>(); - //寮�鍏� - dic[FunctionAttributeKey.OnOff] = this.device.GetAttrState(FunctionAttributeKey.OnOff); - //椋庨�� - dic[FunctionAttributeKey.FanSpeed] = this.device.GetAttrState(FunctionAttributeKey.FanSpeed); - - return dic; } #endregion -- Gitblit v1.8.0