wxr
2024-09-10 8e940d7f0c873cfedf7f6d8c885be98b96f1d046
HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs
@@ -10,7 +10,7 @@
{
    public class InverterJinmaoPage : FrameLayout
    {
        FrameLayout bodyView;
        static InverterJinmaoPage bodyView;
        Function function;
        /// <summary>
        /// 今日发电量数据按钮
@@ -39,7 +39,7 @@
        /// <summary>
        /// 光伏运行状态图标按钮
        /// </summary>
        Button pvRunStatus_IconButtonp;
        Button pvRunStatus_IconButton;
        /// <summary>
        /// 光伏运行状态文本按钮
        /// </summary>
@@ -63,7 +63,7 @@
        /// <summary>
        /// 光伏状态今日用电量数据按钮
        /// </summary>
        Button loadElec_TodayTextButton;
        Button powerUsage_TodayValuesButton;
        /// <summary>
        /// 光伏状态本月用电量数据按钮
        /// </summary>
@@ -203,7 +203,7 @@
#if __IOS__
            pvGenerate_TodayValuesButton.TextAlignment = TextAlignment.TopLeft;
            pvGenerate_TodayValuesButton.Width = pvGenerate_TodayValuesButton.GetTextWidth() + Application.GetRealWidth(6);
            pvGenerate_TodayValuesButton.Width = pvGenerate_TodayValuesButton.GetTextWidth() + Application.GetRealWidth(8);
#else
            pvGenerate_TodayValuesButton.TextAlignment = TextAlignment.BottomLeft;
            pvGenerate_TodayValuesButton.Y = Application.GetRealWidth(37);
@@ -213,12 +213,12 @@
            {
                Y = Application.GetRealWidth(43),
                Height = Application.GetRealWidth(17),
                Text = "kw",
                Text = "kwh",
                TextColor = CSS_Color.MainBackgroundColor,
                TextSize = 12,
                TextAlignment = TextAlignment.CenterLeft,
            };
            pvGenerate_todayUintButton.X = pvGenerate_TodayValuesButton.Right;
            pvGenerate_todayUintButton.X = pvGenerate_TodayValuesButton.Right - Application.GetRealWidth(2);
            electricityGenerationView.AddChidren(pvGenerate_todayUintButton);
            pvGenerate_TotalValuesButton = new Button()
@@ -276,7 +276,7 @@
            {
                Y = Application.GetRealWidth(43),
                Height = Application.GetRealWidth(17),
                Text = "kw",
                Text = "kwh",
                TextColor = CSS_Color.MainBackgroundColor,
                TextSize = 12,
                TextAlignment = TextAlignment.CenterRight,
@@ -377,7 +377,7 @@
            };
            pvEleGenerationInfoView.AddChidren(pvRunStatusInfoView);
            pvRunStatus_IconButtonp = new Button()
            pvRunStatus_IconButton = new Button()
            {
                X = Application.GetRealWidth(8 + 14),
                Gravity = Gravity.CenterVertical,
@@ -385,7 +385,7 @@
                Height = Application.GetRealWidth(12),
                UnSelectedImagePath = "FunctionIcon/Acst/Inverter/PvIconRun.png",
            };
            pvRunStatusInfoView.AddChidren(pvRunStatus_IconButtonp);
            pvRunStatusInfoView.AddChidren(pvRunStatus_IconButton);
            pvRunStatus_TextButton = new Button()
            {
@@ -417,12 +417,12 @@
                try
                {
                    int index = 1;
                    float pvPower = 0.00f;
                    while (index < 361)
                    {
                        if (function.GetAttrState(InverterJinmao_AttrEnum.pv_power.ToString()) == "0")
                        float.TryParse(function.GetAttrState(InverterJinmao_AttrEnum.pv_power.ToString()), out pvPower);
                        if (pvPower > 0.00f)
                        {
                            continue;
                        }
                        Application.RunOnMainThread(() =>
                        {
                            powerGenerationBg.SetRotation(1f * index++);
@@ -431,6 +431,7 @@
                        if (index == 361)
                        {
                            index = 1;
                            }
                        }
                    }
                }
@@ -465,7 +466,7 @@
                Y = Application.GetRealWidth(78),
                //Width = Application.GetRealWidth(100),
                Height = Application.GetRealWidth(25),
                Text = "实时发电功率 (kwh)",
                Text = "实时发电功率 (kw)",
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                TextSize = 12,
@@ -494,7 +495,7 @@
                Y = Application.GetRealWidth(220),
                Width = Application.GetRealWidth(100),
                Height = Application.GetRealWidth(17),
                Text = "今日发电量 (kw)",
                Text = "今日发电量 (kwh)",
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                TextSize = 12,
@@ -523,7 +524,7 @@
                Y = Application.GetRealWidth(220),
                Width = Application.GetRealWidth(100),
                Height = Application.GetRealWidth(17),
                Text = "本月发电量 (kw)",
                Text = "本月发电量 (kwh)",
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                TextSize = 12,
@@ -552,7 +553,7 @@
                Y = Application.GetRealWidth(220),
                Width = Application.GetRealWidth(100),
                Height = Application.GetRealWidth(17),
                Text = "本年发电量 (kw)",
                Text = "本年发电量 (kwh)",
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                TextSize = 12,
@@ -563,7 +564,7 @@
                try
                {
                    var revertObj = new HttpServerRequest().GetSensorHistory("custom_year",
                        function.deviceId, InverterJinmao_AttrEnum.load_electricity.ToString(), DateTime.Now.Year.ToString());
                        function.deviceId, InverterJinmao_AttrEnum.pv_electricity.ToString(), DateTime.Now.Year.ToString());
                    if (revertObj != null)
                    {
                        if (revertObj.Code == StateCode.SUCCESS)
@@ -643,12 +644,12 @@
                try
                {
                    int index = 1;
                    float loadPower = 0.00f;
                    while (index < 361)
                    {
                        if (function.GetAttrState(InverterJinmao_AttrEnum.load_active_power.ToString()) == "0")
                        float.TryParse(function.GetAttrState(InverterJinmao_AttrEnum.load_active_power.ToString()), out loadPower);
                        if (loadPower > 0.00f)
                        {
                            continue;
                        }
                        Application.RunOnMainThread(() =>
                        {
                            powerUsageBg.SetRotation(1f * index++);
@@ -657,6 +658,7 @@
                        if (index == 361)
                        {
                            index = 1;
                            }
                        }
                    }
                }
@@ -687,7 +689,7 @@
                Y = Application.GetRealWidth(78),
                //Width = Application.GetRealWidth(100),
                Height = Application.GetRealWidth(25),
                Text = "实时用电功率 (kwh)",
                Text = "实时用电功率 (kw)",
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                TextSize = 12,
@@ -695,7 +697,7 @@
            powerUsageView.AddChidren(powerUsage_TextButton);
            var powerUsage_TodayValuesButton = new Button()
            powerUsage_TodayValuesButton = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealWidth(191),
@@ -709,13 +711,13 @@
            };
            electricityUsageStatusView.AddChidren(powerUsage_TodayValuesButton);
            loadElec_TodayTextButton = new Button()
            var loadElec_TodayTextButton = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealWidth(220),
                Width = Application.GetRealWidth(100),
                Height = Application.GetRealWidth(17),
                Text = "今日用电量 (kw)",
                Text = "今日用电量 (kwh)",
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                TextSize = 12,
@@ -742,7 +744,7 @@
                Y = Application.GetRealWidth(220),
                Width = Application.GetRealWidth(100),
                Height = Application.GetRealWidth(17),
                Text = "本月用电量 (kw)",
                Text = "本月用电量 (kwh)",
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                TextSize = 12,
@@ -770,17 +772,64 @@
                Y = Application.GetRealWidth(220),
                Width = Application.GetRealWidth(100),
                Height = Application.GetRealWidth(17),
                Text = "本年用电量 (kw)",
                Text = "本年用电量 (kwh)",
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                TextSize = 12,
            };
            electricityUsageStatusView.AddChidren(powerUsage_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(() =>
                            {
                                powerUsage_YearValuesButton.Text = totalValues.ToString();
                                while (true)
                                {
                                    if (powerUsage_YearValuesButton.Width < powerUsage_YearValuesButton.GetTextWidth())
                                    {
                                        powerUsage_YearValuesButton.TextSize--;
                                    }
                                    else
                                    {
                                        break;
                                    }
                                }
                            });
                        }
                    }
                }
                catch (Exception ex)
                {
                    MainPage.Log("Error", "读取金茂本年发电量数据异常:" + ex.Message);
                }
            })
            { IsBackground = true }.Start();
            #endregion
            #endregion
            if (function.attributes.Find((obj) => obj.key == InverterJinmao_AttrEnum.ess_status.ToString()) != null)
            {
            contentView.AddChidren(new Button()
            {
                Height = Application.GetRealWidth(8)
@@ -907,7 +956,7 @@
                Y = Application.GetRealWidth(76),
                Height = Application.GetRealWidth(17),
                TextAlignment = TextAlignment.Center,
                Text = "实时充电功率(kwh)",
                    Text = "实时充电功率(kw)",
                TextColor = CSS_Color.TextualColor,
                TextSize = 12,
            };
@@ -948,11 +997,11 @@
            esRunStatus_DischargeValuesView.AddChidren(esRunStatus_DischargeTextButton);
            #endregion
            #endregion
            #endregion
            }
            contentView.AddChidren(new Button()
            {
@@ -1026,6 +1075,9 @@
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextAlignment = TextAlignment.BottomLeft,
            };
#if __IOS__
            socialContribution_Info1_UintButton.Y = Application.GetRealWidth(66);
#endif
            socialContribution_InfoView_1.AddChidren(socialContribution_Info1_UintButton);
            var socialContribution_Info1_TipButton = new Button()
@@ -1092,6 +1144,9 @@
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextAlignment = TextAlignment.BottomLeft,
            };
#if __IOS__
            socialContribution_Info2_UintButton.Y = Application.GetRealWidth(66);
#endif
            socialContribution_InfoView_2.AddChidren(socialContribution_Info2_UintButton);
            var socialContribution_Info2_TipButton = new Button()
@@ -1158,6 +1213,9 @@
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextAlignment = TextAlignment.BottomLeft,
            };
            #if __IOS__
            socialContribution_Info3_UintButton.Y = Application.GetRealWidth(66);
            #endif
            socialContribution_InfoView_3.AddChidren(socialContribution_Info3_UintButton);
            var socialContribution_Info3_TipButton = new Button()
