From eeb6f0b4bf0a81834325638401d5fa404e53db93 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期四, 05 九月 2024 19:41:45 +0800
Subject: [PATCH] 金茂光伏储能,热水器;自动化,空调,地暖步进判断

---
 HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs |  713 +++++++++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 593 insertions(+), 120 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs
index 5de0923..5345a30 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs
@@ -1,4 +1,7 @@
 锘縰sing System;
+using System.Collections.Generic;
+using HDL_ON.DAL.Server;
+using HDL_ON.DriverLayer;
 using HDL_ON.Entity;
 using HDL_ON.UI.CSS;
 using Shared;
@@ -9,6 +12,110 @@
     {
         FrameLayout bodyView;
         Function function;
+        /// <summary>
+        /// 浠婃棩鍙戠數閲忔暟鎹寜閽�
+        /// </summary>
+        Button pvGenerate_TodayValuesButton;
+        /// <summary>
+        /// 浠婃棩鍙戠數閲忓崟浣嶆寜閽�
+        /// </summary>
+        Button pvGenerate_todayUintButton;
+        /// <summary>
+        /// 绱鍙戠數閲忔暟鎹寜閽�
+        /// </summary>
+        Button pvGenerate_TotalValuesButton;
+        /// <summary>
+        /// 浠婃棩鐢ㄧ數閲忔暟鎹寜閽�
+        /// </summary>
+        Button pvLoad_TodayValuesButton;
+        /// <summary>
+        /// 绱鐢ㄧ數閲忔暟鎹寜閽�
+        /// </summary>
+        Button pvLoad_TotalValuesButton;
+        /// <summary>
+        /// 鍏変紡杩愯鐘舵�佷俊鎭尯鍩�
+        /// </summary>
+        FrameLayout pvRunStatusInfoView;
+        /// <summary>
+        /// 鍏変紡杩愯鐘舵�佸浘鏍囨寜閽�
+        /// </summary>
+        Button pvRunStatus_IconButtonp;
+        /// <summary>
+        /// 鍏変紡杩愯鐘舵�佹枃鏈寜閽�
+        /// </summary>
+        Button pvRunStatus_TextButton;
+        /// <summary>
+        /// 鍏変紡鍙戠數鍔熻兘鏁版嵁鎸夐挳
+        /// </summary>
+        Button pvPower_ValuesButton;
+        /// <summary>
+        /// 鍏変紡浠婃棩鍙戠數閲忔暟鎹寜閽�
+        /// </summary>
+        Button pvGeneration_TodayValuesButton;
+        /// <summary>
+        /// 鍏変紡鏈湀鍙戠數閲忔暟鎹寜閽�
+        /// </summary>
+        Button pvGeneration_MonthValuesButton;
+        /// <summary>
+        /// 鍏変紡瀹炴椂鐢ㄧ數鍔熺巼鏁版嵁鎸夐挳
+        /// </summary>
+        Button loadElec_ValuesButton;
+        /// <summary>
+        /// 鍏変紡鐘舵�佷粖鏃ョ敤鐢甸噺鏁版嵁鎸夐挳
+        /// </summary>
+        Button loadElec_TodayTextButton;
+        /// <summary>
+        /// 鍏変紡鐘舵�佹湰鏈堢敤鐢甸噺鏁版嵁鎸夐挳
+        /// </summary>
+        Button loadElec_MonthValuesButton;
+        /// <summary>
+        /// 鍌ㄨ兘杩愯鐘舵�佷俊鎭尯鍩�
+        /// </summary>
+        FrameLayout esStatus_InfoView;
+        /// <summary>
+        /// 鍌ㄨ兘杩愯鐘舵�佸浘鏍囨寜閽�
+        /// </summary>
+        Button esRunStatus_Info_IconButton;
+        /// <summary>
+        /// 鍌ㄨ兘杩愯鐘舵�佹枃鏈寜閽�
+        /// </summary>
+        Button esRunStatus_Info_TextButton;
+        /// <summary>
+        /// 鍌ㄨ兘鐢垫睜鐘舵�佸浘鏍囨寜閽�
+        /// </summary>
+        Button esRunStatus_BatteryIconButton;
+        /// <summary>
+        /// 鍌ㄨ兘鐢垫睜鐘舵�佺櫨鍒嗘瘮鎸夐挳
+        /// </summary>
+        Button esRunStatus_BatteryValuesButton;
+        /// <summary>
+        /// 鍌ㄨ兘瀹炴椂鍏呯數鍔熺巼
+        /// </summary>
+        Button esRunStatus_ChargeValuesButton;
+        /// <summary>
+        /// 鍌ㄨ兘瀹炴椂鏀剧數鍔熺巼
+        /// </summary>
+        Button esRunStatus_DischargeValuesButton;
+
+        /// <summary>
+        /// </summary>
+        Button socialContribution_Info1_ValuesButton;
+        /// <summary>
+        /// </summary>
+        Button socialContribution_Info1_UintButton;
+        /// <summary>
+        /// </summary>
+        Button socialContribution_Info2_ValuesButton;
+        /// <summary>
+        /// </summary>
+        Button socialContribution_Info2_UintButton;
+        /// <summary>
+        /// </summary>
+        Button socialContribution_Info3_UintButton;
+        /// <summary>
+        /// </summary>
+        Button socialContribution_Info3_ValuesButton;
+
 
         public InverterJinmaoPage()
         {
@@ -59,7 +166,7 @@
             };
             electricityQuantityView.AddChidren(electricityGenerationView);
 
-            var electricityGeneration_IconButton = new Button()
+            var pv_IconButton = new Button()
             {
                 X = Application.GetRealWidth(14),
                 Y = Application.GetRealWidth(16),
@@ -67,9 +174,9 @@
                 Height = Application.GetRealWidth(12),
                 UnSelectedImagePath = "FunctionIcon/Acst/Inverter/ElectricityGenerationIcon.png"
             };
-            electricityQuantityView.AddChidren(electricityGeneration_IconButton);
+            electricityQuantityView.AddChidren(pv_IconButton);
 
-            var electricityGeneration_TextButton = new Button()
+            var pv_TextButton = new Button()
             {
                 X = Application.GetRealWidth(32),
                 Y = Application.GetRealWidth(12),
@@ -80,9 +187,9 @@
                 TextAlignment = TextAlignment.CenterLeft,
                 TextColor = CSS_Color.MainBackgroundColor,
             };
-            electricityGenerationView.AddChidren(electricityGeneration_TextButton);
+            electricityGenerationView.AddChidren(pv_TextButton);
 
-            var electricityGeneration_ValuesButton = new Button()
+            pvGenerate_TodayValuesButton = new Button()
             {
                 X = Application.GetRealWidth(12),
                 Y = Application.GetRealWidth(34),
@@ -92,28 +199,29 @@
                 TextSize = 18,
                 IsBold = true,
             };
-            electricityGenerationView.AddChidren(electricityGeneration_ValuesButton);
+            electricityGenerationView.AddChidren(pvGenerate_TodayValuesButton);
 
 #if __IOS__
-            electricityGeneration_ValuesButton.TextAlignment = TextAlignment.TopLeft;
-            electricityGeneration_ValuesButton.Width = electricityGeneration_ValuesButton.GetTextWidth() + Application.GetRealWidth(8);
+            pvGenerate_TodayValuesButton.TextAlignment = TextAlignment.TopLeft;
+            pvGenerate_TodayValuesButton.Width = pvGenerate_TodayValuesButton.GetTextWidth() + Application.GetRealWidth(6);
 #else
-            electricityGeneration_ValuesButton.TextAlignment = TextAlignment.BottomLeft;
-            electricityGeneration_ValuesButton.Width = electricityGeneration_ValuesButton.GetTextWidth();
+            pvGenerate_TodayValuesButton.TextAlignment = TextAlignment.BottomLeft;
+            pvGenerate_TodayValuesButton.Y = Application.GetRealWidth(37);
+            pvGenerate_TodayValuesButton.Width = pvGenerate_TodayValuesButton.GetTextWidth() + Application.GetRealWidth(4);
 #endif
-            var electricityGeneration_UintButton = new Button()
+            pvGenerate_todayUintButton = new Button()
             {
-                Y = Application.GetRealWidth(41),
+                Y = Application.GetRealWidth(43),
                 Height = Application.GetRealWidth(17),
-                Text = "kwh",
+                Text = "kw",
                 TextColor = CSS_Color.MainBackgroundColor,
                 TextSize = 12,
                 TextAlignment = TextAlignment.CenterLeft,
             };
-            electricityGeneration_UintButton.X = electricityGeneration_ValuesButton.Right;
-            electricityGenerationView.AddChidren(electricityGeneration_UintButton);
+            pvGenerate_todayUintButton.X = pvGenerate_TodayValuesButton.Right;
+            electricityGenerationView.AddChidren(pvGenerate_todayUintButton);
 
-            var electricityGeneration_TotalValuesButton = new Button()
+            pvGenerate_TotalValuesButton = new Button()
             {
                 X = Application.GetRealWidth(12),
                 Y = Application.GetRealWidth(69),
@@ -124,24 +232,23 @@
                 TextAlignment = TextAlignment.CenterLeft,
                 //IsBold = true,
             };
-            electricityGenerationView.AddChidren(electricityGeneration_TotalValuesButton);
+            electricityGenerationView.AddChidren(pvGenerate_TotalValuesButton);
 
 
 
             #endregion
 
-
             #region 鐢ㄧ數閲� Electricity consumption
-            var electricityConsumptionView = new FrameLayout()
+            var loadEleView = new FrameLayout()
             {
-                X = Application.GetRealWidth(178-16),
+                X = Application.GetRealWidth(178 - 16),
                 Width = Application.GetRealWidth(181),
                 Height = Application.GetRealWidth(99),
                 BackgroundImagePath = "FunctionIcon/Acst/Inverter/ElectricityConsumptionBg.png"
             };
-            electricityQuantityView.AddChidren(electricityConsumptionView);
+            electricityQuantityView.AddChidren(loadEleView);
 
-            var electricityConsumption_IconButton = new Button()
+            var loadEle_IconButton = new Button()
             {
                 X = Application.GetRealWidth(155),
                 Y = Application.GetRealWidth(16),
@@ -149,9 +256,9 @@
                 Height = Application.GetRealWidth(12),
                 UnSelectedImagePath = "FunctionIcon/Acst/Inverter/ElectricityConsumptionIcon.png"
             };
-            electricityConsumptionView.AddChidren(electricityConsumption_IconButton);
+            loadEleView.AddChidren(loadEle_IconButton);
 
-            var electricityConsumption_TextButton = new Button()
+            var loadEle_TodayTextButton = new Button()
             {
                 //X = Application.GetRealWidth(181 - 32),
                 Y = Application.GetRealWidth(12),
@@ -162,29 +269,29 @@
                 TextAlignment = TextAlignment.CenterRight,
                 TextColor = CSS_Color.MainBackgroundColor,
             };
-            electricityConsumptionView.AddChidren(electricityConsumption_TextButton);
+            loadEleView.AddChidren(loadEle_TodayTextButton);
 
 
-            var electricityConsumption_UintButton = new Button()
+            var loadEle_TodayUintButton = new Button()
             {
-                Y = Application.GetRealWidth(41),
+                Y = Application.GetRealWidth(43),
                 Height = Application.GetRealWidth(17),
-                Text = "kwh",
+                Text = "kw",
                 TextColor = CSS_Color.MainBackgroundColor,
                 TextSize = 12,
                 TextAlignment = TextAlignment.CenterRight,
             };
-            electricityConsumptionView.AddChidren(electricityConsumption_UintButton);
+            loadEleView.AddChidren(loadEle_TodayUintButton);
 #if __IOS__
-            electricityConsumption_UintButton.Width = electricityConsumption_UintButton.GetTextWidth() + Application.GetRealWidth(8);
+            loadEle_TodayUintButton.Width = loadEle_TodayUintButton.GetTextWidth() + Application.GetRealWidth(8);
 #else
-            electricityConsumption_UintButton.Width = electricityConsumption_UintButton.GetTextWidth();
+            loadEle_TodayUintButton.Width = loadEle_TodayUintButton.GetTextWidth();
 #endif
-            electricityConsumption_UintButton.X = Application.GetRealWidth(181 - 12) - electricityConsumption_UintButton.Width;
+            loadEle_TodayUintButton.X = Application.GetRealWidth(181 - 12) - loadEle_TodayUintButton.Width;
 
-            var electricityConsumption_ValuesButton = new Button()
+            pvLoad_TodayValuesButton = new Button()
             {
-                X = Application.GetRealWidth(81 - 12) - electricityConsumption_UintButton.Width,
+                X = Application.GetRealWidth(81 - 12) - loadEle_TodayUintButton.Width,
                 Y = Application.GetRealWidth(34),
                 Height = Application.GetRealWidth(53),
                 Width = Application.GetRealWidth(100),
@@ -194,27 +301,32 @@
                 TextAlignment = TextAlignment.TopRight,
                 IsBold = true,
             };
-            electricityConsumptionView.AddChidren(electricityConsumption_ValuesButton);
+#if __IOS__
+#else
+            pvLoad_TodayValuesButton.Y = Application.GetRealWidth(37);
+            pvLoad_TodayValuesButton.X = Application.GetRealWidth(81 - 16) - loadEle_TodayUintButton.Width;
+#endif
+            loadEleView.AddChidren(pvLoad_TodayValuesButton);
 
-
-            var electricityConsumption_TotalValuesButton = new Button()
+            pvLoad_TotalValuesButton = new Button()
             {
                 Y = Application.GetRealWidth(69),
                 Height = Application.GetRealWidth(18),
-                Width = Application.GetRealWidth(181-12),
+                Width = Application.GetRealWidth(181 - 12),
                 Text = "绱鐢ㄧ數閲忥細" + function.GetAttrState(InverterJinmao_AttrEnum.load_electricity.ToString()),
                 TextColor = CSS_Color.MainBackgroundColor,
                 TextSize = 12,
                 TextAlignment = TextAlignment.CenterRight,
                 //IsBold = true,
             };
-            electricityConsumptionView.AddChidren(electricityConsumption_TotalValuesButton);
+            loadEleView.AddChidren(pvLoad_TotalValuesButton);
 
             #endregion
 
             var goHistroyButton = new Button();
             electricityQuantityView.AddChidren(goHistroyButton);
-            goHistroyButton.MouseUpEventHandler = (sender, e) => {
+            goHistroyButton.MouseUpEventHandler = (sender, e) =>
+            {
                 var page = new InverterJinmaoHistroyPage(function);
                 MainPage.BasePageView.AddChidren(page);
                 page.LoadPage();
@@ -227,7 +339,7 @@
                 Height = Application.GetRealWidth(8),
             });
             #region 鍏変紡杩愯鐘舵��
-            var runStatus_TitleButton = new Button()
+            var pvRunStatus_TitleButton = new Button()
             {
                 X = Application.GetRealWidth(16),
                 Height = Application.GetRealWidth(47),
@@ -237,10 +349,9 @@
                 TextSize = 16,
                 IsBold = true,
             };
-            contentView.AddChidren(runStatus_TitleButton);
+            contentView.AddChidren(pvRunStatus_TitleButton);
 
-            #region 鍙戠數閲� electricity generation
-            var electricityGenerationStatusView = new FrameLayout()
+            var pvEleGenerationInfoView = new FrameLayout()
             {
                 Gravity = Gravity.CenterHorizontal,
                 Width = Application.GetRealWidth(343),
@@ -250,9 +361,10 @@
                 BorderColor = 0x00FFFFFF,
                 BorderWidth = 0,
             };
-            contentView.AddChidren(electricityGenerationStatusView);
+            contentView.AddChidren(pvEleGenerationInfoView);
 
-            var electricityGenerationStatus_InfoView = new FrameLayout()
+            #region 鍏変紡杩愯鐘舵��
+            pvRunStatusInfoView = new FrameLayout()
             {
                 X = 0 - Application.GetRealWidth(14),
                 Y = Application.GetRealWidth(12),
@@ -263,9 +375,9 @@
                 BorderColor = 0x00FFFFFF,
                 BorderWidth = 0,
             };
-            electricityGenerationStatusView.AddChidren(electricityGenerationStatus_InfoView);
+            pvEleGenerationInfoView.AddChidren(pvRunStatusInfoView);
 
-            var runStatus_Info_IconButton = new Button()
+            pvRunStatus_IconButtonp = new Button()
             {
                 X = Application.GetRealWidth(8 + 14),
                 Gravity = Gravity.CenterVertical,
@@ -273,9 +385,9 @@
                 Height = Application.GetRealWidth(12),
                 UnSelectedImagePath = "FunctionIcon/Acst/Inverter/PvIconRun.png",
             };
-            electricityGenerationStatus_InfoView.AddChidren(runStatus_Info_IconButton);
+            pvRunStatusInfoView.AddChidren(pvRunStatus_IconButtonp);
 
-            var runStatus_Info_TextButton = new Button()
+            pvRunStatus_TextButton = new Button()
             {
                 X = Application.GetRealWidth(8 + 14 + 4 + 12),
                 TextAlignment = TextAlignment.CenterLeft,
@@ -283,7 +395,7 @@
                 TextColor = 0xFF4484F4,
                 Text = "杩愯",
             };
-            electricityGenerationStatus_InfoView.AddChidren(runStatus_Info_TextButton);
+            pvRunStatusInfoView.AddChidren(pvRunStatus_TextButton);
 
             var powerGenerationView = new FrameLayout()
             {
@@ -291,11 +403,49 @@
                 Y = Application.GetRealWidth(20),
                 Width = Application.GetRealWidth(151),
                 Height = Application.GetRealWidth(151),
-                BackgroundImagePath = "FunctionIcon/Acst/Inverter/PvBgRun.png"
             };
-            electricityGenerationStatusView.AddChidren(powerGenerationView);
+            pvEleGenerationInfoView.AddChidren(powerGenerationView);
 
-            var powerGeneration_ValuesButton = new Button()
+            var powerGenerationBg = new Button()
+            {
+                UnSelectedImagePath = "FunctionIcon/Acst/Inverter/PvBgRun.png"
+            };
+            powerGenerationView.AddChidren(powerGenerationBg);
+
+            new System.Threading.Thread(() =>
+            {
+                try
+                {
+                    int index = 1;
+                    while (index < 361)
+                    {
+                        if (function.GetAttrState(InverterJinmao_AttrEnum.pv_power.ToString()) == "0")
+                        {
+                            continue;
+                        }
+                        Application.RunOnMainThread(() =>
+                        {
+                            powerGenerationBg.SetRotation(1f * index++);
+                        });
+                        System.Threading.Thread.Sleep(50);
+                        if (index == 361)
+                        {
+                            index = 1;
+                        }
+                    }
+                }
+                catch (Exception ex)
+                {
+                    MainPage.Log("Error", $"閲戣寕UI鎺т欢鏃嬭浆寮傚父:{ex.Message}");
+                }
+            })
+            { IsBackground = true }.Start();
+
+            #endregion
+
+            #region 鍏変紡鍙戠數閲�
+            #region 鍏変紡鍙戠數鍔熺巼
+            pvPower_ValuesButton = new Button()
             {
                 Gravity = Gravity.CenterHorizontal,
                 Y = Application.GetRealWidth(46),
@@ -307,7 +457,7 @@
                 TextSize = 24,
                 IsBold = true,
             };
-            powerGenerationView.AddChidren(powerGeneration_ValuesButton);
+            powerGenerationView.AddChidren(pvPower_ValuesButton);
 
             var powerGeneration_TextButton = new Button()
             {
@@ -321,9 +471,10 @@
                 TextSize = 12,
             };
             powerGenerationView.AddChidren(powerGeneration_TextButton);
+            #endregion
 
-
-            var powerGeneration_TodayValuesButton = new Button()
+            #region 鍏変紡浠婃棩鍙戠數閲�
+            pvGeneration_TodayValuesButton = new Button()
             {
                 X = Application.GetRealWidth(16),
                 Y = Application.GetRealWidth(191),
@@ -335,7 +486,7 @@
                 TextSize = 18,
                 IsBold = true,
             };
-            electricityGenerationStatusView.AddChidren(powerGeneration_TodayValuesButton);
+            pvEleGenerationInfoView.AddChidren(pvGeneration_TodayValuesButton);
 
             var powerGeneration_TodayTextButton = new Button()
             {
@@ -343,15 +494,16 @@
                 Y = Application.GetRealWidth(220),
                 Width = Application.GetRealWidth(100),
                 Height = Application.GetRealWidth(17),
-                Text = "浠婃棩鍙戠數閲� (kwh)",
+                Text = "浠婃棩鍙戠數閲� (kw)",
                 TextAlignment = TextAlignment.Center,
                 TextColor = CSS_Color.TextualColor,
                 TextSize = 12,
             };
-            electricityGenerationStatusView.AddChidren(powerGeneration_TodayTextButton);
+            pvEleGenerationInfoView.AddChidren(powerGeneration_TodayTextButton);
+            #endregion
 
-
-            var powerGeneration_MonthValuesButton = new Button()
+            #region 鍏変紡鏈湀鍙戠數閲�
+            pvGeneration_MonthValuesButton = new Button()
             {
                 X = Application.GetRealWidth(16 + 105),
                 Y = Application.GetRealWidth(191),
@@ -363,7 +515,7 @@
                 TextSize = 18,
                 IsBold = true,
             };
-            electricityGenerationStatusView.AddChidren(powerGeneration_MonthValuesButton);
+            pvEleGenerationInfoView.AddChidren(pvGeneration_MonthValuesButton);
 
             var powerGeneration_MonthTextButton = new Button()
             {
@@ -371,27 +523,28 @@
                 Y = Application.GetRealWidth(220),
                 Width = Application.GetRealWidth(100),
                 Height = Application.GetRealWidth(17),
-                Text = "鏈湀鍙戠數閲� (kwh)",
+                Text = "鏈湀鍙戠數閲� (kw)",
                 TextAlignment = TextAlignment.Center,
                 TextColor = CSS_Color.TextualColor,
                 TextSize = 12,
             };
-            electricityGenerationStatusView.AddChidren(powerGeneration_MonthTextButton);
+            pvEleGenerationInfoView.AddChidren(powerGeneration_MonthTextButton);
+            #endregion
 
-
-            var powerGeneration_YearValuesButton = new Button()
+            #region 鍏変紡鏈勾鍙戠數閲�
+            var pvGeneration_YearValuesButton = new Button()
             {
                 X = Application.GetRealWidth(16 + 212),
                 Y = Application.GetRealWidth(191),
                 Width = Application.GetRealWidth(100),
                 Height = Application.GetRealWidth(24),
-                Text = function.GetAttrState(InverterJinmao_AttrEnum.pv_electricity.ToString()),
+                Text = "---",
                 TextAlignment = TextAlignment.Center,
                 TextColor = CSS_Color.FirstLevelTitleColor,
                 TextSize = 18,
                 IsBold = true,
             };
-            electricityGenerationStatusView.AddChidren(powerGeneration_YearValuesButton);
+            pvEleGenerationInfoView.AddChidren(pvGeneration_YearValuesButton);
 
             var powerGeneration_YearTextButton = new Button()
             {
@@ -399,12 +552,57 @@
                 Y = Application.GetRealWidth(220),
                 Width = Application.GetRealWidth(100),
                 Height = Application.GetRealWidth(17),
-                Text = "鎬诲彂鐢甸噺 (kwh)",
+                Text = "鏈勾鍙戠數閲� (kw)",
                 TextAlignment = TextAlignment.Center,
                 TextColor = CSS_Color.TextualColor,
                 TextSize = 12,
             };
-            electricityGenerationStatusView.AddChidren(powerGeneration_YearTextButton);
+            pvEleGenerationInfoView.AddChidren(powerGeneration_YearTextButton);
+            new System.Threading.Thread(() =>
+            {
+                try
+                {
+                    var revertObj = new HttpServerRequest().GetSensorHistory("custom_year",
+                        function.deviceId, InverterJinmao_AttrEnum.load_electricity.ToString(), DateTime.Now.Year.ToString());
+                    if (revertObj != null)
+                    {
+                        if (revertObj.Code == StateCode.SUCCESS)
+                        {
+                            var revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<EnvironmentalSensorHistor>>(revertObj.Data.ToString());
+                            double totalValues = 0.0;
+                            double values = 0.0;
+                            foreach (var data in revertData)
+                            {
+                                double.TryParse(data.fieldValue, out values);
+                                totalValues += values;
+                            }
+                            Application.RunOnMainThread(() =>
+                            {
+                                pvGeneration_YearValuesButton.Text = totalValues.ToString();
+                                while (true)
+                                {
+                                    if (pvGeneration_YearValuesButton.Width < pvGeneration_YearValuesButton.GetTextWidth())
+                                    {
+                                        pvGeneration_YearValuesButton.TextSize--;
+                                    }
+                                    else
+                                    {
+                                        break;
+                                    }
+                                }
+                            });
+                        }
+                    }
+                }
+                catch (Exception ex)
+                {
+                    MainPage.Log("Error", "璇诲彇閲戣寕鏈勾鍙戠數閲忔暟鎹紓甯革細" + ex.Message);
+                }
+            })
+            { IsBackground = true }.Start();
+
+            #endregion
+           
             #endregion
 
             contentView.AddChidren(new Button()
@@ -431,11 +629,45 @@
                 Y = Application.GetRealWidth(20),
                 Width = Application.GetRealWidth(151),
                 Height = Application.GetRealWidth(151),
-                BackgroundImagePath = "FunctionIcon/Acst/Inverter/PvBgDischarge.png"
             };
             electricityUsageStatusView.AddChidren(powerUsageView);
 
-            var powerUsage_ValuesButton = new Button()
+            var powerUsageBg = new Button()
+            {
+                UnSelectedImagePath = "FunctionIcon/Acst/Inverter/PvBgDischarge.png"
+            };
+            powerUsageView.AddChidren(powerUsageBg);
+
+            new System.Threading.Thread(() =>
+            {
+                try
+                {
+                    int index = 1;
+                    while (index < 361)
+                    {
+                        if (function.GetAttrState(InverterJinmao_AttrEnum.load_active_power.ToString()) == "0")
+                        {
+                            continue;
+                        }
+                        Application.RunOnMainThread(() =>
+                        {
+                            powerUsageBg.SetRotation(1f * index++);
+                        });
+                        System.Threading.Thread.Sleep(50);
+                        if (index == 361)
+                        {
+                            index = 1;
+                        }
+                    }
+                }
+                catch (Exception ex)
+                {
+                    MainPage.Log("Error", $"閲戣寕UI鎺т欢鏃嬭浆寮傚父2:{ex.Message}");
+                }
+            })
+            { IsBackground = true }.Start();
+
+            loadElec_ValuesButton = new Button()
             {
                 Gravity = Gravity.CenterHorizontal,
                 Y = Application.GetRealWidth(46),
@@ -447,7 +679,7 @@
                 TextSize = 24,
                 IsBold = true,
             };
-            powerUsageView.AddChidren(powerUsage_ValuesButton);
+            powerUsageView.AddChidren(loadElec_ValuesButton);
 
             var powerUsage_TextButton = new Button()
             {
@@ -477,21 +709,20 @@
             };
             electricityUsageStatusView.AddChidren(powerUsage_TodayValuesButton);
 
-            var powerUsage_TodayTextButton = new Button()
+            loadElec_TodayTextButton = new Button()
             {
                 X = Application.GetRealWidth(16),
                 Y = Application.GetRealWidth(220),
                 Width = Application.GetRealWidth(100),
                 Height = Application.GetRealWidth(17),
-                Text = "浠婃棩鐢ㄧ數閲� (kwh)",
+                Text = "浠婃棩鐢ㄧ數閲� (kw)",
                 TextAlignment = TextAlignment.Center,
                 TextColor = CSS_Color.TextualColor,
                 TextSize = 12,
             };
-            electricityUsageStatusView.AddChidren(powerUsage_TodayTextButton);
+            electricityUsageStatusView.AddChidren(loadElec_TodayTextButton);
 
-
-            var powerUsage_MonthValuesButton = new Button()
+            loadElec_MonthValuesButton = new Button()
             {
                 X = Application.GetRealWidth(16 + 105),
                 Y = Application.GetRealWidth(191),
@@ -503,7 +734,7 @@
                 TextSize = 18,
                 IsBold = true,
             };
-            electricityUsageStatusView.AddChidren(powerUsage_MonthValuesButton);
+            electricityUsageStatusView.AddChidren(loadElec_MonthValuesButton);
 
             var powerUsage_MonthTextButton = new Button()
             {
@@ -511,7 +742,7 @@
                 Y = Application.GetRealWidth(220),
                 Width = Application.GetRealWidth(100),
                 Height = Application.GetRealWidth(17),
-                Text = "鏈湀鐢ㄧ數閲� (kwh)",
+                Text = "鏈湀鐢ㄧ數閲� (kw)",
                 TextAlignment = TextAlignment.Center,
                 TextColor = CSS_Color.TextualColor,
                 TextSize = 12,
@@ -539,15 +770,13 @@
                 Y = Application.GetRealWidth(220),
                 Width = Application.GetRealWidth(100),
                 Height = Application.GetRealWidth(17),
-                Text = "鎬荤敤鐢甸噺 (kwh)",
+                Text = "鏈勾鐢ㄧ數閲� (kw)",
                 TextAlignment = TextAlignment.Center,
                 TextColor = CSS_Color.TextualColor,
                 TextSize = 12,
             };
             electricityUsageStatusView.AddChidren(powerUsage_YearTextButton);
             #endregion
-
-
 
 
             #endregion
@@ -583,7 +812,7 @@
             };
             contentView.AddChidren(esStatusView);
 
