From 3e8ab638052329c43b399213ceca04df2b27685b Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期一, 14 八月 2023 17:38:52 +0800
Subject: [PATCH] 2023-08-14 17:38:47

---
 HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/HorizontalFramLayout.cs |   10 ++++
 HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs                               |   10 +++++
 HDL_ON/UI/UI2/1-HomePage/HomePage.cs                                    |    5 ++
 HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs                   |    4 ++
 HDL_ON/UI/UI2/FuntionControlView/Aks/YkPage.cs                          |   50 ++++++++++++++++++++++--
 5 files changed, 73 insertions(+), 6 deletions(-)

diff --git a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
index 96dd1af..322afd6 100644
--- a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
+++ b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
@@ -339,6 +339,16 @@
                             form.Show();
                         }
                         break;
+                    case SPK.AvZkAiks:
+                        {
+                            //褰遍煶涓帶
+                            var form = new UI2.FuntionControlView.Aks.AksPage(function, btnName, btnFromFloor, comerom, action);
+                            MainPage.BasePageView.AddChidren(form);
+                            MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+                            form.Show();
+
+                        }
+                        break;
                 }
             };
             return eventHandler;
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
index 255f9f7..82a771e 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -1556,6 +1556,11 @@
                     btnIcon.UnSelectedImagePath = UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.GetVideoDoorLockIcon(UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom.collect);
                     //btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png";
                 }
+                else if (function.spk == SPK.AvZkAiks)
+                {
+                    //涓轰簡鍘绘帀寮�鍏虫寜閽�
+                    //btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png";
+                }
                 //else if (function.spk == SPK.GroupControl)
                 //{
                 //    btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_blue.png";
diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
index 31d59cd..133fad5 100644
--- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
+++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
@@ -200,6 +200,10 @@
             {
                 btnIcon.UnSelectedImagePath =UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.GetVideoDoorLockIcon(UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom.function);
             }
+            else if (function.spk == SPK.AvZkAiks)
+            {
+                //闅愯棌寮�鍏虫寜閽�
+            }
             else if(function.spk == SPK.GroupControl) { }
             else if (function.spk == SPK.HvacCac)
             {
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/HorizontalFramLayout.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/HorizontalFramLayout.cs
index d6ffea3..0376e08 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/HorizontalFramLayout.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/HorizontalFramLayout.cs
@@ -58,6 +58,7 @@
                     Padding = new Padding(4, 4, 4, 4),
                     Radius = (uint)Application.GetRealHeight(4),
                     Tag = filters,
+                    Name = i.ToString(),
                 };
 
                 //閲嶆柊璁$畻缁勪欢瀹藉害
@@ -73,6 +74,11 @@
                 this.AddChidren(btnSpacing);
                 button.MouseDownEventHandler += (sen, e) =>
                 {
+                    if (btnSelected.Name == button.Name)
+                    {
+                        //鐐瑰嚮鍚屼竴涓粍浠舵棤鏁�
+                        return;
+                    }
                     btnSelected.IsSelected = false;
                     button.IsSelected = true;
                     btnSelected = button;
@@ -80,7 +86,9 @@
                     {
                         return;
                     }
-                    SelectTypeEvent?.Invoke((Filters)button.Tag);
+                    var filters = (Filters)button.Tag;
+
+                    SelectTypeEvent?.Invoke(filters);
 
                 };
                 if (defaultIndex != -1 && defaultIndex == i)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/YkPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/YkPage.cs
index edf6293..926232b 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Aks/YkPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Aks/YkPage.cs
@@ -4,6 +4,7 @@
 using HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView;
 using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock;
 using HDL_ON.UI.UI2.FuntionControlView.Aks.Entity;
+using System.Linq;
 
 namespace HDL_ON.UI.UI2.FuntionControlView.Aks
 {
@@ -13,6 +14,8 @@
     public class YkPage : FrameLayout
     {
 
+
+        private Dictionary<string, Filters> FiltersList = new Dictionary<string, Filters>();
         /// <summary>
         /// 
         /// </summary>
@@ -26,7 +29,7 @@
         /// </summary>
         RemoteControlEntity remoteControl;
         /// <summary>
-        /// 褰辩墖鍒嗙被鍒楄〃
+        /// 褰辩墖涓�绾у垎绫诲垪琛�
         /// </summary>
         List<FilterCategoryEntity> mFilterCategoryList;
         /// <summary>
@@ -34,7 +37,7 @@
         /// </summary>
         List<MovieLibrary> mMovieLibraryList;
         /// <summary>
-        /// 澶撮儴甯冨眬
+        /// 椤堕儴甯冨眬
         /// </summary>
         TopView topView;
 
@@ -104,17 +107,18 @@
             };
         }
         /// <summary>
-        /// 鍔犺浇鍒嗙被甯冨眬
+        /// 鍔犺浇涓�绾у垎绫诲竷灞�
         /// </summary>
         private void LoadFTypeLayout()
         {
-
+           
             fLayout.RemoveAll();
             int count = this.mFilterCategoryList == null ? 0 : this.mFilterCategoryList.Count;
             horizontalFl = new CornerFramLayout(375, count * 75);
             fLayout.AddChidren(horizontalFl);
             horizontalFl.LoadHorizontalPage(this.mFilterCategoryList);
             horizontalFl.AdjustRealHeight(20);
+            
             vv = new VerticalRefreshLayout()
             {
                 Y = horizontalFl.Bottom,
@@ -124,7 +128,32 @@
             //浜岀骇杩囨护浜嬩欢
             horizontalFl.selectKeyAction += (filters) =>
             {
+                AddMemoryFilters(filters);
+                CommonMethod.Current.Loading.Start();
+                CommonMethod.Current.SunThread(() =>
+                {
+                    try
+                    {
+                        this.mMovieLibraryList = SendMethod.Current.GetMovieLibraryPage(this.remoteControl.deviceId, this.remoteControl.rcId, this.FiltersList.Values.ToList(), pageNo, SendMethod.pageSize);
+                        for (int i = 0; i < this.mMovieLibraryList.Count; i++)
+                        {
+                            var mMovieLibrary = this.mMovieLibraryList[i];
+                            var bytes = SendMethod.Current.GetImage(mMovieLibrary.posterUrl);
+                            mMovieLibrary.imageBytes = bytes;
 
+                        }
+                    }
+                    catch { }
+                    finally
+                    {
+                        CommonMethod.Current.MainThread(() =>
+                        {
+                            CommonMethod.Current.Loading.Hide();
+                            this.LoadImageFLayout();
+
+                        });
+                    }
+                });
 
             };
 
@@ -139,7 +168,7 @@
                 return;
             }
             vv.RemoveAll();
-            int count =this.mMovieLibraryList == null ? 0 : this.mMovieLibraryList.Count;
+            int count = this.mMovieLibraryList == null ? 0 : this.mMovieLibraryList.Count;
             imageFLayout = new CornerFramLayout(343, count * 168, 0);
             vv.AddChidren(imageFLayout);
             imageFLayout.X = Application.GetRealWidth(16);
@@ -201,5 +230,16 @@
 
         }
 
+
+        private void AddMemoryFilters(Filters filters) {
+
+            if (FiltersList.ContainsKey(filters.category))
+            {
+                FiltersList.Remove(filters.category);
+            }
+            FiltersList.Add(filters.category, filters);
+        }
+
+
     }
 }

--
Gitblit v1.8.0