| | |
| | | if (setTempAttr.curValue.ToString().Contains(".")) |
| | | { |
| | | btnTemp.Text = setTempAttr.curValue.ToString().Split(".")[0]; |
| | | }else |
| | | } |
| | | else |
| | | { |
| | | btnTemp.Text = setTempAttr.curValue.ToString(); |
| | | } |
| | |
| | | TextAlignment = TextAlignment.Center, |
| | | Text = setTempAttr.min.ToString(), |
| | | TextSize = 12, |
| | | TextColor = 0xFFC0C7D4, |
| | | }; |
| | | setTempView.AddChidren(btnMinTemp); |
| | | |
| | |
| | | device.SetAttrState(FunctionAttributeKey.SetTemp, e.ToString()); |
| | | if (setTempAttr.step == "0.5") |
| | | { |
| | | btnTemp.Text = (setTempAttr.min + ((double)e / 2)).ToString("0.0"); |
| | | e = e / 2; |
| | | btnTemp.Text = (setTempAttr.min + ((double)e)).ToString("0.0"); |
| | | } |
| | | else |
| | | { |
| | |
| | | int index = 0; |
| | | List<FunctionAttributes> attrList = new List<FunctionAttributes>(); |
| | | attrList.AddRange(device.attributes); |
| | | attrList.Add(new FunctionAttributes() { |
| | | attrList.Add(new FunctionAttributes() |
| | | { |
| | | key = "+", |
| | | }); |
| | | |