| | |
| | | Text = "---", |
| | | IsBold = true, |
| | | }; |
| | | if(setTempAttr.step == "0.5") |
| | | if (setTempAttr.step == "0.5") |
| | | { |
| | | btnTemp.Text = Convert.ToDouble(setTempAttr.curValue).ToString("0.0"); |
| | | } |
| | |
| | | btnTemp.Text = setTempAttr.curValue.ToString(); |
| | | } |
| | | } |
| | | btnTemp.Width = btnTemp.GetTextWidth(); |
| | | #if __IOS__ |
| | | btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(10); |
| | | #else |
| | | btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(5); |
| | | #endif |
| | | FrameWhiteCentet1.AddChidren(btnTemp); |
| | | |
| | | |
| | |
| | | |
| | | var btnMinTemp = new Button() |
| | | { |
| | | X = Application.GetRealWidth(26), |
| | | Width = Application.GetRealWidth(18), |
| | | X = Application.GetRealWidth(22), |
| | | Width = Application.GetRealWidth(22), |
| | | TextAlignment = TextAlignment.Center, |
| | | Text = setTempAttr.min.ToString(), |
| | | TextSize = 12, |
| | |
| | | var btnMaxTemp = new Button() |
| | | { |
| | | X = setTempBar.Right, |
| | | Width = Application.GetRealWidth(18), |
| | | Width = Application.GetRealWidth(24), |
| | | TextAlignment = TextAlignment.Center, |
| | | Text = setTempAttr.max.ToString(), |
| | | TextSize = 12, |
| | |
| | | { |
| | | btnTemp.Text = (setTempAttr.min + e).ToString(); |
| | | } |
| | | |
| | | #if __IOS__ |
| | | btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(10); |
| | | #else |
| | | btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(5); |
| | | #endif |
| | | btnTempUint.X = btnTemp.Right; |
| | | }; |
| | | setTempBar.OnStopTrackingTouchEvent = (sender,e) =>{ |
| | | temp = e; |
| | |
| | | { |
| | | btnTemp.Text = (setTempAttr.min + e).ToString(); |
| | | } |
| | | |
| | | #if __IOS__ |
| | | btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(10); |
| | | #else |
| | | btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(5); |
| | | #endif |
| | | btnTempUint.X = btnTemp.Right; |
| | | controlTime = DateTime.Now; |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.SetTemp, e.ToString()); |
| | |
| | | btnTemp.Text = temp.ToString(); |
| | | } |
| | | |
| | | //btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(5); |
| | | //btnTempUint.X = btnTemp.Right; |
| | | #if __IOS__ |
| | | btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(10); |
| | | #else |
| | | btnTemp.Width = btnTemp.GetTextWidth() + Application.GetRealWidth(5); |
| | | #endif |
| | | btnTempUint.X = btnTemp.Right; |
| | | |
| | | if (device.trait_on_off.curValue.ToString() == "on") |
| | | { |