| | |
| | | /// </summary> |
| | | public string GetTempUnitString(Function function) |
| | | { |
| | | var tt = function.GetAttrState(FunctionAttributeKey.TempType); |
| | | if (tt == "0") |
| | | var tt = function.GetAttribute(FunctionAttributeKey.TempType); |
| | | if (tt == null) |
| | | { |
| | | return "°C"; |
| | | } |
| | | if (tt.unit == string.Empty) |
| | | { |
| | | return "°C"; |
| | | } |
| | | else |
| | | { |
| | | return tt; |
| | | if (tt.unit == "C") |
| | | { |
| | | return "°C"; |
| | | } |
| | | else if (tt.unit == "F") |
| | | { |
| | | return "°F"; |
| | | } |
| | | else |
| | | { |
| | | return tt.unit; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | /// </summary> |
| | | public byte timeFlag = 0; |
| | | |
| | | public string GetWrokModeIconPath(string value, bool lighting = true) |
| | | { |
| | | var imagePath = "FunctionIcon/AC/HeatingIcon.png"; |
| | | |
| | | switch (value) |
| | | { |
| | | case "heat": |
| | | imagePath = lighting ? "FunctionIcon/AC/HeatingIcon.png" : "FunctionIcon/AC/HeatingIconGray.png"; |
| | | break; |
| | | case "cool": |
| | | imagePath = lighting ? "FunctionIcon/AC/CoolIcon.png" : "FunctionIcon/AC/CoolIconGray.png"; |
| | | break; |
| | | case "economic": |
| | | imagePath = lighting ? "FunctionIcon/FloorHeating/EconomicIcon.png" : "FunctionIcon/FloorHeating/EconomicIconGray.png"; |
| | | break; |
| | | } |
| | | |
| | | return imagePath; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取模式的icon路径 |
| | | /// <param name="lightingIcon">获取的图标类型,默认是点亮</param> |