mac
2023-10-16 d33b5b1a8ade81e5c738780d7a5610eb3b9fe712
HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/MenuFramLayout.cs
@@ -22,8 +22,8 @@
        {
            Y = Application.GetRealWidth(16),
            X = Application.GetRealWidth(78),
            Width = Application.GetRealWidth(24),
            Height = Application.GetRealHeight(20),
            Width = Application.GetRealWidth(24),//高度和宽高不一样,以宽度为维度计算,否则变形
            Height = Application.GetRealWidth(20),
            UnSelectedImagePath = "AksIcon/shang.png",
            SelectedImagePath = "AksIcon/shang_selected.png",
            Name = "上",
@@ -40,7 +40,7 @@
            Y = Application.GetRealWidth(144),
            X = Application.GetRealWidth(78),
            Width = Application.GetRealWidth(24),
            Height = Application.GetRealHeight(20),
            Height = Application.GetRealWidth(20),
            UnSelectedImagePath = "AksIcon/xia.png",
            SelectedImagePath = "AksIcon/xia_selected.png",
            Name = "下",
@@ -57,7 +57,7 @@
            Y = Application.GetRealWidth(78),
            X = Application.GetRealWidth(16),
            Width = Application.GetRealWidth(20),
            Height = Application.GetRealHeight(24),
            Height = Application.GetRealWidth(24),
            UnSelectedImagePath = "AksIcon/zuo.png",
            SelectedImagePath = "AksIcon/zuo_selected.png",
            Name = "左",
@@ -76,7 +76,7 @@
            Y = Application.GetRealWidth(78),
            X = Application.GetRealWidth(144),
            Width = Application.GetRealWidth(20),
            Height = Application.GetRealHeight(24),
            Height = Application.GetRealWidth(24),
            UnSelectedImagePath = "AksIcon/you.png",
            SelectedImagePath = "AksIcon/you_selected.png",
            Name = "右",
@@ -94,7 +94,7 @@
        Button btnOkbj = new Button
        {
            Gravity=Gravity.Center,
            Gravity = Gravity.Center,
            Width = Application.GetRealWidth(76),
            Height = Application.GetRealWidth(76),
            Radius = (uint)Application.GetRealWidth(38),
@@ -140,6 +140,10 @@
        {
            EventHandler<MouseEventArgs> UpClick = (sender, e) =>
            {
                KeypadEntity keypadEntity = new KeypadEntity();
                keypadEntity.name = btnTop.Name;
                keypadEntity.keypad = "key_up";
                action?.Invoke(keypadEntity);
                btnTop.IsSelected = false;
                //弹起来还原背景颜色
            };
@@ -151,10 +155,6 @@
            {
                //按下去改变背景颜色
                btnTop.IsSelected = true;
                KeypadEntity keypadEntity = new KeypadEntity();
                keypadEntity.name = btnTop.Name;
                keypadEntity.keypad = "key_up";
                action?.Invoke(keypadEntity);
            };
            btnTop.MouseDownEventHandler += DownClick;
            btnTopClick.MouseDownEventHandler += DownClick;
@@ -168,9 +168,11 @@
        {
            EventHandler<MouseEventArgs> UpClick = (sender, e) =>
            {
                KeypadEntity keypadEntity = new KeypadEntity();
                keypadEntity.name = btnBottom.Name;
                keypadEntity.keypad = "key_down";
                action?.Invoke(keypadEntity);
                btnBottom.IsSelected = false;
                //弹起来还原背景颜色
            };
            btnBottom.MouseUpEventHandler += UpClick;
@@ -180,10 +182,7 @@
            EventHandler<MouseEventArgs> DownClick = (sender, e) =>
            {
                btnBottom.IsSelected = true;
                KeypadEntity keypadEntity = new KeypadEntity();
                keypadEntity.name = btnBottom.Name;
                keypadEntity.keypad = "key_down";
                action?.Invoke(keypadEntity);
                //按下去改变背景颜色
            };
            btnBottom.MouseDownEventHandler += DownClick;
@@ -197,6 +196,10 @@
        {
            EventHandler<MouseEventArgs> UpClick = (sender, e) =>
            {
                KeypadEntity keypadEntity = new KeypadEntity();
                keypadEntity.name = btnLeft.Name;
                keypadEntity.keypad = "key_left";
                action?.Invoke(keypadEntity);
                btnLeft.IsSelected = false;
                //弹起来还原背景颜色
            };
@@ -207,10 +210,6 @@
            EventHandler<MouseEventArgs> DownClick = (sender, e) =>
            {
                btnLeft.IsSelected = true;
                KeypadEntity keypadEntity = new KeypadEntity();
                keypadEntity.name = btnLeft.Name;
                keypadEntity.keypad = "key_left";
                action?.Invoke(keypadEntity);
                //按下去改变背景颜色
            };
            btnLeft.MouseDownEventHandler += DownClick;
@@ -225,6 +224,10 @@
        {
            EventHandler<MouseEventArgs> UpClick = (sender, e) =>
            {
                KeypadEntity keypadEntity = new KeypadEntity();
                keypadEntity.name = btnRight.Name;
                keypadEntity.keypad = "key_right";
                action?.Invoke(keypadEntity);
                btnRight.IsSelected = false;
                //弹起来还原背景颜色
            };
@@ -236,10 +239,7 @@
            {
                //按下去改变背景颜色
                btnRight.IsSelected = true;
                KeypadEntity keypadEntity = new KeypadEntity();
                keypadEntity.name = btnRight.Name;
                keypadEntity.keypad = "key_right";
                action?.Invoke(keypadEntity);
            };
            btnRight.MouseDownEventHandler += DownClick;
            btnRightClick.MouseDownEventHandler += DownClick;
@@ -255,6 +255,10 @@
        {
            EventHandler<MouseEventArgs> UpClick = (sender, e) =>
            {
                KeypadEntity keypadEntity = new KeypadEntity();
                keypadEntity.name = btnOk.Name;
                keypadEntity.keypad = "key_ok";
                action?.Invoke(keypadEntity);
                btnOk.IsSelected = false;
                //弹起来还原背景颜色
            };
@@ -264,10 +268,6 @@
            EventHandler<MouseEventArgs> DownClick = (sender, e) =>
            {
                btnOk.IsSelected = true;
                KeypadEntity keypadEntity = new KeypadEntity();
                keypadEntity.name = btnOk.Name;
                keypadEntity.keypad = "key_ok";
                action?.Invoke(keypadEntity);
                //按下去改变背景颜色
            };
            btnOk.MouseDownEventHandler += DownClick;