| | |
| | | this.remoteControl = remoteControlEntity; |
| | | //读缓存数据 |
| | | var collectList = AksCommonMethod.Current.CollectList; |
| | | this.mMovieLibraryList.AddRange(collectList); |
| | | this.mMovieCollectList .AddRange(collectList); |
| | | } |
| | | /// <summary> |
| | | /// 影片列表 |
| | | /// 影片收藏列表 |
| | | /// </summary> |
| | | private List<MovieLibrary> mMovieLibraryList=new List<MovieLibrary>(); |
| | | private List<MovieLibrary> mMovieCollectList =new List<MovieLibrary>(); |
| | | /// <summary> |
| | | /// 当前的遥控器对象 |
| | | /// </summary> |
| | |
| | | return; |
| | | } |
| | | vv.RemoveAll(); |
| | | int count = this.mMovieLibraryList == null ? 0 : this.mMovieLibraryList.Count; |
| | | int count = this.mMovieCollectList == null ? 0 : this.mMovieCollectList .Count; |
| | | imageFLayout = new CornerFramLayout(343, count * 168, 0); |
| | | vv.AddChidren(imageFLayout); |
| | | imageFLayout.X = Application.GetRealWidth(16); |
| | | imageFLayout.LoadImagePage(this.mMovieLibraryList); |
| | | imageFLayout.LoadImagePage(this.mMovieCollectList ); |
| | | imageFLayout.AdjustRealHeight(16); |
| | | |
| | | vv.BeginHeaderRefreshingAction += () => |
| | | { |
| | | //关闭刷新View; |
| | | vv.EndHeaderRefreshing(); |
| | | mMovieLibraryList.Clear(); |
| | | //强制更新 |
| | | mMovieCollectList .Clear(); |
| | | ReadData(); |
| | | }; |
| | | imageFLayout.selectImageAction += (movieLibrary) => |
| | |
| | | detailPage.Show(); |
| | | detailPage.action += (isUpdate) => |
| | | { |
| | | //是否要更新 |
| | | if (isUpdate) |
| | | { |
| | | this.mMovieLibraryList = AksCommonMethod.Current.CollectList; |
| | | |
| | | this.mMovieCollectList = AksCommonMethod.Current.CollectList; |
| | | InitMiddle(); |
| | | } |
| | | }; |
| | |
| | | /// </summary> |
| | | private void ReadData() |
| | | { |
| | | if (mMovieLibraryList.Count > 0) |
| | | if (mMovieCollectList .Count > 0) |
| | | { |
| | | CommonMethod.Current.MainThread(() => |
| | | { |
| | |
| | | { |
| | | try |
| | | { |
| | | this.mMovieLibraryList = SendMethod.Current.GetcollectPage(this.remoteControl.deviceId, this.remoteControl.rcId, pageNo, SendMethod.pageSize); |
| | | for (int i = 0; i < this.mMovieLibraryList.Count; i++) |
| | | this.mMovieCollectList = SendMethod.Current.GetcollectPage(this.remoteControl.deviceId, this.remoteControl.rcId, pageNo, SendMethod.pageSize); |
| | | for (int i = 0; i < this.mMovieCollectList .Count; i++) |
| | | { |
| | | var mMovieLibrary = this.mMovieLibraryList[i]; |
| | | var mMovieLibrary = this.mMovieCollectList [i]; |
| | | var bytes = SendMethod.Current.GetImage(mMovieLibrary.posterUrl); |
| | | mMovieLibrary.imageBytes = bytes; |
| | | //缓存数据 |
| | | AksCommonMethod.Current.AddCollectMovie(mMovieLibrary); |
| | | } |
| | | } |
| | | catch { } |