-            var esStatus_InfoView = new FrameLayout()
+            esStatus_InfoView = new FrameLayout()
             {
                 X = 0 - Application.GetRealWidth(14),
                 Y = Application.GetRealWidth(12),
@@ -596,7 +825,7 @@
             };
             esStatusView.AddChidren(esStatus_InfoView);
 
-            var esRunStatus_Info_IconButton = new Button()
+            esRunStatus_Info_IconButton = new Button()
             {
                 X = Application.GetRealWidth(8 + 14),
                 Gravity = Gravity.CenterVertical,
@@ -606,7 +835,7 @@
             };
             esStatus_InfoView.AddChidren(esRunStatus_Info_IconButton);
 
-            var esRunStatus_Info_TextButton = new Button()
+            esRunStatus_Info_TextButton = new Button()
             {
                 X = Application.GetRealWidth(8 + 14 + 4 + 12),
                 TextAlignment = TextAlignment.CenterLeft,
@@ -616,7 +845,7 @@
             };
             esStatus_InfoView.AddChidren(esRunStatus_Info_TextButton);
 
-            var esRunStatus_BatteryValuesButton = new Button()
+            esRunStatus_BatteryValuesButton = new Button()
             {
                 Y = Application.GetRealWidth(18),
                 Height = Application.GetRealWidth(17),
@@ -625,28 +854,26 @@
                 TextSize = 12,
                 TextColor = 0xFF00C22D,
             };
