| | |
| | | var frameBackGroudTemp = new FrameLayout(); |
| | | frameBackGroudTemp.Width = roomBackView.Width; |
| | | frameBackGroudTemp.Height = roomBackView.Height; |
| | | frameBackGroudTemp.Radius = roomBackView.Radius; |
| | | frameBackGroudTemp.BackgroundColor = 0x12000000; |
| | | frameBackGroudTemp.Radius = (uint)Application.GetRealHeight(17); |
| | | frameBackGroudTemp.BackgroundColor = UserCenterColor.Current.PictrueZhezhaoColor; |
| | | roomBackView.AddChidren(frameBackGroudTemp); |
| | | |
| | | roomNameBackground = new FrameLayout |
| | |
| | | TextSize = 14, |
| | | TextAlignment = TextAlignment.CenterLeft |
| | | }; |
| | | if (string.IsNullOrEmpty(room.TemperatrueDevice) == false) |
| | | if (LocalDevice.Current.GetDevice(room.TemperatrueDevice) != null) |
| | | {
|
| | | //这个设备要存在本地才行
|
| | | temperatureText.Text = room.Temperatrue == 0 ? "0.0℃" : room.Temperatrue.ToString() + "℃"; |
| | | } |
| | | roomTemperatureBackground.AddChidren(temperatureText); |
| | |
| | | TextSize = 14, |
| | | TextAlignment = TextAlignment.CenterLeft |
| | | }; |
| | | if (string.IsNullOrEmpty(room.HumidityDevice) == false) |
| | | if (LocalDevice.Current.GetDevice(room.HumidityDevice) != null) |
| | | {
|
| | | //这个设备要存在本地才行
|
| | | humidityText.Text = room.Humidity == 0 ? "0.0%" : room.Humidity.ToString() + "%"; |
| | | } |
| | | roomTemperatureBackground.AddChidren(humidityText); |