| | |
| | | using System.Collections.Generic; |
| | | using HDL_ON.UI.UI2.FuntionControlView.Aks.Entity; |
| | | |
| | | |
| | | namespace HDL_ON.UI.UI2.FuntionControlView.Aks.CommonView |
| | | { |
| | | /// <summary> |
| | |
| | | //不支持按键点击背景颜色 |
| | | if (!keypad.isClicked) |
| | | { |
| | | buttonFram.Enable = false; |
| | | buttonFram.GetImageButton().Enable = false; |
| | | buttonFram.GetNameButton().Enable = false; |
| | | buttonFram.BackgroundColor = AksCommonMethod.unBackgroundColor; |
| | | buttonFram.GetImageButton().Alpha = 0.5f; |
| | | buttonFram.GetNameButton().TextColor =unBackgroundColor; |
| | | buttonFram.SetClick(false); |
| | | |
| | | } |
| | | buttonFram.SetClickListener((fl, btnIcon, btnName) => |
| | | { |
| | | if (buttonFram.Tag != null && buttonFram.Tag is KeypadEntity) |
| | | if (buttonFram.Tag == null) |
| | | { |
| | | selectKeyAction?.Invoke((KeypadEntity)buttonFram.Tag); |
| | | return; |
| | | } |
| | | selectKeyAction?.Invoke((KeypadEntity)buttonFram.Tag); |
| | | }); |
| | | |
| | | //if (defaultIndex != -1 && defaultIndex == i) |
| | |
| | | //不支持按键点击背景颜色 |
| | | if (!keypad.isClicked) |
| | | { |
| | | buttonFram.Enable = false; |
| | | buttonFram.GetImageButton().Enable = false; |
| | | buttonFram.GetNameButton().Enable = false; |
| | | buttonFram.BackgroundColor = AksCommonMethod.unBackgroundColor; |
| | | buttonFram.GetImageButton().Alpha = 0.5f; |
| | | buttonFram.GetNameButton().TextColor = unBackgroundColor; |
| | | buttonFram.SetClick(false); |
| | | } |
| | | buttonFram.SetClickListener((fl, btnIcon, btnName) => |
| | | { |
| | | if (buttonFram.Tag != null&& buttonFram.Tag is KeypadEntity) |
| | | if (buttonFram.Tag == null) |
| | | { |
| | | selectKeyAction?.Invoke((KeypadEntity)buttonFram.Tag); |
| | | return; |
| | | } |
| | | selectKeyAction?.Invoke((KeypadEntity)buttonFram.Tag); |
| | | |
| | | }); |
| | | |
| | | //if (defaultIndex != -1 && defaultIndex == i) |
| | |
| | | } |
| | | int currnetheightValue = 0; |
| | | int currnetWidthValue = 0; |
| | | int heightMaxValue = 84; |
| | | int heightMaxValue = 84 - 6; |
| | | int widthMaxValue = 78; |
| | | //获取相对一个纬度值 |
| | | int heightDimensionValue = this.Height - Application.GetRealHeight(this.topMargin) - Application.GetRealHeight(this.bottomMargin) - Application.GetRealHeight(heightMaxValue / 2); |
| | | int widthDimensionValue = this.Width - Application.GetRealWidth(this.leftMargin) - Application.GetRealWidth(this.rightMargin) - Application.GetRealHeight(widthMaxValue / 2); |
| | | for (int i = 0; i <mList.Count; i++) |
| | | for (int i = 0; i < mList.Count; i++) |
| | | { |
| | | var keypad = mList[i]; |
| | | Button button = new Button |
| | |
| | | //不支持按键点击背景颜色 |
| | | if (!keypad.isClicked) |
| | | { |
| | | button.Enable = false; |
| | | button.BackgroundColor = AksCommonMethod.unBackgroundColor; |
| | | button.TextColor =unBackgroundColor; |
| | | |
| | | } |
| | | button.MouseDownEventHandler += (sen, e) => |
| | | |
| | | |
| | | button.MouseUpEventHandler += (sen, e) => |
| | | { |
| | | if (button.Tag == null || ((KeypadEntity)button.Tag).keypad == "none") |
| | | if (button.Tag == null || ((KeypadEntity)button.Tag).keypad == "none"|| !((KeypadEntity)button.Tag).isClicked) |
| | | { |
| | | return; |
| | | } |
| | | button.IsSelected = true; |
| | | selectKeyAction?.Invoke((KeypadEntity)button.Tag); |
| | | }; |
| | | button.MouseUpEventHandler += (sen, e) => |
| | | { |
| | | button.IsSelected = false; |
| | | SetButtonIsSelected(button); |
| | | }; |
| | | |
| | | //if (defaultIndex != -1 && defaultIndex == i) |