@@ -1184,7 +1242,7 @@
        /// 更新界面数据
        /// </summary>
        /// <param name="temp"></param>
        public void UpdateStatus(Function temp)
        public static void UpdateStatus(Function temp)
        {
            if (bodyView == null)
            {
@@ -1195,38 +1253,38 @@
                try
                {
                    /// 更新今日发电量
                    upatePvGenerateTodayValues();
                    bodyView.upatePvGenerateTodayValues();
                    /// 更新累计发电量
                    upatePvGenerateTotalValues();
                    bodyView.upatePvGenerateTotalValues();
                    /// 更新今日用电量
                    upatePvLoadTodayValues();
                    bodyView.upatePvLoadTodayValues();
                    /// 更新累计用电量
                    upatePvLoadTotalValues();
                    bodyView.upatePvLoadTotalValues();
                    /// 更新光伏运行状态
                    upatePvRunStatus();
                    bodyView.upatePvRunStatus();
                    /// 更新光伏发电功率
                    updatePvPower();
                    bodyView.updatePvPower();
                    /// 更新光伏本月发电量
                    upatePvGenerateMonthValues();
                    bodyView.upatePvGenerateMonthValues();
                    /// 更新光伏用电功率
                    updateLoadElec();
                    bodyView.updateLoadElec();
                    ///更新光伏状态本月用电量
                    updateLoadElecMonthValues();
                    bodyView.updateLoadElecMonthValues();
                    //更新储能运行状态
                    updateEsRunStates();
                    bodyView.updateEsRunStates();
                    //更新储能电池百分比
                    updateEsBatterySoc();
                    bodyView.updateEsBatterySoc();
                    //更新储能实时充电状态
                    updateEsCharge();
                    bodyView.updateEsCharge();
                    //更新储能实时放电状态
                    updateEsDischarge();
                    updateSocialContribution1();
                    updateSocialContribution2();
                    updateSocialContribution3();
                    bodyView.updateEsDischarge();
                    bodyView.updateSocialContribution1();
                    bodyView.updateSocialContribution2();
                    bodyView.updateSocialContribution3();
                }
                catch (Exception ex)
                {
                    MainPage.Log("Error", $"金茂光伏更新异常:{ex.Message}");
                    MainPage.Log("Error", $"金茂光伏更新异常:{ex.StackTrace}");
                }
            });
        }
