wjc
2023-08-03 72c7bdb62b203eeb6a590e96bf25a4e186bd45cd
2023年08月03日20:21:49

更新一下
3个文件已添加
10个文件已修改
921 ■■■■■ 已修改文件
HDL_ON/HDL_ON.projitems 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Aks/AksMusicPage.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Aks/AksPage.cs 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Aks/CollectPage.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/ButtonFramLayout.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/CornerFramLayout.cs 173 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/HorizontalFramLayout.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/ImageFramlayout.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Aks/DetailPage.cs 375 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Aks/GFPage.cs 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Aks/TYYPage.cs 129 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Aks/YkPage.cs 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Music/View/SizeClass.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/HDL_ON.projitems
@@ -578,6 +578,9 @@
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\YkPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\CommonView\ImageFramlayout.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\CollectPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\DetailPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\GFPage.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\TYYPage.cs" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" />
HDL_ON/UI/UI2/FuntionControlView/Aks/AksMusicPage.cs
@@ -112,7 +112,7 @@
            cornerFram.X = Application.GetRealWidth(16);
            cornerFram.Y = btnTitle.Bottom + Application.GetRealHeight(16);
            this.AddChidren(cornerFram);
            cornerFram.SetList(cornerFram.GetTestList(17));
            cornerFram.SetList(cornerFram.GetTestList(16));
            cornerFram.SetMargin(16, 0, 16, 0);
            cornerFram.LoadButtonPage();
@@ -135,8 +135,9 @@
            typeMultiFramLayout = new TypeMultiFramLayout();
            typeMultiFramLayout.multiFramLayout.Y = menuFram.Bottom + Application.GetRealHeight(32);
            typeMultiFramLayout.AddView(cornerBottomFram);
            typeMultiFramLayout.btnBottonRightName.TextID = StringId.bofangqi;
            this.AdjustRealHeight(20);
            this.AdjustRealHeight(16);
        }
HDL_ON/UI/UI2/FuntionControlView/Aks/AksPage.cs
@@ -48,7 +48,9 @@
        /// 删除设备后需要更新界面的回调
        /// </summary>
        public Action action;
        /// <summary>
        /// 记录当前设备
        /// </summary>
        public IntType currnetIntType= IntType.none;
        public VerticalScrolViewLayout vv;
@@ -179,13 +181,7 @@
            });
        }
        /// <summary>
        /// 切换界面
        ///1 = 播放器
        ///2 = 功放
        ///3 = 电视
        ///4 = 机顶盒
        ///5 = 投影仪
        ///6 = 万能遥控器
        /// 切换界面(1 = 播放器,2 = 功放,3 = 电视,4 = 机顶盒,5 = 投影仪,6 = 万能遥控器)
        /// </summary>
        private void SwitchUI(IntType type)
        {
@@ -215,37 +211,46 @@
                        };
                    }
                    break;
                case IntType.HiFi: { } break;
                case IntType.HiFi: {
                        GFPage gFPage = new GFPage();
                        this.vv.AddChidren(gFPage);
                        gFPage.Show();
                        gFPage.action += (type) =>
                        {
                            SelectedType();
                        };
                    } break;
                case IntType.TV: { } break;
                case IntType.STB: { } break;
                case IntType.Projector: { } break;
                case IntType.Projector: {
                        TYYPage tYYPage = new TYYPage();
                        this.vv.AddChidren(tYYPage);
                        tYYPage.Show();
                        tYYPage.action += (type) =>
                        {
                            SelectedType();
                        };
                    } break;
                case IntType.Control: { } break;
            }
        }
        /// <summary>
        /// 选中类型
        ///1 = 播放器
        ///2 = 功放
        ///3 = 电视
        ///4 = 机顶盒
        ///5 = 投影仪
        ///6 = 万能遥控器
        /// 选中类型弹框(1 = 播放器,2 = 功放,3 = 电视,4 = 机顶盒,5 = 投影仪,6 = 万能遥控器)
        /// </summary>
        /// <param name="button">显示文本</param>
        private void SelectedType()
        {
            var deviceTypeList = GetTypeDictionary().Values.ToList();
            ///之前的状态文本
            string currCondition = Language.StringByID(StringId.bofangqi);
            string ccurrnetDeviceStr= this.GetValueString(this.currnetIntType);
            PublicInterface conditionView = new PublicInterface();
            conditionView.SingleSelectionShow(this, deviceTypeList, "设备选择", currCondition
               , (stateValue) =>
            conditionView.SingleSelectionShow(this, deviceTypeList, "设备选择", ccurrnetDeviceStr
               , (valueStr) =>
               {
                   //界面显示选中值
                   //button.Text = stateValue;
                   var intType = this.GetKeyIntType(stateValue);
                   var intType = this.GetKeyIntType(valueStr);
                   this.SwitchUI(intType);
               });
@@ -284,7 +289,7 @@
        }
        /// <summary>
        ///
        /// 初始化字典
        /// </summary>
        /// <returns></returns>
        private Dictionary<IntType, string> GetTypeDictionary()
@@ -298,6 +303,11 @@
            dic.Add(IntType.Control, Language.StringByID(StringId.xuniyaokongqi));
            return dic;
        }
        /// <summary>
        /// 获取设备
        /// </summary>
        /// <param name="value">(1 = 播放器,2 = 功放,3 = 电视,4 = 机顶盒,5 = 投影仪,6 = 万能遥控器)</param>
        /// <returns></returns>
        private IntType GetKeyIntType(string value)
        {
            var dic = this.GetTypeDictionary();
@@ -310,6 +320,11 @@
            }
            return IntType.none;
        }
        /// <summary>
        /// 获取设备名称
        /// </summary>
        /// <param name="key">(1 = 播放器,2 = 功放,3 = 电视,4 = 机顶盒,5 = 投影仪,6 = 万能遥控器)</param>
        /// <returns></returns>
        private string GetValueString(IntType key)
        {
            var dic = this.GetTypeDictionary();
HDL_ON/UI/UI2/FuntionControlView/Aks/CollectPage.cs
@@ -42,7 +42,6 @@
        }
        /// <summary>
        /// 初始化头部界面
        /// </summary>
