| | |
| | | /// 房间选择下拉图标 |
| | | /// </summary> |
| | | Button btnFoorDownIcon; |
| | | |
| | | /// <summary> |
| | | /// 天气名称文本 |
| | | /// </summary> |
| | | Button btnWatherText; |
| | | /// <summary> |
| | | /// 湿度数据文本 |
| | | /// </summary> |
| | | Button btnHumidityText; |
| | | /// <summary> |
| | | /// pm25数据文本 |
| | | /// </summary> |
| | | Button btnPm25Values; |
| | | /// <summary> |
| | | /// 风速数据文本 |
| | | /// </summary> |
| | | Button btnFanSpeedValues; |
| | | |
| | | #endregion |
| | | #region 区域变量 |
| | | List<System.Threading.Thread> threads = new List<System.Threading.Thread>(); |
| | | |
| | | |
| | | uint level1Color = 0xFF2172FF; |
| | | uint level2Color = 0xCC4484F4; |
| | | uint level3Color = 0x664484F4; |
| | |
| | | public EnvironmentalSciencePage() |
| | | { |
| | | bodyView = this; |
| | | } |
| | | |
| | | public override void RemoveFromParent() |
| | | { |
| | | foreach(var thread in threads) |
| | | { |
| | | thread.Abort(); |
| | | } |
| | | threads.Clear(); |
| | | base.RemoveFromParent(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | IsBold = true, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | |
| | | Text = "28", |
| | | Text = MainPage.cityInfo.temperature, |
| | | }; |
| | | topWeatherView.AddChidren(btnTemp); |
| | | |
| | |
| | | UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/SmogIcon.png", |
| | | }; |
| | | topWeatherView.AddChidren(btnWeatherIcon); |
| | | LoadEvent_ChangeWeatherIcon(btnWeatherIcon); |
| | | |
| | | var btnWatherText = new Button() |
| | | btnWatherText = new Button() |
| | | { |
| | | X = Application.GetRealWidth(139), |
| | | Y = Application.GetRealHeight(16), |
| | |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = "雾霾" |
| | | Text = MainPage.cityInfo.weather |
| | | }; |
| | | topWeatherView.AddChidren(btnWatherText); |
| | | |
| | | |
| | | var btnTempUpperLimit = new Button() |
| | | { |
| | |
| | | }; |
| | | topWeatherView.AddChidren(btnTempLowerLimitText); |
| | | |
| | | |
| | | |
| | | var btnLocationText = new Button() |
| | | { |
| | | X = Application.GetRealWidth(233), |
| | |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | Text = "广州", |
| | | Text = MainPage.cityInfo.location, |
| | | }; |
| | | topWeatherView.AddChidren(btnLocationText); |
| | | |
| | |
| | | }; |
| | | topWeatherView.AddChidren(btnHumidityIcon); |
| | | |
| | | Button btnHumidityText = new Button() |
| | | btnHumidityText = new Button() |
| | | { |
| | | X = Application.GetRealWidth(15), |
| | | Y = btnHumidityIcon.Bottom, |
| | |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | Text = "--%", |
| | | Text = MainPage.cityInfo.humidity + "%", |
| | | }; |
| | | topWeatherView.AddChidren(btnHumidityText); |
| | | |
| | |
| | | }; |
| | | topWeatherView.AddChidren(btnPm25Icon); |
| | | |
| | | Button btnPm25Values = new Button() |
| | | btnPm25Values = new Button() |
| | | { |
| | | X = Application.GetRealWidth(90), |
| | | Y = btnHumidityIcon.Bottom, |
| | |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | Text = "--", |
| | | Text = MainPage.cityInfo.pm25, |
| | | }; |
| | | topWeatherView.AddChidren(btnPm25Values); |
| | | |
| | |
| | | }; |
| | | topWeatherView.AddChidren(btnFanSpeedIcon); |
| | | |
| | | Button btnFanSpeedValues = new Button() |
| | | btnFanSpeedValues = new Button() |
| | | { |
| | | X = Application.GetRealWidth(162), |
| | | Y = btnFanSpeedIcon.Bottom, |
| | |
| | | TextSize = CSS_FontSize.PromptFontSize_FirstLevel, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | Text = "--", |
| | | Text = MainPage.cityInfo.windLevel, |
| | | }; |
| | | topWeatherView.AddChidren(btnFanSpeedValues); |
| | | #endregion |
| | |
| | | }; |
| | | contentView.AddChidren(sensorListView); |
| | | |
| | | |
| | | int index = 0; |
| | | foreach(var sensor in DB_ResidenceData.residenceData.functionList.sensorsEnvironmentalScience) |
| | | { |
| | |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | Y = Application.GetRealWidth(92 * (index / 2)) |
| | | }; |
| | | if(index%2!=0) |
| | | if (index % 2 != 0) |
| | | { |
| | | sensorView.X = Application.GetRealWidth(160); |
| | | } |
| | |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetRealWidth(48), |
| | | Height = Application.GetRealWidth(48), |
| | | Angle = 1, |
| | | OpenAngle = 1, |
| | | ThumbColor = 0x00000000, |
| | | ThumbModeFill = true, |
| | | ProgressBarColor = sensor.levelColorList[sensor.curLevel - 1], |