| | |
| | | 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); |