@@ -81,7 +80,13 @@
            imageFLayout.LoadImagePage();
            imageFLayout.selectAction += (index) =>
            {
                Console.WriteLine("5");
                CommonMethod.Current.MainThread(() =>
                {
                    DetailPage detailPage = new DetailPage();
                    MainPage.BasePageView.AddChidren(detailPage);
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                    detailPage.Show();
                });
            };
            imageFLayout.AdjustRealHeight(16);
        }
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/ButtonFramLayout.cs
@@ -40,7 +40,6 @@
            TextAlignment = TextAlignment.Center,
            Gravity = Gravity.CenterHorizontal,
            Padding = new Padding(0, 20, 0, 20),
            IsMoreLines = true,
            Name = "btnName",
@@ -103,6 +102,7 @@
        /// </summary>
        public void AddLeftLine()
        {
            btnLeftLine.Height = this.Height;
            this.AddChidren(btnLeftLine);
        }
        /// <summary>
@@ -110,6 +110,8 @@
        /// </summary>
        public void AddRightLine()
        {
            btnRightLine.Height = this.Height;
            btnRightLine.X = this.Width - Application.GetRealWidth(1);
            this.AddChidren(btnRightLine);
        }
@@ -118,6 +120,7 @@
        /// </summary>
        public void AddTopLine()
        {
            btnTopLine.Width = this.Width;
            this.AddChidren(btnTopLine);
        }
        /// <summary>
@@ -125,6 +128,8 @@
        /// </summary>
        public void AddBottomLine()
        {
            btnBottomLine.Y = this.Height - Application.GetRealHeight(1);
            btnBottomLine.Width = this.Width;
            this.AddChidren(btnBottomLine);
        }
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/CornerFramLayout.cs
@@ -19,13 +19,15 @@
        /// </summary>
        private int mRowNumber;
        private List<int> mList;
        private List<string> mList;
        public Action<int> selectAction = null;
        public Action<string> selectAction = null;
        /// <summary>
        /// 当前选择的索引(内部使用)
        /// </summary>
        private int CurrnetSelectIndex = -1;
        /// <summary>
        /// 
        /// </summary>
@@ -33,13 +35,14 @@
        /// <param name="height">容器高度</param>
        ///<param name="rowNumber">一行几个元素</param>
        ///<param name="rowNumber">圆角值</param>
        public CornerFramLayout(int width, int height, int rowNumber,int radius=0)
        public CornerFramLayout(int width, int height, int rowNumber = 0, int radius = 0)
        {
            this.BackgroundColor = MusicColor.WhiteColor;
            this.Width = Application.GetRealWidth(width);
            this.Height = Application.GetRealHeight(height);
            this.Radius = (uint)Application.GetRealHeight(radius);
            this.mRowNumber = rowNumber;
        }
        /// <summary>
@@ -61,11 +64,11 @@
        /// 设置列表数据(请在初始化完成之前调用)
        /// </summary>
        /// <param name="list"></param>
        public void SetList(List<int> list)
        public void SetList(List<string> list)
        {
            if (list == null)
            {
                list = new List<int>();
                list = new List<string>();
            }
            this.mList = list;
        }
