mac
2024-07-25 3f6685c77beeb12baf840733fb890860f4c26e7c
HDL_ON/UI/UI2/FuntionControlView/Aks/CollectPage.cs
@@ -17,12 +17,12 @@
            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>
@@ -90,18 +90,19 @@
                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) =>
@@ -114,9 +115,11 @@
                    detailPage.Show();
                    detailPage.action += (isUpdate) =>
                    {
                        //是否要更新
                        if (isUpdate)
                        {
                            this.mMovieLibraryList = AksCommonMethod.Current.CollectList;
                            this.mMovieCollectList = AksCommonMethod.Current.CollectList;
                            InitMiddle();
                        }
                    };
@@ -130,7 +133,7 @@
        /// </summary>
        private void ReadData()
        {
            if (mMovieLibraryList.Count > 0)
            if (mMovieCollectList .Count > 0)
            {
                CommonMethod.Current.MainThread(() =>
                {
@@ -144,12 +147,14 @@
            {
                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 { }