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/YkPage.cs | 50 +++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 45 insertions(+), 5 deletions(-) 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