@@ -73,18 +76,26 @@
        /// <summary>
        /// 获取测试列表数据
        /// </summary>
        public List<int> GetTestList(int count)
        public List<string> GetTestList(int count)
        {
            var list = new List<int>();
            var list = new List<string>();
            for (int i = 1; i <= count; i++)
            {
                list.Add(i);
                if (i % 2 == 0)
                {
                    list.Add("你好傻哦!");
                }
                else
                {
                    list.Add("真的是这样的吗?");
                }
            }
            return list;
        }
        /// <summary>
        /// 动态加载按键界面
        /// (注意:mRowNumber!=0)
        /// </summary>
        public void LoadButtonPage()
        {
@@ -96,9 +107,10 @@
            int xCount = 0;
            for (int i = 1; i <= this.mList.Count; i++)
            {
                ButtonFramLayout buttonFram = new ButtonFramLayout();
                var d = this.mList[i - 1];
                ButtonFramLayout buttonFram = new ButtonFramLayout();
                this.AddChidren(buttonFram);
                buttonFram.Tag = i - 1;
                buttonFram.Tag = d;
                buttonFram.Y = Application.GetRealHeight(this.topMargin) + Application.GetRealHeight(ButtonFramLayout.heightFrameLayout * line);
                buttonFram.X = Application.GetRealWidth(this.leftMargin) + Application.GetRealWidth(ButtonFramLayout.widthFrameLayout * xCount);
                buttonFram.AddImageView();
@@ -111,7 +123,7 @@
                {
                    buttonFram.AddBottomLine();
                }
                buttonFram.GetNameButton().Text = i.ToString();
                buttonFram.GetNameButton().Text = d;
                xCount++;
                if (i % this.mRowNumber == 0)
@@ -122,7 +134,10 @@
                }
                buttonFram.SetClickListener((fl, btnIcon, btnName) =>
                {
                    selectAction?.Invoke((int)buttonFram.Tag);
                    if (buttonFram.Tag != null)
                    {
                        selectAction?.Invoke(buttonFram.Tag.ToString());
                    }
                });
                //if (CurrnetSelectIndex != -1 && CurrnetSelectIndex == i)
@@ -131,6 +146,76 @@
                //}
            }
        }
        /// <summary>
        /// 动态加载按键界面
        /// </summary>
        /// <param name="list">索引列表,表示某一条宽度加宽</param>
        public void LoadButtonPage(List<int> list)
        {
            int currnetheightValue = 0;
            int currnetWidthValue = 0;
            //获取相对一个纬度值
            int heightDimensionValue = this.Height - Application.GetRealHeight(this.topMargin) - Application.GetRealHeight(this.bottomMargin) - Application.GetRealHeight(ButtonFramLayout.heightFrameLayout / 2);
            int widthDimensionValue = this.Width - Application.GetRealWidth(this.leftMargin) - Application.GetRealWidth(this.rightMargin) - Application.GetRealHeight(ButtonFramLayout.widthFrameLayout / 2);
            for (int i = 1; i <= this.mList.Count; i++)
            {
                var d = this.mList[i - 1];
                ButtonFramLayout buttonFram = null;
                if (list.Contains(i))
                {
                    buttonFram = new ButtonFramLayout(ButtonFramLayout.widthFrameLayout * 2);
                    buttonFram.Y = Application.GetRealHeight(this.topMargin) + Application.GetRealHeight(currnetheightValue);
                    buttonFram.X = Application.GetRealWidth(this.leftMargin) + Application.GetRealWidth(currnetWidthValue);
                    currnetWidthValue += ButtonFramLayout.widthFrameLayout * 2;
                }
                else
                {
                    buttonFram = new ButtonFramLayout();
                    buttonFram.Y = Application.GetRealHeight(this.topMargin) + Application.GetRealHeight(currnetheightValue);
                    buttonFram.X = Application.GetRealWidth(this.leftMargin) + Application.GetRealWidth(currnetWidthValue);
                    currnetWidthValue += ButtonFramLayout.widthFrameLayout;
                }
                this.AddChidren(buttonFram);
                buttonFram.AddImageView();
                buttonFram.AddNameView();
                buttonFram.Tag = d;//标记数据
                buttonFram.GetNameButton().Text = d.ToString();
                if (widthDimensionValue > Application.GetRealWidth(currnetWidthValue))
                {
                    //加右线
                    buttonFram.AddRightLine();
                }
                if (heightDimensionValue > buttonFram.Bottom)
                {
                    //加底线
                    buttonFram.AddBottomLine();
                }
                if (widthDimensionValue < Application.GetRealWidth(currnetWidthValue))
                {
                    currnetheightValue += ButtonFramLayout.heightFrameLayout;
                    currnetWidthValue = 0;
                }
                buttonFram.SetClickListener((fl, btnIcon, btnName) =>
                {
                    if (buttonFram.Tag != null)
                    {
                        selectAction?.Invoke(buttonFram.Tag.ToString());
                    }
                });
                //if (CurrnetSelectIndex != -1 && CurrnetSelectIndex == i)
                //{
                //    selectAction?.Invoke((int)buttonFram.Tag);
                //}
            }
        }
@@ -148,16 +233,13 @@
            int xCount = 0;
            for (int i = 1; i <= this.mList.Count; i++)
            {
                var d = this.mList[i - 1];
                ImageFramlayout imageFram = new ImageFramlayout();
                imageFram.AddView(this);
                //this.AddChidren(imageFram);
                imageFram.Tag = i - 1;
                imageFram.Y = Application.GetRealHeight(this.topMargin)+ Application.GetRealHeight((ImageFramlayout.heightFrameLayout + 20) * line);
                imageFram.Tag = d;
                imageFram.Y = Application.GetRealHeight(this.topMargin) + Application.GetRealHeight((ImageFramlayout.heightFrameLayout + 20) * line);
                imageFram.X = Application.GetRealWidth((ImageFramlayout.widthFrameLayout + 8) * xCount);
                //imageFram.AddImageView();
                //imageFram.AddScoreButton();
                //imageFram.AddNameButton();
                imageFram.btnName.Text = i.ToString();
                imageFram.btnName.Text = d;
                xCount++;
                if (i % this.mRowNumber == 0)
@@ -168,7 +250,10 @@
                }
                imageFram.SetClickListener((fl) =>
                {
                    selectAction?.Invoke((int)imageFram.Tag);
                    if (imageFram.Tag != null)
                    {
                        selectAction?.Invoke(imageFram.Tag.ToString());
                    }
                });
                //if (CurrnetSelectIndex != -1 && CurrnetSelectIndex == i)
