| | |
| | | bodyView.btnIndoorTemp.Text = Language.StringByID(StringId.IndoorTemp) + Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.RoomTemp))) + "°C"; |
| | | bodyView.btnMode.UnSelectedImagePath = bodyView.fhTemp.GetModeIconPath(updateTemp.GetAttrState(FunctionAttributeKey.Mode)); |
| | | bodyView.arcBar.Progress = Convert.ToInt32(Convert.ToDouble(updateTemp.GetAttrState(FunctionAttributeKey.SetTemp))); |
| | | //if (updateTemp.trait_on_off.curValue.ToString() == "on") |
| | | //{ |
| | | // bodyView.arcBar.ThumbImagePath = "FunctionIcon/FloorHeating/DiyThumbIconOn.png"; |
| | | // bodyView.btnSwitch.IsSelected = true; |
| | | // bodyView.arcBar.IsOffline = false; |
| | | //} |
| | | //else |
| | | //{ |
| | | // bodyView.arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIcon.png"; |
| | | // bodyView.btnSwitch.IsSelected = false; |
| | | // bodyView.arcBar.IsOffline = true; |
| | | //} |
| | | |
| | | if (updateTemp.trait_on_off.curValue.ToString() == "on") |
| | | { |
| | | bodyView.arcBar.ThumbImagePath = "FunctionIcon/FloorHeating/DiyThumbIconOn.png"; |
| | | bodyView.btnSwitch.IsSelected = true; |
| | | bodyView.arcBar.IsOffline = false; |
| | | bodyView.btnSwitch.IsSelected = true; |
| | | bodyView.arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIconOn.png"; |
| | | if (updateTemp.GetAttrState(FunctionAttributeKey.Mode) == "fan") |
| | | { |
| | | bodyView.arcBar.IsClickable = false; |
| | | } |
| | | else |
| | | { |
| | | bodyView.arcBar.IsClickable = true; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | bodyView.arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIcon.png"; |
| | | bodyView.btnSwitch.IsBold = false; |
| | | bodyView.arcBar.IsOffline = true; |
| | | bodyView.btnSwitch.IsSelected = false; |
| | | bodyView.arcBar.IsClickable = false; |
| | | bodyView.arcBar.ThumbImagePath = "FunctionIcon/AC/DiyThumbIcon.png"; |
| | | } |
| | | |
| | | |
| | | }); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | { |
| | | return; |
| | | } |
| | | var temp = Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.SetTemp)); |
| | | if (temp > Convert.ToInt32(function.GetAttribute(FunctionAttributeKey.SetTemp).max)) |
| | | var temp =(int) Convert.ToDouble(function.GetAttrState(FunctionAttributeKey.SetTemp)); |
| | | if (temp > Convert.ToDouble(function.GetAttribute(FunctionAttributeKey.SetTemp).max)) |
| | | { |
| | | return; |
| | | } |
| | |
| | | arcBar.OnProgressChangedEvent = (sender, e) => |
| | | { |
| | | function.SetAttrState(FunctionAttributeKey.SetTemp, e); |
| | | btnTemp.Text = function.GetAttrState(FunctionAttributeKey.SetTemp); |
| | | btnTemp.Text = Convert.ToDouble( function.GetAttrState(FunctionAttributeKey.SetTemp)).ToString(); |
| | | }; |
| | | } |
| | | /// <summary> |