wxr
2024-10-18 a40848272e33822f72a7fe0310f079717bf73f23
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;
                                //    }
                                //}
                            });
                        }
                    }