| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | Text = MainPage.cityInfo.location, |
| | | Text = MainPage.cityInfo.city, |
| | | }; |
| | | topWeatherView.AddChidren(btnLocationText); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | Console.WriteLine(updateTemp.spk); |
| | | for (int i = 0; i < bodyView.sensorListView.ChildrenCount; i++) |
| | | { |
| | | var sensorTag = updateTemp.spk + updateTemp.sid + updateTemp.deviceId; |
| | |
| | | if (btn.Tag != null) |
| | | { |
| | | FunctionAttributes attr = updateTemp.GetAttribute(FunctionAttributeKey.Value); |
| | | if(attr == null) |
| | | if (attr == null) |
| | | { |
| | | switch(updateTemp.spk) |
| | | switch (updateTemp.spk) |
| | | { |
| | | case SPK.SensorCO2: |
| | | attr = updateTemp.GetAttribute(FunctionAttributeKey.Co2); |
| | |
| | | case SPK.SensorHumidity: |
| | | attr = updateTemp.GetAttribute(FunctionAttributeKey.Humidity); |
| | | break; |
| | | case SPK.SensorLight: |
| | | attr = updateTemp.GetAttribute(FunctionAttributeKey.Illuminance); |
| | | break; |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | else if (tag == "SensorLevel") |
| | | { |
| | | (btn as Button).TextID = bodyView.sensorTemp.GetLevelTextList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; |
| | | (btn as Button).TextColor = bodyView.sensorTemp.GetLevelColorList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; |
| | | if (updateTemp.spk != SPK.SensorLight) |
| | | { |
| | | (btn as Button).TextID = bodyView.sensorTemp.GetLevelTextList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; |
| | | (btn as Button).TextColor = bodyView.sensorTemp.GetLevelColorList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; |
| | | } |
| | | } |
| | | } |
| | | } |