From 05adbc074259c66c7dd62bc9d9d60aadbb86df2d Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期五, 02 四月 2021 14:02:28 +0800
Subject: [PATCH] 2021-04-02 1.获取功能介绍增加英文适配

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

diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
index e38f393..8e33a2b 100644
--- a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
+++ b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -474,6 +474,11 @@
                         #endregion
                         break;
                     case ShowFunction.EnergyMonitoring:
+                        #region 鑳芥簮
+                        functionCount = FunctionList.List.GetElectricals().Count;
+                        functionOnCount = FunctionList.List.GetElectricals().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
+                        #endregion
+                        //functionCount = 1;
                         break;
                     case ShowFunction.Environmental:
                         #region 鐜鏁版嵁
@@ -496,6 +501,10 @@
                         functionCount = FunctionList.List.GetArmSensorList().Count;
                         break;
                     case ShowFunction.VideoIntercom:
+                        if (FunctionList.List.videoIntercom != null)
+                        {
+                            functionCount = 1;
+                        }
                         break;
 
                 }
@@ -554,6 +563,7 @@
 
                 if (item != ShowFunction.Environmental && item != ShowFunction.Sensor && item != ShowFunction.VideoIntercom
                     && item != ShowFunction.SecurityMonitoring && item != ShowFunction.FreshAir
+                    && item != ShowFunction.EnergyMonitoring
                     && functionCount != 0)
                 {
                     Button btnFunctionCount = new Button()
@@ -617,7 +627,7 @@
                             LoadEvent_SwitchFunction(btnLightPower, item, functionView);
                         };
                         functionPageTitleId = StringId.Lights;
-                      
+
                         #endregion
                         break;
                     case ShowFunction.AC:
@@ -723,7 +733,15 @@
                         #endregion
                         break;
                     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;
+                        };
+                        #endregion
                         break;
                     case ShowFunction.Environmental:
                         #region 鐜鏁版嵁
@@ -739,6 +757,27 @@
                         break;
                     case ShowFunction.FreshAir:
                         btnName.TextID = StringId.FreshAir;
+                        #region Light
+                        Button btnFreshAirPower = new Button()
+                        {
+                            X = Application.GetRealWidth(120),
+                            Y = specialList.Contains(index) ? Application.GetRealWidth(160) : Application.GetRealWidth(117),
+                            Width = Application.GetRealWidth(32),
+                            Height = Application.GetRealWidth(32),
+                            SelectedImagePath = "Public/PowerOpen.png",
+                            UnSelectedImagePath = "Public/PowerClose.png",
+                            IsSelected = functionOnCount > 0,
+                            Tag = item + "_AllControl",
+                        };
+                        functionView.AddChidren(btnFreshAirPower);
+
+                        btnFreshAirPower.MouseUpEventHandler = (sender, e) =>
+                        {
+                            LoadEvent_SwitchFunction(btnFreshAirPower, item, functionView);
+                        };
+                        functionPageTitleId = StringId.FreshAir;
+
+                        #endregion
                         break;
                     case ShowFunction.Music:
                         btnName.TextID = StringId.Music;
@@ -766,11 +805,17 @@
                         break;
                     case ShowFunction.VideoIntercom:
                         btnName.TextID = StringId.VideoIntercom;
+                        btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
+                        {
+                            var videoMethod = new UI2.FuntionControlView.Video.VideoMethod();
+                            videoMethod.MianView(this,FunctionList.List.videoIntercom);
+                        };
                         break;
 
                 }
                 //鐣岄潰璺宠浆--闊充箰璺宠浆鑷繁鐨勭晫闈�--鐜璺宠浆鑷繁鐨勭晫闈�
-                if (item != ShowFunction.Music && item != ShowFunction.Environmental && item != ShowFunction.SecurityMonitoring)
+                if (item != ShowFunction.Music && item != ShowFunction.Environmental && item != ShowFunction.SecurityMonitoring
+                    && ShowFunction.EnergyMonitoring!= item && ShowFunction.VideoIntercom != item)
                 {
                     btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
                     {

--
Gitblit v1.8.0