| | |
| | | { |
| | | try |
| | | { |
| | | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (bodyView == null) |
| | |
| | | { |
| | | bodyView.arcBar.Progress = uAc.curTemp; |
| | | } |
| | | bodyView.arcBar.ProgressBarColor = uAc.on_off == "on" ? CSS_Color.MainColor : CSS_Color.PromptingColor2; |
| | | bodyView.arcBar.ThumbImagePath = uAc.on_off == "on" ? "FunctionIcon/AC/DiyThumbIconOn.png" : "FunctionIcon/AC/DiyThumbIcon.png"; |
| | | bodyView.arcBar.IsClickable = uAc.on_off == "on"; |
| | | |
| | | }); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | { |
| | | btnMinus.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | if (aC.curTemp < 20) |
| | | if (aC.curTemp < 17) |
| | | { |
| | | return; |
| | | } |
| | |
| | | { |
| | | btnSwitch.IsSelected = !btnSwitch.IsSelected; |
| | | aC.on_off = btnSwitch.IsSelected ? "on" : "off"; |
| | | |
| | | 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"; |
| | | bodyView.arcBar.IsClickable = aC.on_off == "on"; |
| | | |
| | | Control.Send(CommandType_A.write, aC); |
| | | }; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 加载模式改变事件 |
| | |
| | | EventHandler<MouseEventArgs> eventHandler1 = (sender, e) => |
| | | { |
| | | btn1.IsSelected = btn2.IsSelected = true; |
| | | aC.curMode = curMode; |
| | | aC.trait_mode.curValues = curMode; |
| | | btnMode.UnSelectedImagePath = aC.curModeImage; |
| | | Control.Send(CommandType_A.write, aC); |
| | | dialog.Close(); |
| | | }; |
| | |
| | | dialogView.MouseUpEventHandler = eventHandler; |
| | | } |
| | | /// <summary> |
| | | /// 加载模式改变事件 |
| | | /// 加载风速改变事件 |
| | | /// </summary> |
| | | void LoadEvent_ChangeFan(Dialog dialog, FrameLayout dialogView, Button btn1, Button btn2,string curFan) |
| | | { |
| | |
| | | EventHandler<MouseEventArgs> eventHandler1 = (sender, e) => |
| | | { |
| | | btn1.IsSelected = btn2.IsSelected = true; |
| | | aC.curFan = curFan; |
| | | aC.trait_fan.curValues = curFan; |
| | | btnWindSpeed.UnSelectedImagePath = aC.curFanImage; |
| | | Control.Send(CommandType_A.write, aC); |
| | | dialog.Close(); |
| | | }; |