@@ -1251,14 +1309,14 @@
        /// </summary>
        private void upatePvGenerateTotalValues()
        {
            pvGenerate_TodayValuesButton.Text = "累计发电量:" + function.GetAttrState(InverterJinmao_AttrEnum.pv_electricity.ToString());
            pvGenerate_TotalValuesButton.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());
            pvLoad_TodayValuesButton.Text = powerUsage_TodayValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.load_electricity_today.ToString());
        }
        /// <summary>
        /// 更新本月用电量
@@ -1284,19 +1342,19 @@
            {
                case "run":
                    pvRunStatusInfoView.BackgroundColor = 0x154484F4;
                    pvRunStatus_IconButtonp.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/PvIconRun.png";
                    pvRunStatus_IconButton.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_IconButton.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_IconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/PvIconStandby.png";
                    pvRunStatus_TextButton.Text = "待机";
                    pvRunStatus_TextButton.TextColor = 0xFF798394;
                    break;
@@ -1322,11 +1380,13 @@
        /// </summary>
        private void updateEsRunStates()
        {
            if (function.attributes.Find((obj) => obj.key == InverterJinmao_AttrEnum.ess_status.ToString()) != null)
            {
            switch (function.GetAttrState(InverterJinmao_AttrEnum.ess_status.ToString()))
            {
                case "charge":
                    esStatus_InfoView.BackgroundColor = 0x1500C22D;
                    esRunStatus_BatteryValuesButton.TextColor = 0xFF00C22D;
                        esRunStatus_Info_TextButton.TextColor = 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";
@@ -1334,7 +1394,7 @@
                    break;
                case "discharge":
                    esStatus_InfoView.BackgroundColor = 0x15FC9C04;
                    esRunStatus_BatteryValuesButton.TextColor = 0xFFFC9C04;
                        esRunStatus_Info_TextButton.TextColor = 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";
@@ -1342,7 +1402,7 @@
                    break;
                case "shutdown":
                    esStatus_InfoView.BackgroundColor = 0x15798394;
                    esRunStatus_BatteryValuesButton.TextColor = 0xFF798394;
                        esRunStatus_Info_TextButton.TextColor = 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";
@@ -1350,7 +1410,7 @@
                    break;
                case "fault":
                    esStatus_InfoView.BackgroundColor = 0x15FF4747;
                    esRunStatus_BatteryValuesButton.TextColor = 0xFFFF4747;
                        esRunStatus_Info_TextButton.TextColor = 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";
@@ -1358,10 +1418,13 @@
                    break;
            }
        }
        }
        /// <summary>
        /// 更新储能电池百分比状态
        /// </summary>
        private void updateEsBatterySoc()
        {
            if (function.attributes.Find((obj) => obj.key == InverterJinmao_AttrEnum.ess_status.ToString()) != null)
        {
            esRunStatus_BatteryValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.battery_soc.ToString()) + "%";
            if(esRunStatus_BatteryIconButton.Text == "100%")
@@ -1369,56 +1432,65 @@
                esRunStatus_BatteryIconButton.IsSelected = true;
            }
        }
        }
        /// <summary>
        /// 更新储能实时充电状态
        /// </summary>
        private void updateEsCharge()
        {
            if (function.attributes.Find((obj) => obj.key == InverterJinmao_AttrEnum.ess_status.ToString()) != null)
            {
            esRunStatus_ChargeValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.ess_charge_power.ToString());
            }
        }
        /// <summary>
        /// 更新储能实时放电状态
        /// </summary>
        private void updateEsDischarge()
        {
            if (function.attributes.Find((obj) => obj.key == InverterJinmao_AttrEnum.ess_status.ToString()) != null)
            {
            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_ValuesButton.TextSize = 14;
                socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth();
                socialContribution_Info1_UintButton.Height = Application.GetRealWidth(25);
            }
#if __IOS__
            socialContribution_Info1_ValuesButton.Width += Application.GetRealWidth(6);
            socialContribution_Info1_UintButton.X = socialContribution_Info1_ValuesButton.Right - Application.GetRealWidth(4);
#else
            socialContribution_Info1_UintButton.X = socialContribution_Info1_ValuesButton.Right +Application.GetRealWidth(2);
#endif
        }
        /// <summary>
        /// 更新社会贡2献数据UI
        /// </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.Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.co2.ToString());
            socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth();
