wjc
2023-08-16 e46f393e6bfca4a963b00717d3b1250e5b937ef6
2023年08月16日10:56:22

备份一下代码
7个文件已修改
189 ■■■■ 已修改文件
HDL-ON_Android/HDL-ON_Android.csproj 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_APP_Project.sln 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/BaseFramLayout.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/ButtonFramLayout.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/CornerFramLayout.cs 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Aks/MusicPage.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Aks/YkPage.cs 101 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/HDL-ON_Android.csproj
@@ -79,9 +79,6 @@
    <Reference Include="System.Numerics.Vectors" />
    <Reference Include="System.Web.Services" />
    <Reference Include="System.Net" />
    <Reference Include="Shared.Droid">
      <HintPath>..\DLL\Shared.Droid.dll</HintPath>
    </Reference>
    <Reference Include="Shared.Droid.HDLWidget">
      <HintPath>..\DLL\Shared.Droid.HDLWidget.dll</HintPath>
    </Reference>
@@ -197,6 +194,9 @@
    <Reference Include="HdlEzvizDroid">
      <HintPath>..\DLL\HdlEzvizDroid.dll</HintPath>
    </Reference>
    <Reference Include="Shared.Droid">
      <HintPath>..\..\..\Shared.Droid.dll</HintPath>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="MainActivity.cs" />
HDL_APP_Project.sln
@@ -20,6 +20,11 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AliyuLog", "AliyuLog\AliyuLog.csproj", "{3A0E9FF9-56B6-4323-9AE6-2B22975E399B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "解决方案项", "解决方案项", "{3496ECBF-1379-4C3E-A97C-0C52BD7D7668}"
    ProjectSection(SolutionItems) = preProject
        .editorconfig = .editorconfig
    EndProjectSection
EndProject
Global
    GlobalSection(SharedMSBuildProjectFiles) = preSolution
        HDL_ON\HDL_ON.projitems*{09712674-2a38-407b-b1e2-560b2c352f9a}*SharedItemsImports = 4
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/BaseFramLayout.cs
@@ -34,7 +34,7 @@
        /// 获取坐标底部最下面的那个控件的底部坐标
        /// </summary>
        /// <returns></returns>
        private int GetLocationMostLastViewBottom()
        public int GetLocationMostLastViewBottom()
        {
            int bottomHeight = -1;
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/ButtonFramLayout.cs
@@ -154,6 +154,10 @@
                //弹起来还原背景颜色
            };
            this.Tag = "Cancel";
            btnImage.Tag = this.Tag;
            btnName.Tag = this.Tag;
            this.MouseUpEventHandler += UpClick;
            btnImage.MouseUpEventHandler += UpClick;
            btnName.MouseUpEventHandler += UpClick;
@@ -170,10 +174,12 @@
            EventHandler<MouseEventArgs> DownClick = (sender, e) =>
            {
                //按下去改变背景颜色
                this.BackgroundColor = 0xFFEFEFEF;
                action?.Invoke(this, btnImage, btnName);
            };
            this.MouseDownEventHandler += DownClick;
            btnImage.MouseDownEventHandler += DownClick;
            btnName.MouseDownEventHandler += DownClick;
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/CornerFramLayout.cs
@@ -15,6 +15,8 @@
        private int leftMargin;
        private int bottomMargin;
        private int rightMargin;
        private int mWidth;
        private int mHeight;
        /// <summary>
        /// 一行几个元素
        /// </summary>
@@ -45,6 +47,8 @@
            this.Width = Application.GetRealWidth(width);
            this.Height = Application.GetRealHeight(height);
            this.Radius = (uint)Application.GetRealHeight(radius);
            this.mWidth = this.Width;
            this.mHeight = this.Height;
        }
