wxr
2022-09-26 418b0d0a4002bc06ba3a55d1809fe46043f06c09
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -1193,7 +1193,7 @@
                    TextColor = CSS_Color.MainColor,
                    TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                    TextAlignment = TextAlignment.CenterLeft,
                    Text = FunctionList.List.InverterList().FindAll((temp)=>temp.trait_on_off.ToString() == "on").Count.ToString(),
                    Text = FunctionList.List.InverterList().FindAll((temp)=>temp.trait_on_off.curValue.ToString() == "on").Count.ToString(),
                    Tag = "inverter_onCount",
                    BorderWidth = 0,
                };
@@ -1282,7 +1282,9 @@
                clickButton.MouseUpEventHandler = (sender2, e2) =>
                {
                    var h5BasePage = new FrameLayout();
                    var h5BasePage = new FrameLayout() {
                        BackgroundColor = CSS_Color.MainBackgroundColor,
                    };
#if __Android__
                    //适配安卓沉浸式导航栏
@@ -1337,27 +1339,33 @@
                            });
                        }
                    };
                };
                new System.Threading.Thread(() => {
                    var http = new HttpServerRequest();
                    var pack = http.GetInverterStatisticsInfo();
                    if(pack!= null)
                    if (pack != null)
                    {
                        var info = JsonConvert.DeserializeObject<StatisticsInfo>(pack.Data.ToString());
                        try
                        if (info != null)
                        {
                            Application.RunOnMainThread(() =>
                            try
                            {
                                btnPowerTenerationToday.Text = Language.StringByID(StringId.PowerTenerationToday).Replace("----", info.totalElectricityPvToday);
                                btnWorkingMode.Text = Language.StringByID(StringId.WorkingMode).Replace("----", info.workMode);
                                btnCurrentPowerGeneration.Text = Language.StringByID(StringId.CurrentPowerGeneration).Replace("----", info.powerPvNow);
                                btnBatterySOC.Text = Language.StringByID(StringId.BatterySOC).Replace("--", info.batterySoc);
                            });
                        }
                        catch (Exception ex)
                        {
                            MainPage.Log($"获取家庭光伏统计数据异常:{ex.Message}");
                                Application.RunOnMainThread(() =>
                                {
                                    btnPowerTenerationToday.Text = Language.StringByID(StringId.PowerTenerationToday).Replace("----", info.totalElectricityPvToday);
                                    btnWorkingMode.Text = Language.StringByID(StringId.WorkingMode).Replace("----", info.workMode);
                                    btnCurrentPowerGeneration.Text = Language.StringByID(StringId.CurrentPowerGeneration).Replace("----", info.powerPvNow);
                                    btnBatterySOC.Text = Language.StringByID(StringId.BatterySOC).Replace("--", info.batterySoc);
                                });
                            }
                            catch (Exception ex)
                            {
                                MainPage.Log($"获取家庭光伏统计数据异常:{ex.Message}");
                            }
                        }
                    }