From a40848272e33822f72a7fe0310f079717bf73f23 Mon Sep 17 00:00:00 2001 From: wxr <wxr@hdlchina.com.cn> Date: 星期五, 18 十月 2024 16:21:39 +0800 Subject: [PATCH] 修复金茂科技系统,金茂光伏问题 --- HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs | 95 +++++++++++++++++++++++++++++++++++------------ 1 files changed, 71 insertions(+), 24 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs index b5397a1..c3d9e0b 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs @@ -29,6 +29,10 @@ /// </summary> Button pvLoad_TodayValuesButton; /// <summary> + /// 浠婃棩鐢ㄧ數閲忓崟浣嶆寜閽� + /// </summary> + Button loadEle_TodayUintButton; + /// <summary> /// 绱鐢ㄧ數閲忔暟鎹寜閽� /// </summary> Button pvLoad_TotalValuesButton; @@ -139,7 +143,7 @@ var contentView = new VerticalScrolViewLayout() { Y = Application.GetRealHeight(74), - Height = Application.GetRealHeight(Application.DesignHeight - 74), + Height = Application.GetRealHeight(Application.DesignHeight)- Application.GetRealHeight(74), }; bodyView.AddChidren(contentView); @@ -198,6 +202,7 @@ TextColor = CSS_Color.MainBackgroundColor, TextSize = 18, IsBold = true, + FontName = "BEBAS", }; electricityGenerationView.AddChidren(pvGenerate_TodayValuesButton); @@ -272,7 +277,7 @@ loadEleView.AddChidren(loadEle_TodayTextButton); - var loadEle_TodayUintButton = new Button() + loadEle_TodayUintButton = new Button() { Y = Application.GetRealWidth(43), Height = Application.GetRealWidth(17), @@ -300,8 +305,11 @@ TextSize = 18, TextAlignment = TextAlignment.TopRight, IsBold = true, + FontName = "BEBAS", }; #if __IOS__ + pvLoad_TodayValuesButton.Y = Application.GetRealWidth(34); + pvLoad_TodayValuesButton.X = Application.GetRealWidth(81 - 12) - loadEle_TodayUintButton.Width; #else pvLoad_TodayValuesButton.Y = Application.GetRealWidth(37); pvLoad_TodayValuesButton.X = Application.GetRealWidth(81 - 16) - loadEle_TodayUintButton.Width; @@ -457,6 +465,7 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextSize = 24, IsBold = true, + FontName = "BEBAS", }; powerGenerationView.AddChidren(pvPower_ValuesButton); @@ -486,6 +495,7 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextSize = 18, IsBold = true, + FontName = "BEBAS", }; pvEleGenerationInfoView.AddChidren(pvGeneration_TodayValuesButton); @@ -515,6 +525,7 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextSize = 18, IsBold = true, + FontName = "BEBAS", }; pvEleGenerationInfoView.AddChidren(pvGeneration_MonthValuesButton); @@ -544,6 +555,7 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextSize = 18, IsBold = true, + FontName = "BEBAS", }; pvEleGenerationInfoView.AddChidren(pvGeneration_YearValuesButton); @@ -580,17 +592,21 @@ Application.RunOnMainThread(() => { pvGeneration_YearValuesButton.Text = totalValues.ToString(); - while (true) + if (pvGeneration_YearValuesButton.Width < pvGeneration_YearValuesButton.GetTextWidth()) { - if (pvGeneration_YearValuesButton.Width < pvGeneration_YearValuesButton.GetTextWidth()) - { - pvGeneration_YearValuesButton.TextSize--; - } - else - { - break; - } + pvGeneration_YearValuesButton.TextSize = 12; } + //while (true) + //{ + // if (pvGeneration_YearValuesButton.Width < pvGeneration_YearValuesButton.GetTextWidth()) + // { + // pvGeneration_YearValuesButton.TextSize=12; + // } + // else + // { + // break; + // } + //} }); } } @@ -680,6 +696,7 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextSize = 24, IsBold = true, + FontName = "BEBAS", }; powerUsageView.AddChidren(loadElec_ValuesButton); @@ -708,6 +725,7 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextSize = 18, IsBold = true, + FontName = "BEBAS", }; electricityUsageStatusView.AddChidren(powerUsage_TodayValuesButton); @@ -735,6 +753,7 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextSize = 18, IsBold = true, + FontName = "BEBAS", }; electricityUsageStatusView.AddChidren(loadElec_MonthValuesButton); @@ -763,6 +782,7 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextSize = 18, IsBold = true, + FontName = "BEBAS", }; electricityUsageStatusView.AddChidren(powerUsage_YearValuesButton); @@ -801,17 +821,22 @@ Application.RunOnMainThread(() => { powerUsage_YearValuesButton.Text = totalValues.ToString(); - while (true) - { - if (powerUsage_YearValuesButton.Width < powerUsage_YearValuesButton.GetTextWidth()) - { - powerUsage_YearValuesButton.TextSize--; - } - else - { - break; - } - } + powerUsage_YearValuesButton.TextSize=12; + //while (true) + //{ + // if (powerUsage_YearValuesButton.Width < powerUsage_YearValuesButton.GetTextWidth()) + // { + // powerUsage_YearValuesButton.TextSize-=1; + // if (powerUsage_YearValuesButton.TextSize <= 10) + // { + // break; + // } + // } + // else + // { + // break; + // } + //} }); } } @@ -947,6 +972,7 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextSize = 24, IsBold = true, + FontName = "BEBAS", }; esRunStatus_ChargeValuesView.AddChidren(esRunStatus_ChargeValuesButton); @@ -981,6 +1007,7 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextSize = 24, IsBold = true, + FontName = "BEBAS", }; esRunStatus_DischargeValuesView.AddChidren(esRunStatus_DischargeValuesButton); @@ -990,7 +1017,7 @@ Y = Application.GetRealWidth(76), Height = Application.GetRealWidth(17), TextAlignment = TextAlignment.Center, - Text = "瀹炴椂鏀剧數鍔熺巼(kwh)", + Text = "瀹炴椂鏀剧數鍔熺巼(kw)", TextColor = CSS_Color.TextualColor, TextSize = 12, }; @@ -1025,7 +1052,7 @@ { Gravity = Gravity.CenterHorizontal, Width = Application.GetRealWidth(343), - Height = Application.GetRealHeight(142), + Height = Application.GetRealWidth(142),//142 ScrollEnabled = false, }; contentView.AddChidren(socialContributionView); @@ -1060,6 +1087,7 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextAlignment = TextAlignment.BottomLeft, IsBold = true, + FontName = "BEBAS", }; socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth() + Application.GetRealWidth(8); socialContribution_InfoView_1.AddChidren(socialContribution_Info1_ValuesButton); @@ -1129,6 +1157,7 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextAlignment = TextAlignment.BottomLeft, IsBold = true, + FontName = "BEBAS", }; socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth() + Application.GetRealWidth(8); socialContribution_InfoView_2.AddChidren(socialContribution_Info2_ValuesButton); @@ -1198,6 +1227,7 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextAlignment = TextAlignment.BottomLeft, IsBold = true, + FontName = "BEBAS", }; socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth() + Application.GetRealWidth(8); socialContribution_InfoView_3.AddChidren(socialContribution_Info3_ValuesButton); @@ -1295,6 +1325,15 @@ private void upatePvGenerateTodayValues() { pvGenerate_TodayValuesButton.Text = pvGeneration_TodayValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.pv_electricity_today.ToString()); + +#if __IOS__ + pvGenerate_TodayValuesButton.TextAlignment = TextAlignment.TopLeft; + pvGenerate_TodayValuesButton.Width = pvGenerate_TodayValuesButton.GetTextWidth() + Application.GetRealWidth(8); +#else + pvGenerate_TodayValuesButton.TextAlignment = TextAlignment.BottomLeft; + pvGenerate_TodayValuesButton.Y = Application.GetRealWidth(37); + pvGenerate_TodayValuesButton.Width = pvGenerate_TodayValuesButton.GetTextWidth() + Application.GetRealWidth(4); +#endif pvGenerate_todayUintButton.X = pvGenerate_TodayValuesButton.Right; } /// <summary> @@ -1317,6 +1356,14 @@ private void upatePvLoadTodayValues() { pvLoad_TodayValuesButton.Text = powerUsage_TodayValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.load_electricity_today.ToString()); + +#if __IOS__ + pvLoad_TodayValuesButton.Y = Application.GetRealWidth(34); + pvLoad_TodayValuesButton.X = Application.GetRealWidth(81 - 12) - loadEle_TodayUintButton.Width; +#else + pvLoad_TodayValuesButton.Y = Application.GetRealWidth(37); + pvLoad_TodayValuesButton.X = Application.GetRealWidth(81 - 16) - loadEle_TodayUintButton.Width; +#endif } /// <summary> /// 鏇存柊鏈湀鐢ㄧ數閲� -- Gitblit v1.8.0