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 |   70 +++++++++++++++++++++++-----------
 1 files changed, 47 insertions(+), 23 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs
index 02bbf02..c3d9e0b 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs
@@ -143,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);
 
@@ -202,6 +202,7 @@
                 TextColor = CSS_Color.MainBackgroundColor,
                 TextSize = 18,
                 IsBold = true,
+                FontName = "BEBAS",
             };
             electricityGenerationView.AddChidren(pvGenerate_TodayValuesButton);
 
@@ -304,6 +305,7 @@
                 TextSize = 18,
                 TextAlignment = TextAlignment.TopRight,
                 IsBold = true,
+                FontName = "BEBAS",
             };
 #if __IOS__
             pvLoad_TodayValuesButton.Y = Application.GetRealWidth(34);
@@ -463,6 +465,7 @@
                 TextColor = CSS_Color.FirstLevelTitleColor,
                 TextSize = 24,
                 IsBold = true,
+                FontName = "BEBAS",
             };
             powerGenerationView.AddChidren(pvPower_ValuesButton);
 
@@ -492,6 +495,7 @@
                 TextColor = CSS_Color.FirstLevelTitleColor,
                 TextSize = 18,
                 IsBold = true,
+                FontName = "BEBAS",
             };
             pvEleGenerationInfoView.AddChidren(pvGeneration_TodayValuesButton);
 
@@ -521,6 +525,7 @@
                 TextColor = CSS_Color.FirstLevelTitleColor,
                 TextSize = 18,
                 IsBold = true,
+                FontName = "BEBAS",
             };
             pvEleGenerationInfoView.AddChidren(pvGeneration_MonthValuesButton);
 
@@ -550,6 +555,7 @@
                 TextColor = CSS_Color.FirstLevelTitleColor,
                 TextSize = 18,
                 IsBold = true,
+                FontName = "BEBAS",
             };
             pvEleGenerationInfoView.AddChidren(pvGeneration_YearValuesButton);
 
@@ -586,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;
+                                //    }
+                                //}
                             });
                         }
                     }
@@ -686,6 +696,7 @@
                 TextColor = CSS_Color.FirstLevelTitleColor,
                 TextSize = 24,
                 IsBold = true,
+                FontName = "BEBAS",
             };
             powerUsageView.AddChidren(loadElec_ValuesButton);
 
@@ -714,6 +725,7 @@
                 TextColor = CSS_Color.FirstLevelTitleColor,
                 TextSize = 18,
                 IsBold = true,
+                FontName = "BEBAS",
             };
             electricityUsageStatusView.AddChidren(powerUsage_TodayValuesButton);
 
@@ -741,6 +753,7 @@
                 TextColor = CSS_Color.FirstLevelTitleColor,
                 TextSize = 18,
                 IsBold = true,
+                FontName = "BEBAS",
             };
             electricityUsageStatusView.AddChidren(loadElec_MonthValuesButton);
 
@@ -769,6 +782,7 @@
                 TextColor = CSS_Color.FirstLevelTitleColor,
                 TextSize = 18,
                 IsBold = true,
+                FontName = "BEBAS",
             };
             electricityUsageStatusView.AddChidren(powerUsage_YearValuesButton);
 
@@ -807,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;
+                                //    }
+                                //}
                             });
                         }
                     }
@@ -953,6 +972,7 @@
                     TextColor = CSS_Color.FirstLevelTitleColor,
                     TextSize = 24,
                     IsBold = true,
+                FontName = "BEBAS",
                 };
                 esRunStatus_ChargeValuesView.AddChidren(esRunStatus_ChargeValuesButton);
 
@@ -987,6 +1007,7 @@
                     TextColor = CSS_Color.FirstLevelTitleColor,
                     TextSize = 24,
                     IsBold = true,
+                FontName = "BEBAS",
                 };
                 esRunStatus_DischargeValuesView.AddChidren(esRunStatus_DischargeValuesButton);
 
@@ -996,7 +1017,7 @@
                     Y = Application.GetRealWidth(76),
                     Height = Application.GetRealWidth(17),
                     TextAlignment = TextAlignment.Center,
-                    Text = "瀹炴椂鏀剧數鍔熺巼(kwh)",
+                    Text = "瀹炴椂鏀剧數鍔熺巼(kw)",
                     TextColor = CSS_Color.TextualColor,
                     TextSize = 12,
                 };
@@ -1031,7 +1052,7 @@
             {
                 Gravity = Gravity.CenterHorizontal,
                 Width = Application.GetRealWidth(343),
-                Height = Application.GetRealHeight(142),
+                Height = Application.GetRealWidth(142),//142
                 ScrollEnabled = false,
             };
             contentView.AddChidren(socialContributionView);
@@ -1066,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);
@@ -1135,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);
@@ -1204,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);

--
Gitblit v1.8.0