@@ -192,22 +277,23 @@
        /// <summary>
        /// 最后一行
        /// </summary>
        /// <param name="value"></param>
        /// <param name="index">当前索引值</param>
        /// <returns></returns>
        private bool IsLastColumn(int value)
        private bool IsLastColumn(int index)
        {
            int lineCount = this.mList.Count / this.mRowNumber;
            int lineCount = this.mList.Count / this.mRowNumber;//得出行数
            int number = this.mList.Count % this.mRowNumber;
            if (number != 0)
            {
                if (value > lineCount * this.mRowNumber)
                if (index > lineCount * this.mRowNumber)
                {
                    return true;
                }
            }
            else
            {
                if (value > lineCount-- * this.mRowNumber)
                int value = --lineCount * this.mRowNumber;
                if (index > value)
                {
                    return true;
                }
@@ -229,5 +315,42 @@
            };
            return false;
        }
        /// <summary>
        /// 重新计算button宽度
        /// </summary>
        /// <param name="button">控件</param>
        /// <param name="widthMax">宽度最大最</param>
        /// <param name="padding">内边距</param>
        private void AdjustRealWidth(Button button, int widthMax = 0, int padding = 0)
        {
            if (button == null)
            {
                return;
            }
            int width;
            if (widthMax == 0)
            {
                //内边距
                width = button.GetTextWidth() + Application.GetRealWidth(padding * 2);
            }
            else
            {
                if (button.GetTextWidth() > Application.GetRealWidth(widthMax))
                {
                    button.TextSize = 10;//控件高度不变,改变字体大小,准备换行;
                    width = Application.GetRealWidth(widthMax);
                }
                else
                {
                    width = button.GetTextWidth();
                }
            }
            button.Width = width;
        }
    }
}
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/HorizontalFramLayout.cs
@@ -10,9 +10,15 @@
    /// </summary>
    public class HorizontalFramLayout : HorizontalScrolViewLayout
    {
        public HorizontalFramLayout()
        /// <summary>
        ///
        /// </summary>
        /// <param name="width">容器宽度</param>
        /// <param name="height">容器高度</param>
        public HorizontalFramLayout(int width, int height)
        {
            this.Height = Application.GetRealHeight(28);
            this.Height = Application.GetRealHeight(height);
            this.Width = Application.GetRealWidth(width);
        }
        private List<string> mList = new List<string>();
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/ImageFramlayout.cs
@@ -68,7 +68,7 @@
        {
            EventHandler<MouseEventArgs> UpClick = (sender, e) =>
            {
                this.BackgroundColor = 0x00000000;
                //this.BackgroundColor = 0x00000000;
                //弹起来还原背景颜色
            };
@@ -90,7 +90,7 @@
            EventHandler<MouseEventArgs> DownClick = (sender, e) =>
            {
                //按下去改变背景颜色
                this.BackgroundColor = 0xff454635;
                //this.BackgroundColor = 0xff454635;
                action?.Invoke(this);
            };
            this.MouseUpEventHandler += DownClick;
HDL_ON/UI/UI2/FuntionControlView/Aks/DetailPage.cs
New file
@@ -0,0 +1,375 @@
using Shared;
using System;
using System.Collections.Generic;
using System.Text;
using HDL_ON.UI.CSS;
using HDL_ON.Entity;
using HDL_ON.DriverLayer;
using HDL_ON.UI.Music;
using HDL_ON.UI.UI2.Intelligence.Automation;
using System.Linq;
using HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView;
using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock;
namespace HDL_ON.UI.UI2.FuntionControlView.Aks
{
    /// <summary>
    /// 影片详情界面
    /// </summary>
    public class DetailPage : FrameLayout
    {
        public DetailPage()
        {
        }
        /// <summary>
        /// 头部布局
        /// </summary>
        private TopView topView;
        /// <summary>
        /// 删除设备后需要更新界面的回调
        /// </summary>
        public Action action;
        /// <summary>
        /// 立即播放
        /// </summary>
        Button btnPaly;
        public void Show()
        {
            //初始化UI
            this.InitTop();
            this.InitMiddle();
            //初始化事件
            this.EventListener();
            //读取数据
        }
        /// <summary>
        /// 初始化头部界面
        /// </summary>
        private void InitTop()
        {
            this.BackgroundColor = MusicColor.ViewColor;
            this.topView = new TopView();
            this.topView.setBtn.Visible = false;
            this.topView.topNameBtn.TextID = StringId.yingpianjieshao;
            this.AddChidren(topView.TopFLayoutView());
        }
        /// <summary>
        /// 初始化中部界面
        /// </summary>
        private void InitMiddle()
        {
            var vv = new VerticalScrolViewLayout
            {
                Y = topView.fLayout.Bottom,
                Height = Application.GetRealHeight(H_W.H - H_W.T_Height),
                BackgroundColor = MusicColor.WhiteColor,
            };
            this.AddChidren(vv);
            BaseFramLayout baseFramLayout = new BaseFramLayout();
            vv.AddChidren(baseFramLayout);
            Button btnImage = new Button
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealHeight(16),
                Width = Application.GetRealWidth(140),
                Height = Application.GetRealHeight(180),
                BackgroundColor = 0xff765723,
                //UnSelectedImagePath = "AksIcon/kai.png",
                Radius = (uint)Application.GetRealHeight(12),
            };
            baseFramLayout.AddChidren(btnImage);
            //电影名称
            Button btnName = new Button
            {
                X = btnImage.Right + Application.GetRealWidth(16),
                Y = Application.GetRealHeight(36),
                Width = Application.GetRealWidth(178),
                Height = Application.GetRealHeight(45),
                Text = "嗨起来了兄弟们,年底分红,你拿7份,我拿3份",
                TextColor = MusicColor.TextColor,
                TextSize = TextSize.Text16,
                TextAlignment = TextAlignment.CenterLeft,
                IsBold = true,
                IsMoreLines=true,
            };
            baseFramLayout.AddChidren(btnName);
            this.AdjustRealWidth(btnName, 178);
            //年份
            Button btnYear = new Button
            {
                X = btnImage.Right + Application.GetRealWidth(16),
                Y = btnName.Bottom + Application.GetRealHeight(12),
                Width = Application.GetRealWidth(34),
                Height = Application.GetRealHeight(20),
                Text = "2023",
                TextColor = MusicColor.TextColor,
                TextSize = TextSize.Text14,
                TextAlignment = TextAlignment.CenterLeft,
            };
            baseFramLayout.AddChidren(btnYear);
            this.AdjustRealWidth(btnYear, 34);
            //"/"
            Button btnSlope = new Button
            {
                X = btnYear.Right + Application.GetRealWidth(8),
                Y = btnName.Bottom + Application.GetRealHeight(12),
                Width = Application.GetRealWidth(34),
                Height = Application.GetRealHeight(20),
                Text = "/",
                TextColor = MusicColor.LineColor,
                TextSize = TextSize.Text14,
            };
            baseFramLayout.AddChidren(btnSlope);
            //地区
            Button btnRegion = new Button
            {
                X = btnSlope.Right + Application.GetRealWidth(8),
                Y = btnName.Bottom + Application.GetRealHeight(12),
                Width = Application.GetRealWidth(140),
                Height = Application.GetRealHeight(20),
                Text = "中国好电影",
                TextColor = MusicColor.TextColor,
                TextSize = TextSize.Text14,
                TextAlignment = TextAlignment.CenterLeft,
            };
            baseFramLayout.AddChidren(btnRegion);
            this.AdjustRealWidth(btnRegion, 140);
            //电影分数
            Button btnGrade = new Button
            {
                X = btnImage.Right + Application.GetRealWidth(16),
                Y = btnYear.Bottom + Application.GetRealHeight(20),
                Width = Application.GetRealWidth(45),
                Height = Application.GetRealHeight(43),
                Text = "9.9",
                TextSize = 32,
                TextColor = MusicColor.TextColor,
                TextAlignment = TextAlignment.CenterLeft,
                IsBold = true,
            };
            baseFramLayout.AddChidren(btnGrade);
            this.AdjustRealWidth(btnGrade, 45);
            //
            Button btnScore = new Button
            {
                X = btnGrade.Right + Application.GetRealWidth(8),
                Y = btnYear.Bottom + Application.GetRealHeight(46),
                Width = Application.GetRealWidth(26),
                Height = Application.GetRealHeight(17),
                TextID = StringId.pingfen,
                TextColor = 0xffA5AEBC,
                TextSize = TextSize.Text12,
                TextAlignment = TextAlignment.CenterLeft,
            };
            baseFramLayout.AddChidren(btnScore);
            Button btnCollectImage = new Button
            {
                X = btnImage.Right + Application.GetRealWidth(167),
                Y = btnRegion.Bottom + Application.GetRealHeight(12),
                Width = Application.GetRealWidth(32),
                Height = Application.GetRealWidth(32),
                UnSelectedImagePath = "MusicIcon/collect.png",
                SelectedImagePath = "MusicIcon/collectSelected.png",
            };
            baseFramLayout.AddChidren(btnCollectImage);
            Button btnCollectText = new Button
            {
                X = btnImage.Right + Application.GetRealWidth(169),
                Y = btnCollectImage.Bottom + Application.GetRealHeight(2),
                Width = Application.GetRealWidth(36),
                Height = Application.GetRealHeight(17),
                TextID = StringId.weishoucang,
                TextColor = 0xffA5AEBC,
                TextSize = TextSize.Text12,
                TextAlignment = TextAlignment.CenterLeft,
            };
            baseFramLayout.AddChidren(btnCollectText);
            //电影简介
            Button btnIntroduceTitle = new Button
            {
                X =Application.GetRealWidth(16),
                Y = btnImage.Bottom + Application.GetRealHeight(28),
                Width = Application.GetRealWidth(300),
                Height = Application.GetRealHeight(23),
                //TextID = StringId.,
                Text= "电影简介",
                TextColor = MusicColor.TextColor,
                TextSize = TextSize.Text16,
                TextAlignment = TextAlignment.CenterLeft,
                IsBold=true,
            };
            baseFramLayout.AddChidren(btnIntroduceTitle);
            //电影简介内容
            Button btnIntroduceContent = new Button
            {
                X = Application.GetRealWidth(16),
                Y = btnIntroduceTitle.Bottom + Application.GetRealHeight(12),
                Width = Application.GetRealWidth(343),
                Height = Application.GetRealHeight(140),
                //TextID = StringId.,
                Text = "电影名称:《可怕的一堂课》电影长度:大约1小时左右演员介绍:主人公:本人(也就是我)配角:表哥、表哥的妈妈、本人的妈妈、可怕的老师和一些学生影片简介:在一个阳光明媚的早晨,我和表哥被各自的妈妈逼着去一个英语学校学英语。虽然早晨阳光明媚,但我的心里却在下着大雨(心情很不好),要是英语课能变成电脑课就好了(我的强项)",
                TextColor = MusicColor.TextCancelColor,
                TextSize = TextSize.Text14,
                TextAlignment = TextAlignment.TopLeft,
                IsBold = true,
                IsMoreLines=true,
            };
            baseFramLayout.AddChidren(btnIntroduceContent);
            #region -----演员照片 名称------
            //演员
            Button btnActor = new Button
            {
                X = Application.GetRealWidth(16),
                Y = btnIntroduceContent.Bottom + Application.GetRealHeight(28),
                Width = Application.GetRealWidth(300),
                Height = Application.GetRealHeight(23),
                //TextID = StringId.yan,
                Text = "演员",
                TextColor = MusicColor.TextColor,
                TextSize = TextSize.Text16,
                TextAlignment = TextAlignment.CenterLeft,
                IsBold = true,
            };
            baseFramLayout.AddChidren(btnActor);
            HorizontalScrolViewLayout horizontalFram = new HorizontalScrolViewLayout {
                Y= btnActor.Bottom+ Application.GetRealHeight(12),
                X = Application.GetRealWidth(16),
                Height =Application.GetRealHeight(112),
                Width=Application.GetRealWidth(375-16),
            };
            baseFramLayout.AddChidren(horizontalFram);
            for (int i = 0; i < 6; i++)
            {
                FrameLayout actorFrame = new FrameLayout
                {
                    Height = Application.GetRealHeight(112),
                    Width = Application.GetRealWidth(72),
                };
                horizontalFram.AddChidren(actorFrame);
                Button btnActorImage = new Button
                {
                    Width = Application.GetRealWidth(72),
                    Height = Application.GetRealHeight(84),
                    Radius = (uint)Application.GetRealHeight(8),
                    //UnSelectedImagePath = "Collection/CollectionGrayIcon.png",
                    BackgroundColor = 0xff765876,
                };
                actorFrame.AddChidren(btnActorImage);
                Button btnActorName = new Button
                {
                    Y = btnActorImage.Bottom + Application.GetRealHeight(8),
                    Width = Application.GetRealWidth(72),
                    Height = Application.GetRealHeight(20),
                    TextSize = TextSize.Text14,
                    TextColor = MusicColor.TextColor,
                    TextAlignment = TextAlignment.Center,
                    IsMoreLines = true,
                    Text = "刘德华",
                };
                actorFrame.AddChidren(btnActorName);
                //间隔,弄个空的进去占位置
                Button btnSpacing = new Button
                {
                    Width = Application.GetRealWidth(8),
                };
                horizontalFram.AddChidren(btnSpacing);
            }
            #endregion
            //立即播放
            btnPaly = new Button
            {
                Y = horizontalFram.Bottom + Application.GetRealHeight(70),
                Width = Application.GetRealWidth(220),
                Height = Application.GetRealHeight(44),
                TextID = StringId.lijibofang,
                TextColor = MusicColor.WhiteColor,
                TextSize = TextSize.Text16,
                TextAlignment = TextAlignment.Center,
                Gravity=Gravity.CenterHorizontal,
                BackgroundColor=MusicColor.SelectedColor,
                Radius=(uint)Application.GetRealHeight(22),
            };
            baseFramLayout.AddChidren(btnPaly);
            baseFramLayout.AdjustRealHeight(37);
        }
        /// <summary>
        /// 注册事件
        /// </summary>
        private void EventListener()
        {
            //返回
            this.topView.clickBackBtn.MouseUpEventHandler += (sender, e) =>
            {
                this.RemoveFromParent();
            };
            //立即播放
            this.btnPaly.MouseUpEventHandler += (sender, e) =>
            {
            };
        }
        /// <summary>
        /// 重新计算button宽度
        /// </summary>
        /// <param name="button">控件</param>
        /// <param name="widthMax">宽度最大最</param>
        /// <param name="padding">内边距</param>
        private void AdjustRealWidth(Button button, int widthMax = 0, int padding = 0)
        {
            if (button == null)
            {
                return;
            }
            int width;
            if (widthMax == 0)
            {
                //内边距
                width = button.GetTextWidth() + Application.GetRealWidth(padding * 2);
            }
            else
            {
                if (button.GetTextWidth() > Application.GetRealWidth(widthMax))
                {
                    width = Application.GetRealWidth(widthMax);
                }
                else
                {
                    width = button.GetTextWidth();
                }
            }
            button.Width = width;
        }
    }
}
HDL_ON/UI/UI2/FuntionControlView/Aks/GFPage.cs
New file
@@ -0,0 +1,102 @@
using System;
using System.Collections.Generic;
using HDL_ON.UI.Music;
using HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView;
using Shared;
using static HDL_ON.UI.UI2.FuntionControlView.Aks.AksPage;
namespace HDL_ON.UI.UI2.FuntionControlView.Aks
{
    /// <summary>
    /// 功放界面
    /// </summary>
    public class GFPage : BaseFramLayout
    {
        public GFPage()
        {
        }
        public Action<IntType> action;
        CornerFramLayout cornerFram;
        TypeMultiFramLayout typeMultiFramLayout;
        public void Show()
        {
            //初始化UI
            this.InitUI();
            //初始化事件
            this.EventListener();
            //读取数据
            this.ReadData();
        }
        private void ReadData()
        {
        }
        private void EventListener()
        {
            cornerFram.selectAction += (value) =>
            {
                Console.WriteLine("1");
            };
            typeMultiFramLayout.SetLeftFlClickListener((f) =>
            {
                SxqPage sxqPage = new SxqPage();
                MainPage.BasePageView.AddChidren(sxqPage);
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                sxqPage.Show();
            });
            typeMultiFramLayout.SetRightFlClickListener((f) =>
            {
                Console.WriteLine("4");
                action?.Invoke(IntType.HiFi);
            });
        }
        private void InitUI()
        {
            this.BackgroundColor = MusicColor.ViewColor;
            Button btnTitle = new Button
            {
                Y = Application.GetRealHeight(16),
                X = Application.GetRealWidth(16),
                Height = Application.GetRealHeight(22),
                Width = Application.GetRealWidth(200),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = MusicColor.TextColor,
                TextSize = TextSize.Text16,
                TextID = StringId.gongfan,
            };
            this.AddChidren(btnTitle);
            cornerFram = new CornerFramLayout(343, 452, 4, 17);
            cornerFram.X = Application.GetRealWidth(16);
            cornerFram.Y = btnTitle.Bottom + Application.GetRealHeight(16);
            this.AddChidren(cornerFram);
            cornerFram.SetList(cornerFram.GetTestList(17));
            cornerFram.SetMargin(16, 0, 16, 0);
            cornerFram.LoadButtonPage();
            CornerFramLayout cornerBottomFram = new CornerFramLayout(343, 72, 0, 17);
            cornerBottomFram.X = Application.GetRealWidth(16);
            cornerBottomFram.Y = cornerFram.Bottom + Application.GetRealHeight(16);
            cornerBottomFram.BackgroundColor = MusicColor.WhiteColor;
            cornerBottomFram.Radius = (uint)Application.GetRealHeight(17);
            this.AddChidren(cornerBottomFram);
            typeMultiFramLayout = new TypeMultiFramLayout();
            typeMultiFramLayout.multiFramLayout.Gravity = Gravity.Center;
            typeMultiFramLayout.AddView(cornerBottomFram);
            typeMultiFramLayout.btnBottonRightName.TextID = StringId.gongfan;
            this.AdjustRealHeight(16);
        }
    }
}
HDL_ON/UI/UI2/FuntionControlView/Aks/TYYPage.cs
New file
@@ -0,0 +1,129 @@
using System;
using System.Collections.Generic;
using HDL_ON.UI.Music;
using HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView;
using Shared;
using static HDL_ON.UI.UI2.FuntionControlView.Aks.AksPage;
namespace HDL_ON.UI.UI2.FuntionControlView.Aks
{
    /// <summary>
    /// 投影仪界面
    /// </summary>
    public class TYYPage : BaseFramLayout
    {
        public TYYPage()
        {
        }
        public Action<IntType> action;
        CornerFramLayout cornerTopFram;
        MenuFramLayout menuFram;
        TypeMultiFramLayout typeMultiFramLayout;
        public void Show()
        {
            //初始化UI
            this.InitUI();
            //初始化事件
            this.EventListener();
            //读取数据
            this.ReadData();
        }
        private void ReadData()
        {
        }
        private void EventListener()
        {
            cornerTopFram.selectAction += (value) =>
            {
                Console.WriteLine("1");
            };
            menuFram.SetTopClickListener((b) =>
            {
                Console.WriteLine("5");
            });
            menuFram.SetBottomClickListener((b) =>
            {
                Console.WriteLine("6");
            });
            menuFram.SetLeftClickListener((b) =>
            {
                Console.WriteLine("7");
            });
            menuFram.SetRightClickListener((b) =>
            {
                Console.WriteLine("8");
            });
            menuFram.SetOkClickListener((b) =>
            {
                Console.WriteLine("9");
            });
            typeMultiFramLayout.SetLeftFlClickListener((f) =>
            {
                SxqPage sxqPage = new SxqPage();
                MainPage.BasePageView.AddChidren(sxqPage);
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                sxqPage.Show();
            });
            typeMultiFramLayout.SetRightFlClickListener((f) =>
            {
                Console.WriteLine("4");
                action?.Invoke(IntType.HiFi);
            });
        }
        private void InitUI()
        {
            this.BackgroundColor = MusicColor.ViewColor;
            Button btnTitle = new Button
            {
                Y = Application.GetRealHeight(16),
                X = Application.GetRealWidth(16),
                Height = Application.GetRealHeight(22),
                Width = Application.GetRealWidth(200),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = MusicColor.TextColor,
                TextSize = TextSize.Text16,
                TextID = StringId.touyingyi,
            };
            this.AddChidren(btnTitle);
            cornerTopFram = new CornerFramLayout(343, 452 + 84, 4, 17);
            cornerTopFram.X = Application.GetRealWidth(16);
            cornerTopFram.Y = btnTitle.Bottom + Application.GetRealHeight(16);
            this.AddChidren(cornerTopFram);
            cornerTopFram.SetList(cornerTopFram.GetTestList(17));
            cornerTopFram.SetMargin(16, 0, 16, 0);
            cornerTopFram.LoadButtonPage(new List<int> { 3, 4, 5 });
            CornerFramLayout cornerBottomFram = new CornerFramLayout(343, 292, 0, 17);
            cornerBottomFram.X = Application.GetRealWidth(16);
            cornerBottomFram.Y = cornerTopFram.Bottom + Application.GetRealHeight(16);
            cornerBottomFram.BackgroundColor = MusicColor.WhiteColor;
            cornerBottomFram.Radius = (uint)Application.GetRealHeight(17);
            this.AddChidren(cornerBottomFram);
            menuFram = new MenuFramLayout();
            menuFram.Y = Application.GetRealHeight(24);
            menuFram.AddView(cornerBottomFram);
            typeMultiFramLayout = new TypeMultiFramLayout();
            typeMultiFramLayout.multiFramLayout.Y = menuFram.Bottom + Application.GetRealHeight(32);
            typeMultiFramLayout.AddView(cornerBottomFram);
            typeMultiFramLayout.btnBottonRightName.TextID = StringId.touyingyi;
            this.AdjustRealHeight(16);
        }
    }
}
HDL_ON/UI/UI2/FuntionControlView/Aks/YkPage.cs
@@ -73,12 +73,14 @@
            BaseFramLayout typeFLayout = new BaseFramLayout();
            fLayout.AddChidren(typeFLayout);
            int span= Application.GetRealHeight(20);//间隔
            int x = Application.GetRealHeight(16);//X轴偏移量
            HorizontalFramLayout horizontalFram = new HorizontalFramLayout();
            int span= 20;//间隔
            int x= 16;//X轴偏移量
            int width =375-x;
            int height = 28;
            HorizontalFramLayout horizontalFram = new HorizontalFramLayout(width, height);
            typeFLayout.AddChidren(horizontalFram);
            horizontalFram.Y = Application.GetRealHeight(20);
            horizontalFram.X = x;
            horizontalFram.Y = Application.GetRealHeight(span);
            horizontalFram.X = Application.GetRealHeight(x);
            horizontalFram.SetIndex(2);
            horizontalFram.SetList(horizontalFram.GetTestData);
            horizontalFram.InitControl();
@@ -86,10 +88,10 @@
                Console.WriteLine("1");
            };
            HorizontalFramLayout horizontalFram1 = new HorizontalFramLayout();
            HorizontalFramLayout horizontalFram1 = new HorizontalFramLayout(width, height);
            typeFLayout.AddChidren(horizontalFram1);
            horizontalFram1.Y = horizontalFram.Bottom + span;
            horizontalFram1.X = x;
            horizontalFram1.Y = horizontalFram.Bottom + Application.GetRealHeight(span);
            horizontalFram1.X = Application.GetRealHeight(x);
            horizontalFram1.SetIndex(2);
            horizontalFram1.SetList(horizontalFram1.GetTestData);
            horizontalFram1.InitControl();
