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 |   49 +++++++++++++++++++++++++++++--------------------
 1 files changed, 29 insertions(+), 20 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs
index fb7b707..c3d9e0b 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs
@@ -592,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;
+                                //    }
+                                //}
                             });
                         }
                     }
@@ -817,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;
+                                //    }
+                                //}
                             });
                         }
                     }

--
Gitblit v1.8.0