| | |
| | | return; |
| | | } |
| | | updataTime = DateTime.Now; |
| | | bodyView.arcBar.ProgressBarColor = bodyView.aC.trait_on_off.value.ToString() == "on" ? CSS_Color.MainColor : CSS_Color.PromptingColor2; |
| | | bodyView.btnTemp.Text = uAc.trait_temp.value.ToString(); |
| | | bodyView.arcBar.ProgressBarColor = bodyView.aC.trait_on_off.curValue.ToString() == "on" ? CSS_Color.MainColor : CSS_Color.PromptingColor2; |
| | | bodyView.btnTemp.Text = uAc.trait_temp.curValue.ToString(); |
| | | bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + uAc.indoorTemp + "°C"; |
| | | bodyView.btnMode.UnSelectedImagePath = uAc.curModeImage; |
| | | bodyView.btnWindSpeed.UnSelectedImagePath = uAc.curFanImage; |
| | | bodyView.btnSwitch.IsSelected = uAc.trait_on_off.value.ToString() == "on"; |
| | | bodyView.btnSwitch.IsSelected = uAc.trait_on_off.curValue.ToString() == "on"; |
| | | if (uAc.refreshTime.AddMilliseconds(1000) < DateTime.Now) |
| | | { |
| | | bodyView.arcBar.Progress = Convert.ToInt32(uAc.trait_temp.value); |
| | | bodyView.arcBar.Progress = Convert.ToInt32(uAc.trait_temp.curValue); |
| | | |
| | | } |
| | | bodyView.arcBar.ProgressBarColor = uAc.trait_on_off.value.ToString() == "on" ? CSS_Color.MainColor : CSS_Color.PromptingColor2; |
| | | bodyView.arcBar.ThumbImagePath = uAc.trait_on_off.value.ToString() == "on" ? "FunctionIcon/AC/DiyThumbIconOn.png" : "FunctionIcon/AC/DiyThumbIcon.png"; |
| | | bodyView.arcBar.IsClickable = uAc.trait_on_off.value.ToString() == "on"; |
| | | bodyView.arcBar.ProgressBarColor = uAc.trait_on_off.curValue.ToString() == "on" ? CSS_Color.MainColor : CSS_Color.PromptingColor2; |
| | | 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"; |
| | | }); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | { |
| | | btnMinus.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var temp = Convert.ToInt32(aC.trait_temp.value); |
| | | var temp = Convert.ToInt32(aC.trait_temp.curValue); |
| | | if (temp < 17) |
| | | { |
| | | return; |
| | |
| | | temp--; |
| | | arcBar.Progress = temp; |
| | | btnTemp.Text = temp.ToString(); |
| | | aC.trait_temp.value = temp; |
| | | aC.trait_temp.curValue = temp; |
| | | //Control.Send(CommandType_A.write, aC); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("temp", temp.ToString()); |
| | |
| | | }; |
| | | btnPlus.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var temp = Convert.ToInt32(aC.trait_temp.value); |
| | | var temp = Convert.ToInt32(aC.trait_temp.curValue); |
| | | if (temp > 37) |
| | | { |
| | | return; |
| | |
| | | temp++; |
| | | arcBar.Progress = temp; |
| | | btnTemp.Text = temp.ToString(); |
| | | aC.trait_temp.value = temp; |
| | | aC.trait_temp.curValue = temp; |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("temp", aC.trait_temp.value.ToString()); |
| | | d.Add("temp", aC.trait_temp.curValue.ToString()); |
| | | Control.Ins.SendWriteCommand(aC, d); |
| | | //aC.GetSendJObject |
| | | |
| | | }; |
| | | arcBar.OnStopTrackingTouchEvent = (sender, e) => |
| | | { |
| | | aC.trait_temp.value = arcBar.Progress; |
| | | btnTemp.Text = aC.trait_temp.value.ToString(); |
| | | aC.trait_temp.curValue = arcBar.Progress; |
| | | btnTemp.Text = aC.trait_temp.curValue.ToString(); |
| | | //Control.Send(CommandType_A.write, aC); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("temp", aC.trait_temp.value.ToString()); |
| | | d.Add("temp", aC.trait_temp.curValue.ToString()); |
| | | Control.Ins.SendWriteCommand(aC, d); |
| | | }; |
| | | arcBar.OnProgressChangedEvent = (sender, e) => |
| | | { |
| | | aC.trait_temp.value = e; |
| | | btnTemp.Text = aC.trait_temp.value.ToString(); |
| | | aC.trait_temp.curValue = e; |
| | | btnTemp.Text = aC.trait_temp.curValue.ToString(); |
| | | }; |
| | | } |
| | | /// <summary> |
| | |
| | | btnSwitch.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | btnSwitch.IsSelected = !btnSwitch.IsSelected; |
| | | aC.trait_on_off.value = btnSwitch.IsSelected ? "on" : "off"; |
| | | bodyView.arcBar.ProgressBarColor = aC.trait_on_off.value.ToString() == "on" ? CSS_Color.MainColor : CSS_Color.PromptingColor2; |
| | | bodyView.arcBar.ThumbImagePath = aC.trait_on_off.value.ToString() == "on" ? "FunctionIcon/AC/DiyThumbIconOn.png" : "FunctionIcon/AC/DiyThumbIcon.png"; |
| | | bodyView.arcBar.IsClickable = aC.trait_on_off.value.ToString() == "on"; |
| | | aC.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off"; |
| | | bodyView.arcBar.ProgressBarColor = aC.trait_on_off.curValue.ToString() == "on" ? CSS_Color.MainColor : CSS_Color.PromptingColor2; |
| | | bodyView.arcBar.ThumbImagePath = aC.trait_on_off.curValue.ToString() == "on" ? "FunctionIcon/AC/DiyThumbIconOn.png" : "FunctionIcon/AC/DiyThumbIcon.png"; |
| | | bodyView.arcBar.IsClickable = aC.trait_on_off.curValue.ToString() == "on"; |
| | | |
| | | //bodyView.arcBar.ProgressBarColor = aC.on_off == "on" ? CSS_Color.MainColor : CSS_Color.PromptingColor2; |
| | | //bodyView.arcBar.ThumbImagePath = aC.on_off == "on" ? "FunctionIcon/AC/DiyThumbIconOn.png" : "FunctionIcon/AC/DiyThumbIcon.png"; |
| | |
| | | |
| | | //Control.Send(CommandType_A.write, aC); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("on_off", aC.trait_on_off.value.ToString()); |
| | | d.Add("on_off", aC.trait_on_off.curValue.ToString()); |
| | | Control.Ins.SendWriteCommand(aC, d); |
| | | }; |
| | | } |
| | |
| | | EventHandler<MouseEventArgs> eventHandler1 = (sender, e) => |
| | | { |
| | | btn1.IsSelected = btn2.IsSelected = true; |
| | | aC.trait_mode.value = curMode; |
| | | aC.trait_mode.curValue = curMode; |
| | | btnMode.UnSelectedImagePath = aC.curModeImage; |
| | | //Control.Send(CommandType_A.write, aC); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | |
| | | EventHandler<MouseEventArgs> eventHandler1 = (sender, e) => |
| | | { |
| | | btn1.IsSelected = btn2.IsSelected = true; |
| | | aC.trait_fan.value = curFan; |
| | | aC.trait_fan.curValue = curFan; |
| | | btnWindSpeed.UnSelectedImagePath = aC.curFanImage; |
| | | //Control.Send(CommandType_A.write, aC); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |