wjc
2023-08-03 fd1f19e8479c764fa28b0da3a2f9b34a3debe772
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/ButtonFramLayout.cs
@@ -19,6 +19,7 @@
            this.Width = Application.GetRealWidth(width);
            this.Height = Application.GetRealHeight(height);
            this.Radius = (uint)Application.GetRealHeight(cornerValue);
            this.BackgroundColor = 0XFF457625;
        }
        Button btnImage = new Button
@@ -40,7 +41,6 @@
            TextAlignment = TextAlignment.Center,
            Gravity = Gravity.CenterHorizontal,
            Padding = new Padding(0, 20, 0, 20),
            IsMoreLines = true,
            Name = "btnName",
@@ -103,6 +103,7 @@
        /// </summary>
        public void AddLeftLine()
        {
            btnLeftLine.Height = this.Height;
            this.AddChidren(btnLeftLine);
        }
        /// <summary>
@@ -110,6 +111,8 @@
        /// </summary>
        public void AddRightLine()
        {
            btnRightLine.Height = this.Height;
            btnRightLine.X = this.Width - Application.GetRealWidth(1);
            this.AddChidren(btnRightLine);
        }
@@ -118,6 +121,7 @@
        /// </summary>
        public void AddTopLine()
        {
            btnTopLine.Width = this.Width;
            this.AddChidren(btnTopLine);
        }
        /// <summary>
@@ -125,6 +129,8 @@
        /// </summary>
        public void AddBottomLine()
        {
            btnBottomLine.Y = this.Height - Application.GetRealHeight(1);
            btnBottomLine.Width = this.Width;
            this.AddChidren(btnBottomLine);
        }
@@ -146,7 +152,7 @@
            EventHandler<MouseEventArgs> UpClick = (sender, e) =>
            {
                this.BackgroundColor = 0x00000000;
                action?.Invoke(this, btnImage, btnName);
                //弹起来还原背景颜色
            };
            this.MouseUpEventHandler += UpClick;
@@ -156,9 +162,7 @@
            //EventHandler<MouseEventArgs> MoveClick = (sender, e) =>
            //{
            //    Console.WriteLine("移动事件=====");
            //    this.BackgroundColor = 0x00000000;
            //    action?.Invoke(this, btnImage, btnName);
            //    //弹起来还原背景颜色
            //};
            //this.MouseMoveEventHandler += MoveClick;
@@ -169,6 +173,7 @@
            {
                //按下去改变背景颜色
                this.BackgroundColor = 0xff454635;
                action?.Invoke(this, btnImage, btnName);
            };
            this.MouseDownEventHandler += DownClick;
            btnImage.MouseDownEventHandler += DownClick;