| | |
| | | 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, |
| | | }; |
| | |
| | | |
| | | clickButton.MouseUpEventHandler = (sender2, e2) => |
| | | { |
| | | var h5BasePage = new FrameLayout(); |
| | | var h5BasePage = new FrameLayout() { |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | |
| | | #if __Android__ |
| | | //适配安卓沉浸式导航栏 |
| | |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | |
| | | |
| | | }; |
| | | |
| | | 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}"); |
| | | } |
| | | } |
| | | } |
| | | |