@@ -97,20 +99,20 @@
                Console.WriteLine("2");
            };
            HorizontalFramLayout horizontalFram2 = new HorizontalFramLayout();
            HorizontalFramLayout horizontalFram2 = new HorizontalFramLayout(width, height);
            typeFLayout.AddChidren(horizontalFram2);
            horizontalFram2.Y = horizontalFram1.Bottom + span;
            horizontalFram2.X = x;
            horizontalFram2.Y = horizontalFram1.Bottom + Application.GetRealHeight(span);
            horizontalFram2.X = Application.GetRealHeight(x);
            horizontalFram2.SetIndex(2);
            horizontalFram2.SetList(horizontalFram2.GetTestData);
            horizontalFram2.InitControl();
            horizontalFram2.SelectTypeEvent += (index) => {
                Console.WriteLine("3");
            };
            HorizontalFramLayout horizontalFram3 = new HorizontalFramLayout();
            HorizontalFramLayout horizontalFram3 = new HorizontalFramLayout(width, height);
            typeFLayout.AddChidren(horizontalFram3);
            horizontalFram3.Y = horizontalFram2.Bottom + span;
            horizontalFram3.X = x;
            horizontalFram3.Y = horizontalFram2.Bottom + Application.GetRealHeight(span);
            horizontalFram3.X = Application.GetRealHeight(x);
            horizontalFram3.SetIndex(2);
            horizontalFram3.SetList(horizontalFram3.GetTestData);
            horizontalFram3.InitControl();
@@ -139,7 +141,14 @@
            imageFLayout.LoadImagePage();
            imageFLayout.selectAction += (index) =>
            {
                Console.WriteLine("5");
                CommonMethod.Current.MainThread(() =>
                {
                    DetailPage detailPage = new DetailPage();
                    MainPage.BasePageView.AddChidren(detailPage);
                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                    detailPage.Show();
                });
            };
            imageFLayout.AdjustRealHeight(16);
        }
HDL_ON/UI/UI2/FuntionControlView/Music/View/SizeClass.cs
@@ -68,6 +68,8 @@
        public const uint TextCancelColor = 0xFF798394;
    }
    public class H_W