@@ -78,7 +82,7 @@
        /// </summary>
        /// <param name="mList">列表</param>
        /// <param name="mRowNumber">一行多少个元素</param>
        /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],大于范围,该值视为无效</param>
        /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],值超出范围视为无效</param>
        public void LoadButtonPage(List<KeypadEntity> mList, int mRowNumber, int defaultIndex = -1)
        {
            if (mList == null || mList.Count == 0)
@@ -146,7 +150,7 @@
        /// </summary>
        /// <param name="mList">列表</param>
        /// <param name="list"> 列表中索引,表示某一条宽度加宽,没有默认(new List<int>)</param>
        /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],大于范围,该值视为无效</param>
        /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],值超出范围视为无效</param>
        public void LoadButtonPage(List<KeypadEntity> mList, List<int> list,int defaultIndex=-1)
        {
            if (mList == null || mList.Count == 0)
@@ -224,7 +228,7 @@
        ///动态加载数字按键界面
        /// </summary>
        /// <param name="mList">列表</param>
        /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],大于范围,该值视为无效</param>
        /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],值超出范围视为无效</param>
        public void LoadNumberButtonPage(List<KeypadEntity> mList)
        {
            if (mList == null || mList.Count == 0)
@@ -291,7 +295,7 @@
        /// 影片布局
        /// </summary>
        /// <param name="mList">列表</param>
        /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],大于范围,该值视为无效</param>
        /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],值超出范围视为无效</param>
        public void LoadImagePage(List<MovieLibrary> mList)
        {
            if (mList == null || mList.Count == 0)
@@ -341,7 +345,7 @@
        /// 影片布局
        /// </summary>
        /// <param name="mRowNumber">一行多少个元素</param>
        /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],大于范围,该值视为无效</param>
        /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],值超出范围视为无效</param>
        public void LoadImagePage(List<MovieLibrary> mList, int mRowNumber)
        {
            if (mList == null || mList.Count == 0)
@@ -389,11 +393,63 @@
            }
        }
       private int currnetheightValue1 = 0;
       private int currnetWidthValue1 = 0;
       private int heightMaxValue1 = ImageFramlayout.heightFrameLayout;
       private int widthMaxValue1 = ImageFramlayout.widthFrameLayout;
        //获取相对一个纬度值
       private int widthDimensionValue1 = Application.GetRealWidth(343) - Application.GetRealHeight(ImageFramlayout.widthFrameLayout / 2);
        /// <summary>
        /// 加载影片列表布局
        /// (特殊布局)
        /// </summary>
        /// <param name="mList">列表</param>
        public void LoadImagePage(List<ImageFramlayout> imageFramlayoutList)
        {
            if (imageFramlayoutList==null||imageFramlayoutList.Count == 0)
            {
                return;
            }
            //int currnetheightValue = 0;
            //int currnetWidthValue = 0;
            //int heightMaxValue = ImageFramlayout.heightFrameLayout;
            //int widthMaxValue = ImageFramlayout.widthFrameLayout;
            ////获取相对一个纬度值
            //int heightDimensionValue = this.Height - Application.GetRealHeight(this.topMargin) - Application.GetRealHeight(this.bottomMargin) - Application.GetRealHeight(heightMaxValue / 2);
            //int widthDimensionValue = this.Width - Application.GetRealWidth(this.leftMargin) - Application.GetRealWidth(this.rightMargin) - Application.GetRealHeight(widthMaxValue / 2);
            for (int i = 0; i < imageFramlayoutList.Count; i++)
            {
                var imageFram = imageFramlayoutList[i];
                if (imageFram == null)
                {
                    continue;
                }
                imageFram.AddView(this);
                imageFram.Y =Application.GetRealHeight(this.topMargin) + Application.GetRealHeight(currnetheightValue1);
                imageFram.X = Application.GetRealWidth(currnetWidthValue1);
                currnetWidthValue1 += (widthMaxValue1 + 8);//8是隔间值
                if (widthDimensionValue1 < Application.GetRealWidth(currnetWidthValue1))
                {
                    currnetheightValue1 += (heightMaxValue1 + 20);//20是隔间值
                    currnetWidthValue1 = 0;
                }
                imageFram.SetClickListener((fl) =>
                {
                    if (imageFram.Tag != null && imageFram.Tag is MovieLibrary)
                    {
                        selectImageAction?.Invoke((MovieLibrary)imageFram.Tag);
                    }
                });
            }
        }
        /// <summary>
        /// 水平滑动布局
        /// </summary>
        /// <param name="mList">列表</param>
        /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],大于范围,该值视为无效</param>
        /// <param name="defaultIndex">默认值索引范围[0,mList.count-1],值超出范围视为无效</param>
        public void LoadHorizontalPage(List<FilterCategoryEntity> mList, int defaultIndex = -1)
        {
            if (mList == null || mList.Count == 0)
HDL_ON/UI/UI2/FuntionControlView/Aks/MusicPage.cs
@@ -58,6 +58,7 @@
            cornerFram.selectKeyAction += (keypadEntity) =>
            {
                if (keypadEntity == null)
                {
                    return;
HDL_ON/UI/UI2/FuntionControlView/Aks/YkPage.cs
@@ -24,6 +24,8 @@
        {
            this.remoteControl = remoteControlEntity;
        }
        List<ImageFramlayout> imageFramlayoutList =new List<ImageFramlayout>();
        /// <summary>
        /// 当前的遥控器对象
        /// </summary>
@@ -93,7 +95,7 @@
            {
                this.RemoveFromParent();
            };
            //收藏点击事件
            //收藏图标点击事件
            this.topView.clickSetBtn.MouseUpEventHandler += (sender, e) =>
            {
                CommonMethod.Current.MainThread(() =>
@@ -128,8 +130,9 @@
            //二级过滤事件
            horizontalFl.selectKeyAction += (filters) =>
            {
                pageNo = 1;//还原页数
                AddMemoryFilters(filters);
                UpdateData();
                UpdateData(true);
            };
        }
@@ -142,16 +145,38 @@
            {
                return;
            }
            vv.RemoveAll();
            vv.RemoveAll();
            int count = this.mMovieLibraryList == null ? 0 : this.mMovieLibraryList.Count;
            imageFLayout = new CornerFramLayout(343, count * 168, 0);
            vv.AddChidren(imageFLayout);
            imageFLayout.X = Application.GetRealWidth(16);
            imageFLayout.LoadImagePage(this.mMovieLibraryList);
            //imageFLayout.LoadImagePage(this.mMovieLibraryList);
            imageFLayout.LoadImagePage(imageFramlayoutList);
            imageFLayout.AdjustRealHeight(16);
            //更多的
            var btnMore = new Button
            {
                Width = Application.GetRealWidth(375),
                Height = Application.GetRealHeight(30),
                TextSize = TextSize.Text14,
                TextColor = MusicColor.TextColor,
                Text = "更多的...",
                TextAlignment = TextAlignment.TopCenter,
                Padding = new Padding(0, 20, 0, 20),
            };
            vv.AddChidren(btnMore);
            btnMore.MouseDownEventHandler += (sender,e) => {
                //主动更新数据
                UpdateData(false);
            };
            //影片事件
            imageFLayout.selectImageAction += (movieLibrary) =>
            {
                CommonMethod.Current.MainThread(() =>
                {
                    DetailPage detailPage = new DetailPage(remoteControl, movieLibrary);
@@ -166,9 +191,41 @@
            {
                //关闭刷新View;
                vv.EndHeaderRefreshing();
                UpdateData();
                //主动更新数据
                //UpdateData();
            };
        }
        /// <summary>
        /// 加载图片容器
        /// </summary>
        /// <param name="movieLibrary">movieLibrary</param>
        private void AddImageFramlayout(MovieLibrary movieLibrary)
        {
            CommonMethod.Current.MainThread(() =>
            {
                if (movieLibrary == null)
                {
                    return;
                }
                ImageFramlayout imageFram = new ImageFramlayout();
                //imageFram.AddView(this);
                imageFram.Tag = movieLibrary;
                imageFram.btnName.Text = movieLibrary.name;
                imageFram.btnImage.ImageBytes = movieLibrary.imageBytes;
                imageFram.btnScore.Text = movieLibrary.rating;
                //添加缓存
                imageFramlayoutList.Add(imageFram);
            });
        }
        /// <summary>
        /// 初始化数据
@@ -202,7 +259,8 @@
        /// <summary>
        /// 主动更新数据
        /// </summary>
        private void UpdateData()
        /// <param name="isUpdateData">是否是二级过滤,true表示是二级过滤过来的</param>
        private void UpdateData(bool isUpdateData)
        {
            CommonMethod.Current.Loading.Start();
@@ -219,7 +277,18 @@
                    CommonMethod.Current.MainThread(() =>
                    {
                        CommonMethod.Current.Loading.Hide();
                        this.LoadImageFLayout();
                        if (isUpdateData)
                        {
                            //清空所有旧影片数据,重新加载新影片数据
                            this.LoadImageFLayout();
                        }
                        else
                        {
                            //追加新数据在旧数据后面
                            imageFLayout.LoadImagePage(imageFramlayoutList);
                            imageFLayout.AdjustRealHeight(16);
                        }
                    });
                }
            });
@@ -227,15 +296,18 @@
        }
        /// <summary>
        /// 页面数据处理逻辑
        /// 数据处理逻辑
        /// </summary>
        /// <param name="newList">新列表数据</param>
        private void DataTreating(List<MovieLibrary> newList)
        {
            if (newList == null)
            if (newList == null || newList.Count == 0)
            {
                return;
            }
            //有新数据,清空旧数据
            imageFramlayoutList.Clear();
            for (int i = 0; i < newList.Count; i++)
            {
                var mMovieLibrary = newList[i];
@@ -245,19 +317,25 @@
                mMovieLibrary.imageBytes = bytes;
            }
            for (int i = 0; i < newList.Count; i++)
            {
                //去重
                var mMovieLibrary = this.mMovieLibraryList.Find((o) => o.movieId == newList[i].movieId);
                if (mMovieLibrary == null)
                {
                    //新列表默认加在前面
                    //新列表默认加在最前面
                    this.mMovieLibraryList.Insert(0, newList[i]);
                }
                //添加图片容器
                AddImageFramlayout(newList[i]);
            }
            if (newList.Count == SendMethod.pageSize)
            {
                //数据回复更新页数
                //更新页数
                pageNo++;
            }
@@ -270,7 +348,6 @@
        /// <param name="filters">过滤条件</param>
        private void AddMemoryFilters(Filters filters)
        {
            if (FiltersList.ContainsKey(filters.category))
            {
                FiltersList.Remove(filters.category);