From 1244f5fdd2a30a010692006dea17426f43dfd65d Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 16 四月 2024 10:25:05 +0800
Subject: [PATCH] Update Entitlements.plist

---
 HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs |  275 ++++++++++++++++++++++++++++++------------------------
 1 files changed, 151 insertions(+), 124 deletions(-)

diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
index 44cf87f..ca40bf9 100644
--- a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
+++ b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -11,6 +11,9 @@
 
 namespace HDL_ON.UI
 {
+    /// <summary>
+    /// 鍒嗙被鐣岄潰
+    /// </summary>
     public partial class ClassificationPage : FrameLayout
     {
 
@@ -85,14 +88,14 @@
             #region top
             FrameLayout topView = new FrameLayout()
             {
-                Height = Application.GetRealHeight(64),
+                Height = Application.GetRealHeight(74),
                 BackgroundColor = CSS_Color.TopViewColor,
             };
             bodyView.AddChidren(topView);
 
             btnRoomTilte = new Button()
             {
-                Y = Application.GetRealHeight(30),
+                Y = Application.GetRealHeight(40),
                 Width = Application.GetRealWidth(170),
                 Height = Application.GetRealHeight(25),
                 TextAlignment = TextAlignment.CenterRight,
@@ -107,7 +110,7 @@
             btnFuncTitle = new Button()
             {
                 X = Application.GetRealWidth(209),
-                Y = Application.GetRealHeight(30),
+                Y = Application.GetRealHeight(40),
                 Width = Application.GetRealWidth(170),
                 Height = Application.GetRealHeight(25),
                 TextAlignment = TextAlignment.CenterLeft,
@@ -121,8 +124,8 @@
 
             contentPageView = new PageLayout()
             {
-                Y = Application.GetRealHeight(64),
-                Height = Application.GetRealHeight(667 - 64 - 49 + 30),
+                Y = Application.GetRealHeight(74),
+                Height = Application.GetRealHeight(667 - 74 - 49 + 30),
                 BackgroundColor = CSS_Color.MainBackgroundColor,
                 IsShowPoint = false
             };
@@ -605,21 +608,35 @@
             };
         }
 
-
         /// <summary>
         /// 鍔犺浇鍔熻兘鍒楄〃鐣岄潰
         /// </summary>
-        void LoadFunctionPageView()
+        void LoadFunctionPageView ()
         {
-            #region
             functionsPageView = new VerticalScrolViewLayout()
             {
                 BackgroundColor = CSS_Color.BackgroundColor,
                 Height = Application.GetRealHeight(667 - 64 - 49 + 20),
             };
             contentPageView.AddChidren(functionsPageView);
+            this.RefreshFunctionView();
 
-            FrameLayout functionContentView;
+        }
+        FrameLayout functionContentView;
+        /// <summary>
+        /// 鏄剧ず鍔熻兘鍒楄〃鐣岄潰
+        /// </summary>
+        void RefreshFunctionView()
+        {
+            #region
+            //functionsPageView = new VerticalScrolViewLayout()
+            //{
+            //    BackgroundColor = CSS_Color.BackgroundColor,
+            //    Height = Application.GetRealHeight(667 - 64 - 49 + 20),
+            //};
+            //contentPageView.AddChidren(functionsPageView);
+
+            //FrameLayout functionContentView;
             functionContentView = new FrameLayout()
             {
                 Y = Application.GetRealHeight(16),
@@ -655,8 +672,11 @@
                 int functionOnCount = 0;
                 switch (item)
                 {
+                    case ShowFunction.Series:
+                        functionCount = FunctionList.List.GetSeries().Count;
+                        break;
                     case ShowFunction.IpCam:
-                        functionCount = FunctionList.List.GetIpCamImouList().Count;
+                        //functionCount = FunctionList.List.GetIpCamImouList().Count;
                         break;
                     case ShowFunction.MechanicalArm:
                         functionCount = FunctionList.List.GetMechanicalArmList().Count;
@@ -692,8 +712,12 @@
                         break;
                     case ShowFunction.Electric:
                         #region 鐢靛櫒
+
                         functionCount = FunctionList.List.GetElectricals().Count;
-                        functionOnCount = FunctionList.List.GetElectricals().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
+                        functionOnCount = FunctionList.List.GetElectricals().FindAll((obj) => obj.spk!=SPK.ElectricalTvHisense&&obj.trait_on_off.curValue.ToString() == "on").Count;
+//#if DEBUG
+//                        functionCount = 1;
+//#endif
                         #endregion
                         break;
                     case ShowFunction.EnergyMonitoring:
@@ -719,22 +743,25 @@
                         break;
                     case ShowFunction.Panel:
                         break;
-                    case ShowFunction.SecurityMonitoring:
-                        if (!MainPage.NoLoginMode)
+                    case ShowFunction.Sensor:
+                        functionCount = FunctionList.List.GetArmSensorList().Count;
+                        break;
+                    case ShowFunction.VideoIntercom:
+                        if (FunctionList.List.videoIntercom != null && FunctionList.List.videoIntercom.Count > 0)
                         {
                             functionCount = 1;
                         }
                         break;
-                    case ShowFunction.Sensor:
-                        functionCount = FunctionList.List.GetArmSensorList().Count;
-                        break;
                     case ShowFunction.SecurityCenter:
                         functionCount = FunctionList.List.securities.Count;
-                        //if (DB_ResidenceData.Instance.GatewayType == 1)
-                        //{
-                        //    functionCount = 1;
-                        //}
                         break;
+                    case ShowFunction.Aks:
+                        functionCount = FunctionList.List.GetVideoControlsList().Count;
+                        functionOnCount = 1;
+                        break;
+
+
+
                 }
 
                 if (functionCount == 0)
@@ -788,13 +815,20 @@
                 };
                 functionView.AddChidren(btnName);
 
-                if (item != ShowFunction.Environmental && item != ShowFunction.Sensor 
-                    && item != ShowFunction.SecurityMonitoring && item != ShowFunction.FreshAir && item != ShowFunction.Music
-                    && item != ShowFunction.EnergyMonitoring && item != ShowFunction.SecurityCenter
+                //涓嶉渶瑕佹樉绀鸿澶囧紑鐘舵�佹暟閲�;
+                Button btnFunctionCount=null;
+                if (item != ShowFunction.Aks
+                    && item != ShowFunction.Environmental
+                    && item != ShowFunction.Sensor
+                    && item != ShowFunction.VideoIntercom
+                    && item != ShowFunction.FreshAir
+                    && item != ShowFunction.Music
+                    && item != ShowFunction.EnergyMonitoring
+                    && item != ShowFunction.SecurityCenter
                     && item != ShowFunction.IpCam
                     && functionCount != 0)
                 {
-                    Button btnFunctionCount = new Button()
+                    btnFunctionCount = new Button()
                     {
                         X = Application.GetRealWidth(17) + Application.GetRealWidth(7 * functionCount.ToString().Length),
                         Y = btnName.Bottom,
@@ -805,21 +839,29 @@
                         TextAlignment = TextAlignment.CenterLeft,
                         Text = "/" + functionCount,
                     };
-                    functionView.AddChidren(btnFunctionCount);
-                    Button btnOpenCount = new Button()
+                    if (item == ShowFunction.Series)
                     {
-                        X = Application.GetRealWidth(16),
-                        Y = btnName.Bottom,
-                        Width = Application.GetRealWidth(14 * functionCount.ToString().Length),
-                        Height = Application.GetRealHeight(24),
-                        TextColor = CSS_Color.MainColor,
-                        TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
-                        TextAlignment = TextAlignment.CenterLeft,
-                        Text = functionOnCount.ToString(),
-                        Tag = item + "_onCount",
-                        BorderWidth = 0,
-                    };
-                    functionView.AddChidren(btnOpenCount);
+                        btnFunctionCount.Text = functionCount.ToString();
+                    }
+                    functionView.AddChidren(btnFunctionCount);
+
+                    if (item != ShowFunction.Series)
+                    {
+                        Button btnOpenCount = new Button()
+                        {
+                            X = Application.GetRealWidth(16),
+                            Y = btnName.Bottom,
+                            Width = Application.GetRealWidth(14 * functionCount.ToString().Length),
+                            Height = Application.GetRealHeight(24),
+                            TextColor = CSS_Color.MainColor,
+                            TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+                            TextAlignment = TextAlignment.CenterLeft,
+                            Text = functionOnCount.ToString(),
+                            Tag = item + "_onCount",
+                            BorderWidth = 0,
+                        };
+                        functionView.AddChidren(btnOpenCount);
+                    }
                 }
 
 
@@ -834,6 +876,16 @@
                 int functionPageTitleId = 0;
                 switch (item)
                 {
+                    case ShowFunction.Series:
+                        btnName.TextID = StringId.HorseRaceLamp;
+                        functionPageTitleId = StringId.HorseRaceLamp;
+                        btnFunctionViewBg.MouseUpEventHandler = (sender, e) => {
+                            var page2 = new UI2.Classification.SeriesFunctionListPage();
+                            MainPage.BasePageView.AddChidren(page2);
+                            page2.LoadPage();
+                            MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+                        };
+                        break;
                     case ShowFunction.Light:
                         #region Light
                         btnName.TextID = StringId.Lights;
@@ -998,13 +1050,15 @@
                     case ShowFunction.EnergyMonitoring:
                         #region 鑳芥簮鐩戞祴
                         btnName.TextID = StringId.EnergyMonitoring;
-                        btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
-                        {
-                            var skipView = new EnergyMainPage();
-                            MainPage.BasePageView.AddChidren(skipView);
-                            skipView.LoadPage();
-                            MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
-                        };
+                        functionPageTitleId = StringId.EnergyMonitoring;
+
+                        //btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
+                        //{
+                        //    var skipView = new EnergyMainPage();
+                        //    MainPage.BasePageView.AddChidren(skipView);
+                        //    skipView.LoadPage();
+                        //    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+                        //};
                         #endregion
                         break;
                     case ShowFunction.Environmental:
@@ -1057,16 +1111,17 @@
                     case ShowFunction.Panel:
                         btnName.TextID = StringId.Panel;
                         break;
-                    case ShowFunction.SecurityMonitoring:
-                        btnName.TextID = StringId.EZVIZ;
-                        btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
-                        {
-                            HDLCommon.Current.Go2EZvizMonitor(bodyView);
-                        };
-                        break;
                     case ShowFunction.Sensor:
                         btnName.TextID = StringId.Sensor;
                         functionPageTitleId = StringId.Sensor;
+                        break;
+                    case ShowFunction.VideoIntercom://鍙瀵硅
+                        btnName.TextID = StringId.VideoIntercom;
+                        btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
+                        {
+                            var videoMethod = new UI2.FuntionControlView.Video.VideoMethod();
+                            videoMethod.MianView(this);
+                        };
                         break;
                     case ShowFunction.SecurityCenter:
                         btnName.TextID = StringId.SecurityCenter;
@@ -1078,98 +1133,58 @@
                             MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                         };
                         break;
+                    case ShowFunction.Aks:
 
+                        btnFunctionViewBg.UnSelectedImagePath = "FunctionIcon/FunctionBg/AksFunctionBg.png";
+                        //鍩冨厠鏂奖闊充腑鎺�
+                        btnName.TextID = StringId.jiatingyingyuan;
+                        btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
+                        {
+                            var list = HDL_ON.UI.UI2.FuntionControlView.Aks.AksCommonMethod.Current.GetVideoControlsList();
+                            var form = new HDL_ON.UI.UI2.FuntionControlView.Aks.AksListPage(() => {
+                                UpdateBottomView();
+                            });
+                            form.AddForm(list);
+                        };
+                        break;
 
                 }
-                //鐣岄潰璺宠浆--闊充箰璺宠浆鑷繁鐨勭晫闈�--鐜璺宠浆鑷繁鐨勭晫闈�
-                if (item != ShowFunction.Music && item != ShowFunction.Environmental && item != ShowFunction.SecurityMonitoring && item != ShowFunction.DoorLock
-                    && ShowFunction.EnergyMonitoring != item && ShowFunction.SecurityCenter != item
-                    )
+                //鐣岄潰璺宠浆--闊充箰璺宠浆鑷繁鐨勭晫闈�--鐜璺宠浆鑷繁鐨勭晫闈�--(钀ょ煶瑙嗛闂ㄩ攣)璺宠浆鑷繁鐨勭晫闈�--鍩冨厠鏂奖闊充腑鎺�
+                if ( item != ShowFunction.Aks
+                    && item != ShowFunction.Music
+                    && item != ShowFunction.Environmental
+                    && item != ShowFunction.DoorLock
+                    //&& ShowFunction.EnergyMonitoring != item
+                    && ShowFunction.VideoIntercom != item
+                    && ShowFunction.SecurityCenter != item
+                    && ShowFunction.Series != item)
                 {
                     btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
                     {
+                        
                         var skipView = new FunctionPage();
                         MainPage.BasePageView.AddChidren(skipView);
                         skipView.LoadPage(functionPageTitleId);
                         MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+                        skipView.DelAction += () =>
+                        {
+                           
+                            UpdateBottomView();
+                        };
                     };
                 }
                 index++;
             }
 
 
+
             s1View.Height = s2View.Height = functionContentView.Height = functionContentViewHeight + Application.GetRealWidth(40);
 
-            #endregion
+#endregion
         }
 