#endif
            if (socialContribution_Info2_UintButton.Width > Application.GetRealWidth(61))
            if (socialContribution_Info2_ValuesButton.Width > Application.GetRealWidth(61))
            {
                socialContribution_Info2_UintButton.TextSize = socialContribution_Info2_UintButton.TextSize - 4;
                socialContribution_Info2_ValuesButton.TextSize = 14;
                socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth();
            }
#if __IOS__
            socialContribution_Info2_ValuesButton.Width += Application.GetRealWidth(6);
            socialContribution_Info2_UintButton.X = socialContribution_Info2_ValuesButton.Right - Application.GetRealWidth(4);
#else
            socialContribution_Info2_UintButton.X = socialContribution_Info2_ValuesButton.Right +Application.GetRealWidth(2);
#endif
        }
        /// <summary>
@@ -1426,18 +1498,20 @@
        /// </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.Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.trees.ToString());
            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_ValuesButton.TextSize = 14;
                socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth();
                socialContribution_Info3_UintButton.Height = Application.GetRealWidth(25);
            }
#if __IOS__
            socialContribution_Info3_ValuesButton.Width += Application.GetRealWidth(6);
            socialContribution_Info3_UintButton.X = socialContribution_Info3_ValuesButton.Right - Application.GetRealWidth(4);
#else
            socialContribution_Info3_UintButton.X = socialContribution_Info3_ValuesButton.Right +Application.GetRealWidth(2);
#endif
        }
    }
}