| | |
| | | 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 |
| | | { |
| | |
| | | public class YkPage : FrameLayout |
| | | { |
| | | |
| | | |
| | | private Dictionary<string, Filters> FiltersList = new Dictionary<string, Filters>(); |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | |
| | | /// </summary> |
| | | RemoteControlEntity remoteControl; |
| | | /// <summary> |
| | | /// 影片分类列表 |
| | | /// 影片一级分类列表 |
| | | /// </summary> |
| | | List<FilterCategoryEntity> mFilterCategoryList; |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | List<MovieLibrary> mMovieLibraryList; |
| | | /// <summary> |
| | | /// 头部布局 |
| | | /// 顶部布局 |
| | | /// </summary> |
| | | TopView topView; |
| | | |
| | |
| | | }; |
| | | } |
| | | /// <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, |
| | |
| | | //二级过滤事件 |
| | | 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(); |
| | | |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | }; |
| | | |
| | |
| | | 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); |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | private void AddMemoryFilters(Filters filters) { |
| | | |
| | | if (FiltersList.ContainsKey(filters.category)) |
| | | { |
| | | FiltersList.Remove(filters.category); |
| | | } |
| | | FiltersList.Add(filters.category, filters); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |