From e48f135a906169f35cbd7a7144ed56201012c694 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 22 九月 2022 16:40:36 +0800
Subject: [PATCH] 光伏卡片开关总数更新

---
 HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
index 5b6cfd4..92d0a46 100644
--- a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
+++ b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -1090,7 +1090,11 @@
                             string onoff = btnAcstPower.IsSelected ? "on":"off";
                             Dictionary<string, string> d = new Dictionary<string, string>();
                             d.Add(FunctionAttributeKey.OnOff, onoff);
-                            Control.Ins.SendWriteCommand(FunctionList.List.GetAcstParentList()[0], d);
+
+                            foreach (var temp in FunctionList.List.GetAcstParentList())
+                            {
+                                Control.Ins.SendWriteCommand(temp, d);
+                            }
                         };
 
 
@@ -1122,7 +1126,7 @@
 
 
             //鍏変紡鏁版嵁
-            if (FunctionList.List.InverterList.Count > 0 )
+            if (FunctionList.List.InverterList().Count > 0 )
             {
                 FrameLayout inverterListView = new FrameLayout()
                 {
@@ -1170,26 +1174,26 @@
 
                 Button btnFunctionCount = new Button()
                 {
-                    X = Application.GetRealWidth(17) + Application.GetRealWidth(7 * FunctionList.List.InverterList.Count.ToString().Length),
+                    X = Application.GetRealWidth(17) + Application.GetRealWidth(7 * FunctionList.List.InverterList().Count.ToString().Length),
                     Y = btnName.Bottom,
                     Width = Application.GetRealWidth(120),
                     Height = Application.GetRealHeight(24),
                     TextColor = CSS_Color.PromptingColor1,
                     TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                     TextAlignment = TextAlignment.CenterLeft,
-                    Text = "/" + FunctionList.List.InverterList.Count,
+                    Text = "/" + FunctionList.List.InverterList().Count,
                 };
                 inverterListView.AddChidren(btnFunctionCount);
                 Button btnOpenCount = new Button()
                 {
                     X = Application.GetRealWidth(16),
                     Y = btnName.Bottom,
-                    Width = Application.GetRealWidth(14 * FunctionList.List.InverterList.Count.ToString().Length),
+                    Width = Application.GetRealWidth(14 * FunctionList.List.InverterList().Count.ToString().Length),
                     Height = Application.GetRealHeight(24),
                     TextColor = CSS_Color.MainColor,
                     TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
                     TextAlignment = TextAlignment.CenterLeft,
-                    Text = FunctionList.List.InverterList.Count.ToString(),
+                    Text = FunctionList.List.InverterList().FindAll((temp)=>temp.trait_on_off.ToString() == "on").Count.ToString(),
                     Tag = "inverter_onCount",
                     BorderWidth = 0,
                 };
@@ -1314,7 +1318,7 @@
                             }
                             var function = new Function();
                             function.sid = data["sid"].ToString();
-                            var inObj = FunctionList.List.InverterList.Find((obj) => obj.sid == function.sid);
+                            var inObj = FunctionList.List.InverterList().Find((obj) => obj.sid == function.sid);
                             if (inObj == null)
                             {
                                 return;
@@ -1346,7 +1350,7 @@
                             Application.RunOnMainThread(() =>
                             {
                                 btnPowerTenerationToday.Text = Language.StringByID(StringId.PowerTenerationToday).Replace("----", info.totalElectricityPvToday);
-                                btnWorkingMode.Text = Language.StringByID(StringId.WorkingMode).Replace("----", info.systemStatus);
+                                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);
                             });

--
Gitblit v1.8.0