-#if __IOS__
             esRunStatus_BatteryValuesButton.Width = esRunStatus_BatteryValuesButton.GetTextWidth() + Application.GetRealWidth(8);
-#else
-            esRunStatus_BatteryValuesButton.Width = esRunStatus_BatteryValuesButton.GetTextWidth();
-#endif
             esRunStatus_BatteryValuesButton.X = Application.GetRealWidth(343 - 12) - esRunStatus_BatteryValuesButton.Width;
             esStatusView.AddChidren(esRunStatus_BatteryValuesButton);
 
-            var esRunStatus_BatteryIconButton = new Button()
+            esRunStatus_BatteryIconButton = new Button()
             {
-                X = Application.GetRealWidth(343 - 12 -20) - esRunStatus_BatteryValuesButton.Width,
+                X = Application.GetRealWidth(343 - 12 - 20) - esRunStatus_BatteryValuesButton.Width,
                 Y = Application.GetRealWidth(16),
                 Width = Application.GetRealWidth(20),
                 Height = Application.GetRealWidth(20),
                 UnSelectedImagePath = "FunctionIcon/Acst/Inverter/BatteryIconCharg.png",
+                SelectedImagePath = "FunctionIcon/Acst/Inverter/BatteryIconCharg100.png",
+                IsSelected = esRunStatus_BatteryValuesButton.Text == "100%"
             };
             esStatusView.AddChidren(esRunStatus_BatteryIconButton);
 
             var esRunStatus_ValuesInfoView = new FrameLayout()
             {
-                Width = Application.GetRealWidth(263),
-                Height = Application.GetRealWidth(134),
+                Width = Application.GetRealWidth(282),
+                Height = Application.GetRealWidth(153),
                 Gravity = Gravity.CenterHorizontal,
                 Y = Application.GetRealWidth(40),
                 BackgroundImagePath = "FunctionIcon/Acst/Inverter/EnergyStorageStatusBg.png",
@@ -656,13 +883,13 @@
             #region 瀹炴椂鍏呯數鍔熺巼
             var esRunStatus_ChargeValuesView = new FrameLayout()
             {
-                X = Application.GetRealWidth(2),
+                X = Application.GetRealWidth(15),
                 Width = Application.GetRealWidth(128),
                 Height = Application.GetRealWidth(128),
             };
             esRunStatus_ValuesInfoView.AddChidren(esRunStatus_ChargeValuesView);
 
-            var esRunStatus_ChargeValuesButton = new Button()
+            esRunStatus_ChargeValuesButton = new Button()
             {
                 Y = Application.GetRealWidth(36),
                 Height = Application.GetRealWidth(32),
@@ -687,16 +914,16 @@
             esRunStatus_ChargeValuesView.AddChidren(esRunStatus_ChargeTextButton);
             #endregion
 
-            #region 瀹炴椂鏀剧數鍔熺巼
+            #region 瀹炴椂鐢ㄧ數鍔熺巼
             var esRunStatus_DischargeValuesView = new FrameLayout()
             {
-                X = Application.GetRealWidth(132),
+                X = Application.GetRealWidth(132+13),
                 Width = Application.GetRealWidth(128),
                 Height = Application.GetRealWidth(128),
             };
             esRunStatus_ValuesInfoView.AddChidren(esRunStatus_DischargeValuesView);
 
-            var esRunStatus_DischargeValuesButton = new Button()
+            esRunStatus_DischargeValuesButton = new Button()
             {
                 Y = Application.GetRealWidth(36),
                 Height = Application.GetRealWidth(32),
@@ -726,7 +953,6 @@
             #endregion
 
             #endregion
-
 
             contentView.AddChidren(new Button()
             {
@@ -774,7 +1000,7 @@
             };
             socialContribution_InfoView_1.AddChidren(socialContribution_Info1_IconButton);
 
-            var socialContribution_Info1_ValuesButton = new Button()
+            socialContribution_Info1_ValuesButton = new Button()
             {
                 X = Application.GetRealWidth(12),
                 Y = Application.GetRealWidth(68),
@@ -786,14 +1012,10 @@
                 TextAlignment = TextAlignment.BottomLeft,
                 IsBold = true,
             };
-#if __IOS__
             socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth() + Application.GetRealWidth(8);
-#else
-            socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth();
-#endif
             socialContribution_InfoView_1.AddChidren(socialContribution_Info1_ValuesButton);
 
-            var socialContribution_Info1_UintButton = new Button()
+            socialContribution_Info1_UintButton = new Button()
             {
                 X = socialContribution_Info1_ValuesButton.Right - Application.GetRealWidth(4),
                 Y = Application.GetRealWidth(68),
@@ -844,7 +1066,7 @@
             };
             socialContribution_InfoView_2.AddChidren(socialContribution_Info2_IconButton);
 
-            var socialContribution_Info2_ValuesButton = new Button()
+            socialContribution_Info2_ValuesButton = new Button()
             {
                 X = Application.GetRealWidth(12),
                 Y = Application.GetRealWidth(68),
@@ -856,14 +1078,10 @@
                 TextAlignment = TextAlignment.BottomLeft,
                 IsBold = true,
             };
-#if __IOS__
             socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth() + Application.GetRealWidth(8);
-#else
-            socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth();
-#endif
             socialContribution_InfoView_2.AddChidren(socialContribution_Info2_ValuesButton);
 
-            var socialContribution_Info2_UintButton = new Button()
+            socialContribution_Info2_UintButton = new Button()
             {
                 X = socialContribution_Info2_ValuesButton.Right - Application.GetRealWidth(4),
                 Y = Application.GetRealWidth(68),
@@ -914,7 +1132,7 @@
             };
             socialContribution_InfoView_3.AddChidren(socialContribution_Info3_IconButton);
 
-            var socialContribution_Info3_ValuesButton = new Button()
+            socialContribution_Info3_ValuesButton = new Button()
             {
                 X = Application.GetRealWidth(12),
                 Y = Application.GetRealWidth(68),
@@ -926,14 +1144,10 @@
                 TextAlignment = TextAlignment.BottomLeft,
                 IsBold = true,
             };
-#if __IOS__
             socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth() + Application.GetRealWidth(8);
-#else
-            socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth();
-#endif
             socialContribution_InfoView_3.AddChidren(socialContribution_Info3_ValuesButton);
 
-            var socialContribution_Info3_UintButton = new Button()
+            socialContribution_Info3_UintButton = new Button()
             {
                 X = socialContribution_Info3_ValuesButton.Right - Application.GetRealWidth(4),
                 Y = Application.GetRealWidth(68),
@@ -964,7 +1178,266 @@
 
             #endregion
 
+            Control.Ins.SendReadCommand(function);
+        }
+        /// <summary>
+        /// 鏇存柊鐣岄潰鏁版嵁
+        /// </summary>
+        /// <param name="temp"></param>
+        public void UpdateStatus(Function temp)
+        {
+            if (bodyView == null)
+            {
+                return;
+            }
+            Application.RunOnMainThread(() =>
+            {
+                try
+                {
+                    /// 鏇存柊浠婃棩鍙戠數閲�
+                    upatePvGenerateTodayValues();
+                    /// 鏇存柊绱鍙戠數閲�
+                    upatePvGenerateTotalValues();
+                    /// 鏇存柊浠婃棩鐢ㄧ數閲�
+                    upatePvLoadTodayValues();
+                    /// 鏇存柊绱鐢ㄧ數閲�
+                    upatePvLoadTotalValues();
+                    /// 鏇存柊鍏変紡杩愯鐘舵��
+                    upatePvRunStatus();
+                    /// 鏇存柊鍏変紡鍙戠數鍔熺巼
+                    updatePvPower();
+                    /// 鏇存柊鍏変紡鏈湀鍙戠數閲�
+                    upatePvGenerateMonthValues();
+                    /// 鏇存柊鍏変紡鐢ㄧ數鍔熺巼
+                    updateLoadElec();
+                    ///鏇存柊鍏変紡鐘舵�佹湰鏈堢敤鐢甸噺
+                    updateLoadElecMonthValues();
+                    //鏇存柊鍌ㄨ兘杩愯鐘舵��
+                    updateEsRunStates();
+                    //鏇存柊鍌ㄨ兘鐢垫睜鐧惧垎姣�
+                    updateEsBatterySoc();
+                    //鏇存柊鍌ㄨ兘瀹炴椂鍏呯數鐘舵��
+                    updateEsCharge();
+                    //鏇存柊鍌ㄨ兘瀹炴椂鏀剧數鐘舵��
+                    updateEsDischarge();
+                    updateSocialContribution1();
+                    updateSocialContribution2();
+                    updateSocialContribution3();
+                }
+                catch (Exception ex)
+                {
+                    MainPage.Log("Error", $"閲戣寕鍏変紡鏇存柊寮傚父:{ex.Message}");
+                }
+            });
+        }
 
+        /// <summary>
+        /// 鏇存柊浠婃棩鍙戠數閲�
+        /// </summary>
+        private void upatePvGenerateTodayValues()
+        {
+            pvGenerate_TodayValuesButton.Text = pvGeneration_TodayValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.pv_electricity_today.ToString());
+            pvGenerate_todayUintButton.X = pvGenerate_TodayValuesButton.Right;
+        }
+        /// <summary>
+        /// 鏇存柊鍏変紡鏈湀鍙戠數閲�
+        /// </summary>
+        private void upatePvGenerateMonthValues()
+        {
+            pvGeneration_MonthValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.pv_electricity_month.ToString());
+        }
+        /// <summary>
+        /// 鏇存柊绱鍙戠數閲�
+        /// </summary>
+        private void upatePvGenerateTotalValues()
+        {
+            pvGenerate_TodayValuesButton.Text = "绱鍙戠數閲忥細" + function.GetAttrState(InverterJinmao_AttrEnum.pv_electricity.ToString());
+        }
+        /// <summary>
+        /// 鏇存柊浠婃棩鐢ㄧ數閲�
+        /// </summary>
+        private void upatePvLoadTodayValues()
+        {
+            pvLoad_TodayValuesButton.Text = loadElec_TodayTextButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.load_electricity_today.ToString());
+        }
+        /// <summary>
+        /// 鏇存柊鏈湀鐢ㄧ數閲�
+        /// </summary>
+        private void updateLoadElecMonthValues()
+        {
+            loadElec_MonthValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.load_electricity_month.ToString());
+        }
+        /// <summary>
+        /// 鏇存柊绱鐢ㄧ數閲�
+        /// </summary>
+        private void upatePvLoadTotalValues()
+        {
+            pvLoad_TotalValuesButton.Text = "绱鐢ㄧ數閲忥細" + function.GetAttrState(InverterJinmao_AttrEnum.load_electricity.ToString());
+
+        }
+        /// <summary>
+        /// 鏇存柊鍏変紡杩愯鐘舵��
+        /// </summary>
+        private void upatePvRunStatus()
+        {
+            switch (function.GetAttrState(InverterJinmao_AttrEnum.system_status.ToString()))
+            {
+                case "run":
+                    pvRunStatusInfoView.BackgroundColor = 0x154484F4;
+                    pvRunStatus_IconButtonp.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/PvIconRun.png";
+                    pvRunStatus_TextButton.Text = "杩愯";
+                    pvRunStatus_TextButton.TextColor = 0xFF4484F4;
+                    break;
+                case "fault":
+                    pvRunStatusInfoView.BackgroundColor = 0x15FF4747;
+                    pvRunStatus_IconButtonp.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/PvIconFault.png";
+                    pvRunStatus_TextButton.Text = "鏁呴殰";
+                    pvRunStatus_TextButton.TextColor = 0xFFFF4747;
+                    break;
+                case "standby":
+                    pvRunStatusInfoView.BackgroundColor = 0x15798394;
+                    pvRunStatus_IconButtonp.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/PvIconStandby.png";
+                    pvRunStatus_TextButton.Text = "寰呮満";
+                    pvRunStatus_TextButton.TextColor = 0xFF798394;
+                    break;
+            }
+
+        }
+        /// <summary>
+        /// 鏇存柊鍏変紡鍙戠數鍔熺巼
+        /// </summary>
+        private void updatePvPower()
+        {
+            pvPower_ValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.pv_power.ToString());
+        }
+        /// <summary>
+        /// 鏇存柊鍏変紡鐢ㄧ數鍔熺巼
+        /// </summary>
+        private void updateLoadElec()
+        {
+            loadElec_ValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.load_active_power.ToString());
+        }
+        /// <summary>
+        /// 鏇存柊鍌ㄨ兘杩愯鐘舵��
+        /// </summary>
+        private void updateEsRunStates()
+        {
+            switch (function.GetAttrState(InverterJinmao_AttrEnum.ess_status.ToString()))
+            {
+                case "charge":
+                    esStatus_InfoView.BackgroundColor = 0x1500C22D;
+                    esRunStatus_BatteryValuesButton.TextColor = 0xFF00C22D;
+                    esRunStatus_Info_IconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/EsIconCharg.png";
+                    esRunStatus_Info_TextButton.Text = "鍏呯數";
+                    esRunStatus_BatteryIconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/BatteryIconCharg.png";
+                    esRunStatus_BatteryIconButton.SelectedImagePath = "FunctionIcon/Acst/Inverter/BatteryIconCharg100.png";
+                    break;
+                case "discharge":
+                    esStatus_InfoView.BackgroundColor = 0x15FC9C04;
+                    esRunStatus_BatteryValuesButton.TextColor = 0xFFFC9C04;
+                    esRunStatus_Info_IconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/EsIconDischarge.png";
+                    esRunStatus_Info_TextButton.Text = "鏀剧數";
+                    esRunStatus_BatteryIconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/BatteryIconDischarg.png";
+                    esRunStatus_BatteryIconButton.SelectedImagePath = "FunctionIcon/Acst/Inverter/BatteryIconDischarg100.png";
+                    break;
+                case "shutdown":
+                    esStatus_InfoView.BackgroundColor = 0x15798394;
+                    esRunStatus_BatteryValuesButton.TextColor = 0xFF798394;
+                    esRunStatus_Info_IconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/EsIconShutdown.png";
+                    esRunStatus_Info_TextButton.Text = "鍋滄満";
+                    esRunStatus_BatteryIconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/BatteryIconShutdown.png";
+                    esRunStatus_BatteryIconButton.SelectedImagePath = "FunctionIcon/Acst/Inverter/BatteryIconShutdown100.png";
+                    break;
+                case "fault":
+                    esStatus_InfoView.BackgroundColor = 0x15FF4747;
+                    esRunStatus_BatteryValuesButton.TextColor = 0xFFFF4747;
+                    esRunStatus_Info_IconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/EsIconFault.png";
+                    esRunStatus_Info_TextButton.Text = "鏁呴殰";
+                    esRunStatus_BatteryIconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/BatteryIconFault.png";
+                    esRunStatus_BatteryIconButton.SelectedImagePath = "FunctionIcon/Acst/Inverter/BatteryIconFault100.png";
+                    break;
+            }
+        }
+        /// <summary>
+        /// 鏇存柊鍌ㄨ兘鐢垫睜鐧惧垎姣旂姸鎬�
+        /// </summary>
+        private void updateEsBatterySoc()
+        {
+            esRunStatus_BatteryValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.battery_soc.ToString()) + "%";
+            if(esRunStatus_BatteryIconButton.Text == "100%")
+            {
+                esRunStatus_BatteryIconButton.IsSelected = true;
+            }
+        }
+        /// <summary>
+        /// 鏇存柊鍌ㄨ兘瀹炴椂鍏呯數鐘舵��
+        /// </summary>
+        private void updateEsCharge()
+        {
+            esRunStatus_ChargeValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.ess_charge_power.ToString());
+        }
+        /// <summary>
+        /// 鏇存柊鍌ㄨ兘瀹炴椂鏀剧數鐘舵��
+        /// </summary>
+        private void updateEsDischarge()
+        {
+            esRunStatus_DischargeValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.ess_discharg_power.ToString());
+        }
+
+        /// <summary>
+        /// 鏇存柊绀句細璐$尞1鏁版嵁UI
+        /// </summary>
+        private void updateSocialContribution1()
+        {
+            socialContribution_Info1_ValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.coal.ToString());
+#if __IOS__
+            socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth() + Application.GetRealWidth(8);
+#else
+            socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth();
+#endif
+            if (socialContribution_Info1_ValuesButton.Width > Application.GetRealWidth(61))
+            {
+                socialContribution_Info1_ValuesButton.TextSize = socialContribution_Info1_ValuesButton.TextSize - 4;
+            }
+
+            socialContribution_Info1_UintButton.X = socialContribution_Info1_ValuesButton.Right - Application.GetRealWidth(4);
+        }
+        /// <summary>
+        /// 鏇存柊绀句細璐�2鐚暟鎹甎I
+        /// </summary>
+        private void updateSocialContribution2()
+        {
+            socialContribution_Info2_ValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.co2.ToString());
+#if __IOS__
+            socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth() + Application.GetRealWidth(8);
+#else
+            socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth();
+#endif
+            if (socialContribution_Info2_UintButton.Width > Application.GetRealWidth(61))
+            {
+                socialContribution_Info2_UintButton.TextSize = socialContribution_Info2_UintButton.TextSize - 4;
+            }
+
+            socialContribution_Info2_UintButton.X = socialContribution_Info2_ValuesButton.Right - Application.GetRealWidth(4);
+
+        }
+        /// <summary>
+        /// 鏇存柊绀句細璐�3鐚暟鎹甎I
+        /// </summary>
+        private void updateSocialContribution3()
+        {
+
+            socialContribution_Info3_ValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.trees.ToString());
+#if __IOS__
+            socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth() + Application.GetRealWidth(8);
+#else
+            socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth();
+#endif
+            if (socialContribution_Info3_ValuesButton.Width > Application.GetRealWidth(61))
+            {
+                socialContribution_Info3_ValuesButton.TextSize = socialContribution_Info3_ValuesButton.TextSize - 4;
+            }
+            socialContribution_Info3_UintButton.X = socialContribution_Info3_ValuesButton.Right - Application.GetRealWidth(4);
         }
     }
 }

--
Gitblit v1.8.0