mac
2023-10-19 baca65d449433d73516660d849c112ed8f5d3dd3
HDL_ON/UI/UI2/FuntionControlView/HisenseTV /HisenseTvPage.cs
@@ -178,17 +178,17 @@
            });
            //音量+
            btn_jia.MouseDownEventHandler += (sender, e) =>
            btn_jia.MouseUpEventHandler += (sender, e) =>
            {
                btn_jia.IsSelected = true;
                ControlCommand(HisenseTVFunctionalAttributeConstant.volume_add, "");
                this.SetButtonIsSelected(btn_jia);
            };
            //音量-
            btn_jian.MouseDownEventHandler += (sender, e) =>
            btn_jian.MouseUpEventHandler += (sender, e) =>
            {
                btn_jian.IsSelected = true;
                ControlCommand(HisenseTVFunctionalAttributeConstant.volume_subtract, "");
                this.SetButtonIsSelected(btn_jian);
            };
            //菜单
            caidanBtn.SetClickListener((btn) =>
@@ -499,16 +499,6 @@
            };
            yinliangFL.AddChidren(btn_jian);
            btn_jia.MouseUpEventHandler += (sender, e) =>
            {
                btn_jia.IsSelected = false;
            };
            btn_jian.MouseUpEventHandler += (sender, e) =>
            {
                btn_jian.IsSelected = false;
            };
            caidanBtn = new CustomButton();
            caidanBtn.TextID = StringId.caidan;
@@ -656,7 +646,7 @@
    /// <summary>
    /// 自定义(首页,关机,菜单)容器
    /// </summary>
    class CustomFrameLayout : FrameLayout
    class CustomFrameLayout : BaseFramLayout
    {
        public const int widthFrameLayout = 68;
        public const int heightFrameLayout = 68 + 8 + 20;
@@ -714,21 +704,11 @@
        /// <param name="button2">注意:在SetClickListener()前面调用AddImageView()才有效</param>
        public void SetClickListener(Action<FrameLayout, Button, Button> action)
        {
            EventHandler<MouseEventArgs> DownClick = (sender, e) =>
            {
                btnImage.IsSelected = true;
                //btnText.IsSelected = true;
                action?.Invoke(this, btnImage, btnText);
            };
            this.MouseDownEventHandler += DownClick;
            btnImage.MouseDownEventHandler += DownClick;
            btnText.MouseDownEventHandler += DownClick;
            EventHandler<MouseEventArgs> UpClick = (sender, e) =>
             {
                 btnImage.IsSelected = false;
                 //btnText.IsSelected = false;
                 action?.Invoke(this, btnImage, btnText);
                 SetButtonIsSelected(btnImage);
             };
            this.MouseUpEventHandler += UpClick;
            btnImage.MouseUpEventHandler += UpClick;
@@ -766,19 +746,12 @@
        /// <param name="action">回调(第一个是父类对象</param>
        public void SetClickListener(Action<Button> action)
        {
            EventHandler<MouseEventArgs> DownClick = (sender, e) =>
            {
                //this.BackgroundColor = 0xFFF2F3F7;
                this.IsSelected = true;
                action?.Invoke(this);
            };
            this.MouseDownEventHandler += DownClick;
            EventHandler<MouseEventArgs> UpClick = (sender, e) =>
            {
                //this.BackgroundColor = 0xffECEDEE;
                this.IsSelected = false;
                action?.Invoke(this);
                new BaseFramLayout().SetButtonIsSelected(this);
            };
            this.MouseUpEventHandler += UpClick;