From 271faaf6664166dc368639b9f2e577f63f901be5 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期三, 23 十二月 2020 22:23:57 +0800 Subject: [PATCH] 20201223-99 --- HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs | 45 ++++++++++++++++++++++++++++++++++++++------- 1 files changed, 38 insertions(+), 7 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs index 7779f67..41538e1 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs @@ -24,19 +24,26 @@ return; } updataTime = DateTime.Now; - bodyView.arcBar.ProgressBarColor = bodyView.aC.trait_on_off.curValue.ToString() == "on" ? CSS_Color.MainColor : CSS_Color.PromptingColor2; + bodyView.arcBar.IsOffline = bodyView.aC.trait_on_off.curValue.ToString() != "on"; bodyView.btnTemp.Text = uAc.trait_temp.curValue.ToString(); bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(uAc.trait_IndoorTemp.curValue)) + "掳C"; bodyView.btnMode.UnSelectedImagePath = uAc.curModeImage; bodyView.btnWindSpeed.UnSelectedImagePath = uAc.curFanImage; bodyView.btnSwitch.IsSelected = uAc.trait_on_off.curValue.ToString() == "on"; - if (uAc.refreshTime.AddMilliseconds(1000) < DateTime.Now) + if (uAc.refreshTime.AddMilliseconds(500) < DateTime.Now) { bodyView.arcBar.Progress = Convert.ToInt32(Convert.ToDouble(uAc.trait_temp.curValue)); } bodyView.arcBar.ThumbImagePath = uAc.trait_on_off.curValue.ToString() == "on" ? "FunctionIcon/AC/DiyThumbIconOn.png" : "FunctionIcon/AC/DiyThumbIcon.png"; bodyView.arcBar.IsClickable = uAc.trait_on_off.curValue.ToString() == "on"; - + if(uAc.trait_mode.curValue.ToString() == "fan") + { + bodyView.arcBar.IsClickable = false; + } + else + { + bodyView.arcBar.IsClickable = true; + } }); } catch (Exception ex) @@ -66,7 +73,7 @@ btnCollection.MouseUpEventHandler += (sender, e) => { btnCollection.IsSelected = aC.collect = btnCollection_Out.IsSelected = !btnCollection.IsSelected; - aC.SaveFunctionData(true); + aC.CollectFunction(); }; } @@ -77,8 +84,12 @@ { btnMinus.MouseUpEventHandler = (sender, e) => { + if (aC.trait_on_off.curValue.ToString() == "off" || aC.trait_mode.curValue.ToString() == "fan") + { + return; + } var temp = Convert.ToInt32(aC.trait_temp.curValue); - if (temp < 17) + if (temp <= aC.trait_temp.min) { return; } @@ -93,8 +104,12 @@ }; btnPlus.MouseUpEventHandler = (sender, e) => { + if (aC.trait_on_off.curValue.ToString() == "off" || aC.trait_mode.curValue.ToString() == "fan") + { + return; + } var temp = Convert.ToInt32(aC.trait_temp.curValue); - if (temp > 37) + if (temp >= aC.trait_temp.max) { return; } @@ -112,7 +127,7 @@ { aC.trait_temp.curValue = arcBar.Progress.ToString(); btnTemp.Text = aC.trait_temp.curValue.ToString(); - System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); + System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); d.Add(FunctionAttributeKey.SetTemp, aC.trait_temp.curValue.ToString()); Control.Ins.SendWriteCommand(aC, d); }; @@ -129,10 +144,18 @@ { btnMode.MouseUpEventHandler = (sender, e) => { + if (aC.trait_on_off.curValue.ToString() == "off") + { + return; + } LoadDiv_ChangeModeView(); }; btnWindSpeed.MouseUpEventHandler = (sender, e) => { + if (aC.trait_on_off.curValue.ToString() == "off") + { + return; + } LoadDiv_ChangeFanView(); }; @@ -177,6 +200,14 @@ d.Add(FunctionAttributeKey.Mode, curMode); Control.Ins.SendWriteCommand(aC, d); dialog.Close(); + if (aC.trait_mode.curValue.ToString() == "fan") + { + bodyView.arcBar.IsClickable = false; + } + else + { + bodyView.arcBar.IsClickable = true; + } }; btn1.MouseUpEventHandler = eventHandler1; btn2.MouseUpEventHandler = eventHandler1; -- Gitblit v1.8.0