From e4acb04670cee588ad45ef7d57a50dc3c928f2d9 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 04 六月 2024 13:23:17 +0800
Subject: [PATCH] 备份

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

diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
index 09ed33d..1e317aa 100644
--- a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
+++ b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -5,6 +5,7 @@
 using HDL_ON.Entity;
 using HDL_ON.UI;
 using HDL_ON.UI.CSS;
+using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock;
 using Newtonsoft.Json;
 using Newtonsoft.Json.Linq;
 using Shared;
@@ -361,14 +362,6 @@
             //2020-12-03 淇敼鍥剧墖鍔犺浇鏂规硶
             ImageUtlis.Current.LoadLocalOrNetworkImages(room.backgroundImage, roomViewbg);
 
-            var roomViewbgColor = new Button()
-            {
-                Height = Application.GetRealWidth(192),
-                Radius = (uint)Application.GetRealWidth(12),
-                BackgroundColor = 0x19333333,
-            };
-            roomView.AddChidren(roomViewbgColor);
-
             var btnFloorAndRoomName = new Button()
             {
                 X = Application.GetRealWidth(16),
@@ -378,8 +371,7 @@
                 Text = room.floorName + room.roomName,
                 TextAlignment = TextAlignment.CenterLeft,
                 TextColor = CSS_Color.MainBackgroundColor,
-                TextSize = CSS_FontSize.EmphasisFontSize_Secondary,
-                IsBold = true,
+                TextSize = CSS_FontSize.SubheadingFontSize,
             };
             roomView.AddChidren(btnFloorAndRoomName);
 
@@ -463,6 +455,13 @@
             //roomView.AddChidren(environmentalView);
             #endregion
 
