From 20f58a08f7ff9746312a41f1cfe014b3893043a4 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期三, 12 十月 2022 11:24:13 +0800 Subject: [PATCH] 场景色温功能再次编辑状态异常显示 --- HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs | 34 ++++++++++++++++++++++++++++++++-- 1 files changed, 32 insertions(+), 2 deletions(-) diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs index bdfd063..f2177b9 100644 --- a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs +++ b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs @@ -1316,7 +1316,7 @@ { lz = "en"; } - string url = $"h5/index.html?homeId={DB_ResidenceData.Instance.CurrentRegion.id}&token={UserInfo.Current.AccessToken}&refresh_token={UserInfo.Current.RefreshToken}&url={HttpUtil.GlobalRequestHttpsHost}&lang={lz}"; + string url = $"h5/index.html?homeId={DB_ResidenceData.Instance.CurrentRegion.id}&token={UserInfo.Current.AccessToken}&refresh_token={UserInfo.Current.RefreshToken}&url={HttpUtil.GlobalRequestHttpsHost}&language={lz}"; Inverter.Ins.ShowWebviewFormUrl(url); Inverter.Ins.H5Page.JSToNativeAction = (dictionary) => @@ -1399,7 +1399,37 @@ Application.RunOnMainThread(() => { btnPowerTenerationToday.Text = Language.StringByID(StringId.PowerTenerationToday).Replace("----", info.totalElectricityPvToday); - btnWorkingMode.Text = Language.StringByID(StringId.WorkingMode).Replace("----", info.workMode); + string workModeString = ""; + if (Language.CurrentLanguage == "Chinese") { + switch (info.workMode) + { + case "self_use": + workModeString = "鑷彂鑷敤"; + break; + case "peak_load_shifting": + workModeString = "鍓婂嘲濉胺"; + break; + case "battery_priority": + workModeString = "鐢垫睜浼樺厛"; + break; + } + } + else + { + switch (info.workMode) + { + case "self_use": + workModeString = "Self Consume"; + break; + case "peak_load_shifting": + workModeString = "Peak Shift"; + break; + case "battery_priority": + workModeString = "Battery Priority"; + break; + } + } + btnWorkingMode.Text = Language.StringByID(StringId.WorkingMode).Replace("----", workModeString); btnCurrentPowerGeneration.Text = Language.StringByID(StringId.CurrentPowerGeneration).Replace("----", info.powerPvNow); btnBatterySOC.Text = Language.StringByID(StringId.BatterySOC).Replace("--", info.batterySoc); }); -- Gitblit v1.8.0