| | |
| | | /// </summary> |
| | | Button socialContribution_Info3_ValuesButton; |
| | | |
| | | #if __ANDROID__ |
| | | private string fontName = "BEBAS.ttf"; |
| | | #else |
| | | private string fontName = "BEBAS"; |
| | | #endif |
| | | |
| | | |
| | | public InverterJinmaoPage() |
| | | { |
| | |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextSize = 18, |
| | | IsBold = true, |
| | | FontName = "BEBAS", |
| | | FontName = fontName, |
| | | }; |
| | | electricityGenerationView.AddChidren(pvGenerate_TodayValuesButton); |
| | | |
| | |
| | | #endif |
| | | pvGenerate_todayUintButton = new Button() |
| | | { |
| | | Y = Application.GetRealWidth(43), |
| | | Y = Application.GetRealWidth(44), |
| | | Height = Application.GetRealWidth(17), |
| | | Text = "kwh", |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | | TextSize = 12, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | //IsBold = true, |
| | | }; |
| | | electricityGenerationView.AddChidren(pvGenerate_TotalValuesButton); |
| | | |
| | |
| | | |
| | | loadEle_TodayUintButton = new Button() |
| | | { |
| | | Y = Application.GetRealWidth(43), |
| | | Y = Application.GetRealWidth(45), |
| | | Height = Application.GetRealWidth(17), |
| | | Text = "kwh", |
| | | TextColor = CSS_Color.MainBackgroundColor, |
| | |
| | | |
| | | pvLoad_TodayValuesButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(81 - 12) - loadEle_TodayUintButton.Width, |
| | | X = Application.GetRealWidth(81 - 8) - loadEle_TodayUintButton.Width, |
| | | Y = Application.GetRealWidth(34), |
| | | Height = Application.GetRealWidth(53), |
| | | Width = Application.GetRealWidth(100), |
| | |
| | | TextSize = 18, |
| | | TextAlignment = TextAlignment.TopRight, |
| | | IsBold = true, |
| | | FontName = "BEBAS", |
| | | FontName = fontName, |
| | | }; |
| | | #if __IOS__ |
| | | pvLoad_TodayValuesButton.Y = Application.GetRealWidth(34); |
| | | pvLoad_TodayValuesButton.X = Application.GetRealWidth(81 - 12) - loadEle_TodayUintButton.Width; |
| | | pvLoad_TodayValuesButton.X = Application.GetRealWidth(81 - 8) - loadEle_TodayUintButton.Width; |
| | | #else |
| | | pvLoad_TodayValuesButton.Y = Application.GetRealWidth(37); |
| | | pvLoad_TodayValuesButton.X = Application.GetRealWidth(81 - 16) - loadEle_TodayUintButton.Width; |
| | |
| | | Y = Application.GetRealWidth(20), |
| | | Width = Application.GetRealWidth(151), |
| | | Height = Application.GetRealWidth(151), |
| | | BackgroundImagePath = "FunctionIcon/Acst/Inverter/PvBgRunBg.png" |
| | | }; |
| | | pvEleGenerationInfoView.AddChidren(powerGenerationView); |
| | | |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 24, |
| | | IsBold = true, |
| | | FontName = "BEBAS", |
| | | FontName = fontName, |
| | | }; |
| | | powerGenerationView.AddChidren(pvPower_ValuesButton); |
| | | |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 18, |
| | | IsBold = true, |
| | | FontName = "BEBAS", |
| | | FontName = fontName, |
| | | }; |
| | | pvEleGenerationInfoView.AddChidren(pvGeneration_TodayValuesButton); |
| | | |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 18, |
| | | IsBold = true, |
| | | FontName = "BEBAS", |
| | | FontName = fontName, |
| | | }; |
| | | pvEleGenerationInfoView.AddChidren(pvGeneration_MonthValuesButton); |
| | | |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 18, |
| | | IsBold = true, |
| | | FontName = "BEBAS", |
| | | FontName = fontName, |
| | | }; |
| | | pvEleGenerationInfoView.AddChidren(pvGeneration_YearValuesButton); |
| | | |
| | |
| | | Y = Application.GetRealWidth(20), |
| | | Width = Application.GetRealWidth(151), |
| | | Height = Application.GetRealWidth(151), |
| | | BackgroundImagePath = "FunctionIcon/Acst/Inverter/PvBgDischargeBg.png" |
| | | }; |
| | | electricityUsageStatusView.AddChidren(powerUsageView); |
| | | |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 24, |
| | | IsBold = true, |
| | | FontName = "BEBAS", |
| | | FontName = fontName, |
| | | }; |
| | | powerUsageView.AddChidren(loadElec_ValuesButton); |
| | | |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 18, |
| | | IsBold = true, |
| | | FontName = "BEBAS", |
| | | FontName = fontName, |
| | | }; |
| | | electricityUsageStatusView.AddChidren(powerUsage_TodayValuesButton); |
| | | |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 18, |
| | | IsBold = true, |
| | | FontName = "BEBAS", |
| | | FontName = fontName, |
| | | }; |
| | | electricityUsageStatusView.AddChidren(loadElec_MonthValuesButton); |
| | | |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 18, |
| | | IsBold = true, |
| | | FontName = "BEBAS", |
| | | FontName = fontName, |
| | | }; |
| | | electricityUsageStatusView.AddChidren(powerUsage_YearValuesButton); |
| | | |
| | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | powerUsage_YearValuesButton.Text = totalValues.ToString(); |
| | | powerUsage_YearValuesButton.TextSize=12; |
| | | if (powerUsage_YearValuesButton.Width < powerUsage_YearValuesButton.GetTextWidth()) |
| | | { |
| | | powerUsage_YearValuesButton.TextSize = 12; |
| | | } |
| | | //while (true) |
| | | //{ |
| | | // if (powerUsage_YearValuesButton.Width < powerUsage_YearValuesButton.GetTextWidth()) |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 24, |
| | | IsBold = true, |
| | | FontName = "BEBAS", |
| | | FontName = fontName, |
| | | }; |
| | | esRunStatus_ChargeValuesView.AddChidren(esRunStatus_ChargeValuesButton); |
| | | |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = 24, |
| | | IsBold = true, |
| | | FontName = "BEBAS", |
| | | FontName = fontName, |
| | | }; |
| | | esRunStatus_DischargeValuesView.AddChidren(esRunStatus_DischargeValuesButton); |
| | | |
| | |
| | | }; |
| | | socialContribution_InfoView_1.AddChidren(socialContribution_Info1_IconButton); |
| | | |
| | | var socialContribution_Info1_ValuesView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealWidth(68), |
| | | Height = Application.GetRealWidth(25), |
| | | }; |
| | | socialContribution_InfoView_1.AddChidren(socialContribution_Info1_ValuesView); |
| | | |
| | | socialContribution_Info1_ValuesButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Y = Application.GetRealWidth(68), |
| | | //Y = Application.GetRealWidth(68), |
| | | Width = Application.GetRealWidth(36), |
| | | Height = Application.GetRealWidth(25), |
| | | //Height = Application.GetRealWidth(25), |
| | | Text = function.GetAttrState(InverterJinmao_AttrEnum.coal.ToString()), |
| | | TextSize = 18, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | IsBold = true, |
| | | FontName = "BEBAS", |
| | | FontName = fontName, |
| | | }; |
| | | socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth() + Application.GetRealWidth(8); |
| | | socialContribution_InfoView_1.AddChidren(socialContribution_Info1_ValuesButton); |
| | | socialContribution_Info1_ValuesView.AddChidren(socialContribution_Info1_ValuesButton); |
| | | |
| | | socialContribution_Info1_UintButton = new Button() |
| | | { |
| | | X = socialContribution_Info1_ValuesButton.Right - Application.GetRealWidth(4), |
| | | Y = Application.GetRealWidth(68), |
| | | //Y = Application.GetRealWidth(68), |
| | | Width = Application.GetRealWidth(50), |
| | | Height = Application.GetRealWidth(23), |
| | | //Height = Application.GetRealWidth(23), |
| | | Text = "吨", |
| | | TextSize = 12, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | }; |
| | | #if __IOS__ |
| | | socialContribution_Info1_UintButton.Y = Application.GetRealWidth(66); |
| | | #endif |
| | | socialContribution_InfoView_1.AddChidren(socialContribution_Info1_UintButton); |
| | | socialContribution_Info1_ValuesView.AddChidren(socialContribution_Info1_UintButton); |
| | | |
| | | var socialContribution_Info1_TipButton = new Button() |
| | | { |
| | |
| | | }; |
| | | socialContribution_InfoView_2.AddChidren(socialContribution_Info2_IconButton); |
| | | |
| | | var socialContribution_Info2_ValuesView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealWidth(68), |
| | | Height = Application.GetRealWidth(25), |
| | | }; |
| | | socialContribution_InfoView_2.AddChidren(socialContribution_Info2_ValuesView); |
| | | |
| | | socialContribution_Info2_ValuesButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Y = Application.GetRealWidth(68), |
| | | //Y = Application.GetRealWidth(68), |
| | | Width = Application.GetRealWidth(36), |
| | | Height = Application.GetRealWidth(25), |
| | | Text = function.GetAttrState(InverterJinmao_AttrEnum.co2.ToString()), |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | IsBold = true, |
| | | FontName = "BEBAS", |
| | | FontName = fontName, |
| | | }; |
| | | socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth() + Application.GetRealWidth(8); |
| | | socialContribution_InfoView_2.AddChidren(socialContribution_Info2_ValuesButton); |
| | | socialContribution_Info2_ValuesView.AddChidren(socialContribution_Info2_ValuesButton); |
| | | |
| | | socialContribution_Info2_UintButton = new Button() |
| | | { |
| | | X = socialContribution_Info2_ValuesButton.Right - Application.GetRealWidth(4), |
| | | Y = Application.GetRealWidth(68), |
| | | //Y = Application.GetRealWidth(68), |
| | | Width = Application.GetRealWidth(50), |
| | | Height = Application.GetRealWidth(23), |
| | | //Height = Application.GetRealWidth(23), |
| | | Text = "吨", |
| | | TextSize = 12, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | }; |
| | | #if __IOS__ |
| | | socialContribution_Info2_UintButton.Y = Application.GetRealWidth(66); |
| | | #endif |
| | | socialContribution_InfoView_2.AddChidren(socialContribution_Info2_UintButton); |
| | | socialContribution_Info2_ValuesView.AddChidren(socialContribution_Info2_UintButton); |
| | | |
| | | var socialContribution_Info2_TipButton = new Button() |
| | | { |
| | |
| | | }; |
| | | socialContribution_InfoView_3.AddChidren(socialContribution_Info3_IconButton); |
| | | |
| | | var socialContribution_Info3_ValuesView = new FrameLayout() |
| | | { |
| | | Y = Application.GetRealWidth(68), |
| | | Height = Application.GetRealWidth(25), |
| | | }; |
| | | socialContribution_InfoView_3.AddChidren(socialContribution_Info3_ValuesView); |
| | | |
| | | socialContribution_Info3_ValuesButton = new Button() |
| | | { |
| | | X = Application.GetRealWidth(12), |
| | | Y = Application.GetRealWidth(68), |
| | | //Y = Application.GetRealWidth(68), |
| | | Width = Application.GetRealWidth(36), |
| | | Height = Application.GetRealWidth(25), |
| | | //Height = Application.GetRealWidth(25), |
| | | Text = function.GetAttrState(InverterJinmao_AttrEnum.trees.ToString()), |
| | | TextSize = 18, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | IsBold = true, |
| | | FontName = "BEBAS", |
| | | FontName = fontName, |
| | | }; |
| | | socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth() + Application.GetRealWidth(8); |
| | | socialContribution_InfoView_3.AddChidren(socialContribution_Info3_ValuesButton); |
| | | socialContribution_Info3_ValuesView.AddChidren(socialContribution_Info3_ValuesButton); |
| | | |
| | | socialContribution_Info3_UintButton = new Button() |
| | | { |
| | | X = socialContribution_Info3_ValuesButton.Right - Application.GetRealWidth(4), |
| | | Y = Application.GetRealWidth(68), |
| | | //Y = Application.GetRealWidth(68), |
| | | Width = Application.GetRealWidth(50), |
| | | Height = Application.GetRealWidth(23), |
| | | //Height = Application.GetRealWidth(23), |
| | | Text = "棵", |
| | | TextSize = 12, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextAlignment = TextAlignment.BottomLeft, |
| | | }; |
| | | #if __IOS__ |
| | | socialContribution_Info3_UintButton.Y = Application.GetRealWidth(66); |
| | | #endif |
| | | socialContribution_InfoView_3.AddChidren(socialContribution_Info3_UintButton); |
| | | socialContribution_Info3_ValuesView.AddChidren(socialContribution_Info3_UintButton); |
| | | |
| | | var socialContribution_Info3_TipButton = new Button() |
| | | { |
| | |
| | | |
| | | #if __IOS__ |
| | | pvLoad_TodayValuesButton.Y = Application.GetRealWidth(34); |
| | | pvLoad_TodayValuesButton.X = Application.GetRealWidth(81 - 12) - loadEle_TodayUintButton.Width; |
| | | pvLoad_TodayValuesButton.X = Application.GetRealWidth(81 - 8) - loadEle_TodayUintButton.Width; |
| | | #else |
| | | pvLoad_TodayValuesButton.Y = Application.GetRealWidth(37); |
| | | pvLoad_TodayValuesButton.X = Application.GetRealWidth(81 - 16) - loadEle_TodayUintButton.Width; |