From 3f6685c77beeb12baf840733fb890860f4c26e7c Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期四, 25 七月 2024 17:25:59 +0800 Subject: [PATCH] 2024年07月25日17:24:45 --- HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/MenuFramLayout.cs | 97 ++++++++++++------------------------------------ 1 files changed, 24 insertions(+), 73 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/MenuFramLayout.cs b/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/MenuFramLayout.cs index 8b4b089..50de22b 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Aks/CommonView/MenuFramLayout.cs +++ b/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,24 +140,15 @@ { EventHandler<MouseEventArgs> UpClick = (sender, e) => { - btnTop.IsSelected = false; - //寮硅捣鏉ヨ繕鍘熻儗鏅鑹� - }; - btnTop.MouseUpEventHandler += UpClick; - btnTopClick.MouseUpEventHandler += UpClick; - - - EventHandler<MouseEventArgs> DownClick = (sender, e) => - { - //鎸変笅鍘绘敼鍙樿儗鏅鑹� - btnTop.IsSelected = true; KeypadEntity keypadEntity = new KeypadEntity(); keypadEntity.name = btnTop.Name; keypadEntity.keypad = "key_up"; action?.Invoke(keypadEntity); + SetButtonIsSelected(btnTop); }; - btnTop.MouseDownEventHandler += DownClick; - btnTopClick.MouseDownEventHandler += DownClick; + btnTop.MouseUpEventHandler += UpClick; + btnTopClick.MouseUpEventHandler += UpClick; + } /// <summary> @@ -168,26 +159,15 @@ { EventHandler<MouseEventArgs> UpClick = (sender, e) => { - btnBottom.IsSelected = false; - - - //寮硅捣鏉ヨ繕鍘熻儗鏅鑹� - }; - btnBottom.MouseUpEventHandler += UpClick; - btnBottomClick.MouseUpEventHandler += UpClick; - - - EventHandler<MouseEventArgs> DownClick = (sender, e) => - { - btnBottom.IsSelected = true; KeypadEntity keypadEntity = new KeypadEntity(); keypadEntity.name = btnBottom.Name; keypadEntity.keypad = "key_down"; action?.Invoke(keypadEntity); - //鎸変笅鍘绘敼鍙樿儗鏅鑹� + SetButtonIsSelected(btnBottom); }; - btnBottom.MouseDownEventHandler += DownClick; - btnBottomClick.MouseDownEventHandler += DownClick; + btnBottom.MouseUpEventHandler += UpClick; + btnBottomClick.MouseUpEventHandler += UpClick; + } /// <summary> /// 宸� @@ -197,24 +177,14 @@ { EventHandler<MouseEventArgs> UpClick = (sender, e) => { - btnLeft.IsSelected = false; - //寮硅捣鏉ヨ繕鍘熻儗鏅鑹� - }; - btnLeft.MouseUpEventHandler += UpClick; - btnLeftClick.MouseUpEventHandler += UpClick; - - - EventHandler<MouseEventArgs> DownClick = (sender, e) => - { - btnLeft.IsSelected = true; KeypadEntity keypadEntity = new KeypadEntity(); keypadEntity.name = btnLeft.Name; keypadEntity.keypad = "key_left"; action?.Invoke(keypadEntity); - //鎸変笅鍘绘敼鍙樿儗鏅鑹� + SetButtonIsSelected(btnLeft); }; - btnLeft.MouseDownEventHandler += DownClick; - btnLeftClick.MouseDownEventHandler += DownClick; + btnLeft.MouseUpEventHandler += UpClick; + btnLeftClick.MouseUpEventHandler += UpClick; } /// <summary> @@ -225,27 +195,16 @@ { EventHandler<MouseEventArgs> UpClick = (sender, e) => { - btnRight.IsSelected = false; - //寮硅捣鏉ヨ繕鍘熻儗鏅鑹� - }; - btnRight.MouseUpEventHandler += UpClick; - btnRightClick.MouseUpEventHandler += UpClick; - - - EventHandler<MouseEventArgs> DownClick = (sender, e) => - { - //鎸変笅鍘绘敼鍙樿儗鏅鑹� - btnRight.IsSelected = true; KeypadEntity keypadEntity = new KeypadEntity(); keypadEntity.name = btnRight.Name; keypadEntity.keypad = "key_right"; action?.Invoke(keypadEntity); + SetButtonIsSelected(btnRight); }; - btnRight.MouseDownEventHandler += DownClick; - btnRightClick.MouseDownEventHandler += DownClick; + btnRight.MouseUpEventHandler += UpClick; + btnRightClick.MouseUpEventHandler += UpClick; + } - - /// <summary> /// ok @@ -255,22 +214,14 @@ { EventHandler<MouseEventArgs> UpClick = (sender, e) => { - btnOk.IsSelected = false; - //寮硅捣鏉ヨ繕鍘熻儗鏅鑹� - }; - btnOk.MouseUpEventHandler += UpClick; - - - EventHandler<MouseEventArgs> DownClick = (sender, e) => - { - btnOk.IsSelected = true; KeypadEntity keypadEntity = new KeypadEntity(); keypadEntity.name = btnOk.Name; keypadEntity.keypad = "key_ok"; action?.Invoke(keypadEntity); - //鎸変笅鍘绘敼鍙樿儗鏅鑹� + SetButtonIsSelected(btnOk); }; - btnOk.MouseDownEventHandler += DownClick; + btnOk.MouseUpEventHandler += UpClick; + } } -- Gitblit v1.8.0