+            var roomViewbgColor = new Button()
+            {
+                Height = Application.GetRealWidth(192),
+                Radius = (uint)Application.GetRealWidth(12),
+                BackgroundColor = 0x19333333,
+            };
+            roomView.AddChidren(roomViewbgColor);
 
             var btnAllClose = new Button()
             {
@@ -484,7 +483,8 @@
             //    BackgroundColor = CSS_Color.MainBackgroundColor,
             //};
             //roomView.AddChidren(btn);
-            EventHandler <MouseEventArgs> roomRowClick = (sender, e) =>
+
+            roomViewbgColor.MouseUpEventHandler += (sender, e) =>
             {
                 Action ReloadRoomName = () =>
                 {
@@ -509,10 +509,6 @@
                 view.LoadPage();
                 MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
             };
-            roomViewbgColor.MouseUpEventHandler = roomRowClick;
-            btnFloorAndRoomName.MouseUpEventHandler = roomRowClick;
-
-
         }
         /// <summary>
         /// 璁拌浇灏忓浘鎴块棿row
@@ -679,6 +675,7 @@
                 {
                     case ShowFunction.Series:
                         functionCount = FunctionList.List.GetSeries().Count;
+                        //functionOnCount = FunctionList.List.GetSeries().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
                         break;
                     case ShowFunction.IpCam:
                         //functionCount = FunctionList.List.GetIpCamImouList().Count;
@@ -751,7 +748,14 @@
                     case ShowFunction.SecurityMonitoring:
                         if (!MainPage.NoLoginMode)
                         {
-                            functionCount = 1;
+                            if (OnAppConfig.Instance.RequestHttpsHost.Contains("bahrain") || !Common.ApiUtlis.Ins.hadInternet)
+                            {
+                                functionCount = 0;
+                            }
+                            else
+                            {
+                                functionCount = 1;
+                            }
                         }
                         break;
                     case ShowFunction.Sensor:
@@ -765,6 +769,22 @@
                         break;
                     case ShowFunction.SecurityCenter:
                         functionCount = FunctionList.List.securities.Count;
+                        break;
+                    case ShowFunction.Acst:
+                        functionCount = FunctionList.List.GetAcstParentList().Count;
+                        functionOnCount = FunctionList.List.GetAcstParentList().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count;
+                        break;
+                    case ShowFunction.VideoDoorLock:
+                        if (Common.ApiUtlis.Ins.hadInternet)
+                        {
+                            functionCount = FunctionList.List.GetVideoDoorLockList().Count;
+                            functionOnCount = FunctionList.List.GetAcstParentList().FindAll((obj) => obj.GetAttrState("status").ToString() == "open"
+                                || obj.GetAttrState("status").ToString() == "normal_open").Count;
+                        }
+                        else
+                        {
+                            functionCount = 0;
+                        }
                         break;
                     case ShowFunction.Aks:
                         functionCount = FunctionList.List.GetVideoControlsList().Count;
@@ -829,6 +849,7 @@
                 //涓嶉渶瑕佹樉绀鸿澶囧紑鐘舵�佹暟閲�;
                 Button btnFunctionCount=null;
                 if (item != ShowFunction.Aks
+                    && item != ShowFunction.VideoDoorLock
                     && item != ShowFunction.Environmental
                     && item != ShowFunction.Sensor
                     && item != ShowFunction.VideoIntercom
@@ -837,7 +858,7 @@
                     && item != ShowFunction.Music
                     && item != ShowFunction.EnergyMonitoring
                     && item != ShowFunction.SecurityCenter
-                    && item != ShowFunction.IpCam
+                    && item != ShowFunction.Acst && item != ShowFunction.IpCam
                     && functionCount != 0)
                 {
                     btnFunctionCount = new Button()
@@ -1125,7 +1146,8 @@
                         break;
                     case ShowFunction.SecurityMonitoring:
                         btnName.TextID = StringId.EZVIZ;
-                        btnFunctionViewBg.MouseUpEventHandler = (sender, e) => {
+                        btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
+                        {
                             HDLCommon.Current.Go2EZvizMonitor(bodyView);
                         };
                         break;
@@ -1151,6 +1173,63 @@
                             MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                         };
                         break;
+                    case ShowFunction.Acst:
+                        btnName.TextID = StringId.Acst;
+
+                        Button btnJMLogo = new Button()
+                        {
+                            Y = specialList.Contains(index) ? Application.GetRealWidth(147) : Application.GetRealWidth(104),
+                            UnSelectedImagePath = "FunctionIcon/Acst/LvJianLogo.png",
+                            Width = Application.GetRealWidth(105),
+                            Height = Application.GetRealWidth(57),
+                        };
+                        functionView.AddChidren(btnJMLogo);
+
+                        //Button btnAcstPower = 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(btnAcstPower);
+                        //btnAcstPower.MouseUpEventHandler = (sender, e) =>
+                        //{
+                        //    btnAcstPower.IsSelected = !btnAcstPower.IsSelected;
+                        //    string onoff = btnAcstPower.IsSelected ? "on" : "off";
+                        //    Dictionary<string, string> d = new Dictionary<string, string>();
+                        //    d.Add(FunctionAttributeKey.OnOff, onoff);
+                        //    foreach (var temp in FunctionList.List.GetAcstParentList())
+                        //    {
+                        //        Control.Ins.SendWriteCommand(temp, d);
+                        //    }
+                        //};
+
+
+                        btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
+                        {
+                            var page = new AcstParentPage();
+                            MainPage.BasePageView.AddChidren(page);
+                            page.LoadPage();
+                            MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+                        };
+                        break;
+                    case ShowFunction.VideoDoorLock:
+                        //钀ょ煶瑙嗛闂ㄩ攣
+                        btnName.TextID = StringId.yingshishipinmensuo;
+                        btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
+                        {
+                            var list =CommonMethod.Current.GetVideoDoorLockList();
+                            var form = new VideoDoorLockListPage(()=> {
+                                UpdateBottomView();
+                            });
+                            form.AddForm(list);
+                        };
+                        break;
                     case ShowFunction.Aks:
 
                         btnFunctionViewBg.UnSelectedImagePath = "FunctionIcon/FunctionBg/AksFunctionBg.png";
@@ -1168,7 +1247,8 @@
 
                 }
                 //鐣岄潰璺宠浆--闊充箰璺宠浆鑷繁鐨勭晫闈�--鐜璺宠浆鑷繁鐨勭晫闈�--(钀ょ煶瑙嗛闂ㄩ攣)璺宠浆鑷繁鐨勭晫闈�--鍩冨厠鏂奖闊充腑鎺�
-                if ( item != ShowFunction.Aks
+                if (item != ShowFunction.VideoDoorLock
+                     && item != ShowFunction.Aks
                     && item != ShowFunction.Music
                     && item != ShowFunction.Environmental
                     && item != ShowFunction.SecurityMonitoring
@@ -1176,7 +1256,8 @@
                     //&& ShowFunction.EnergyMonitoring != item
                     && ShowFunction.VideoIntercom != item
                     && ShowFunction.SecurityCenter != item
-                    && ShowFunction.Series != item)
+                    && ShowFunction.Series != item
+                    && ShowFunction.Acst != item)
                 {
                     btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
                     {
@@ -1194,7 +1275,6 @@
                 }
                 index++;
             }
-
 
 
             s1View.Height = s2View.Height = functionContentView.Height = functionContentViewHeight + Application.GetRealWidth(40);

--
Gitblit v1.8.0