-        void refreshInverterInfo(Button btnPowerTenerationToday, Button btnWorkingMode, Button btnCurrentPowerGeneration)
-        {
-            new System.Threading.Thread(() =>
-            {
-                var http = new HttpServerRequest();
-                var pack = http.GetInverterStatisticsInfo();
-                if (pack != null)
-                {
-                    if(pack.Data == null)
-                    {
-                        return;
-                    }
-                    var info = JsonConvert.DeserializeObject<StatisticsInfo>(pack.Data?.ToString());
-                    if (info == null)
-                    {
-                        return;
-                    }
-                    try
-                    {
-                        Application.RunOnMainThread(() =>
-                        {
-                            btnPowerTenerationToday.Text = info.totalElectricityPvToday + "kW路h";// Language.StringByID(StringId.PowerTenerationToday).Replace("----", info.totalElectricityPvToday);
-                            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 = workModeString;// Language.StringByID(StringId.WorkingMode).Replace("----", workModeString);
-                            btnCurrentPowerGeneration.Text = info.powerPvNow + "w";// Language.StringByID(StringId.CurrentPowerGeneration).Replace("----", info.powerPvNow);
-                            //btnBatterySOC.Text = Language.StringByID(StringId.BatterySOC).Replace("--", info.batterySoc);
-                        });
-                    }
-                    catch (Exception ex)
-                    {
-                        MainPage.Log($"鑾峰彇瀹跺涵鍏変紡缁熻鏁版嵁寮傚父锛歿ex.Message}");
-                    }
-                }
+       
 
-
-            })
-            { IsBackground = true }.Start();
-        }
 
 #region 鍒囨崲妤煎眰
         /// <summary>
@@ -1328,6 +1343,18 @@
         {
 
         }
-#endregion
+        #endregion
+
+        /// <summary>
+        /// 鏇存柊搴曢儴鐣岄潰
+        /// </summary>
+        void UpdateBottomView()
+        {
+            Application.RunOnMainThread(() =>
+            {
+                functionContentView?.RemoveFromParent();
+                this.RefreshFunctionView();
+            });
+        }
     }
 }

--
Gitblit v1.8.0