| | |
| | | SelectedImagePath = "AksIcon/shang_selected.png", |
| | | Name = "上", |
| | | }; |
| | | |
| | | Button btnTopClick = new Button |
| | | { |
| | | X = Application.GetRealWidth(52), |
| | | Width = Application.GetRealWidth(76), |
| | | Height = Application.GetRealHeight(40), |
| | | }; |
| | | Button btnBottom = new Button |
| | | { |
| | | Y = Application.GetRealWidth(144), |
| | |
| | | UnSelectedImagePath = "AksIcon/xia.png", |
| | | SelectedImagePath = "AksIcon/xia_selected.png", |
| | | Name = "下", |
| | | }; |
| | | Button btnBottomClick = new Button |
| | | { |
| | | Y = Application.GetRealWidth(128), |
| | | X = Application.GetRealWidth(52), |
| | | Width = Application.GetRealWidth(76), |
| | | Height = Application.GetRealHeight(52), |
| | | }; |
| | | Button btnLeft = new Button |
| | | { |
| | |
| | | Name = "左", |
| | | |
| | | }; |
| | | |
| | | Button btnLeftClick = new Button |
| | | { |
| | | Y = Application.GetRealWidth(52), |
| | | Width = Application.GetRealWidth(52), |
| | | Height = Application.GetRealHeight(76), |
| | | |
| | | }; |
| | | Button btnRight = new Button |
| | | { |
| | | Y = Application.GetRealWidth(78), |
| | |
| | | UnSelectedImagePath = "AksIcon/you.png", |
| | | SelectedImagePath = "AksIcon/you_selected.png", |
| | | Name = "右", |
| | | |
| | | }; |
| | | |
| | | Button btnRightClick = new Button |
| | | { |
| | | X = Application.GetRealWidth(128), |
| | | Y = Application.GetRealWidth(52), |
| | | Width = Application.GetRealWidth(52), |
| | | Height = Application.GetRealHeight(76), |
| | | |
| | | }; |
| | | |
| | |
| | | public void AddView(FrameLayout layout) |
| | | { |
| | | this.AddChidren(btnTop); |
| | | this.AddChidren(btnTopClick); |
| | | this.AddChidren(btnBottom); |
| | | this.AddChidren(btnBottomClick); |
| | | this.AddChidren(btnLeft); |
| | | this.AddChidren(btnLeftClick); |
| | | this.AddChidren(btnRight); |
| | | this.AddChidren(btnRightClick); |
| | | this.AddChidren(btnOkbj); |
| | | this.AddChidren(btnOk); |
| | | |
| | | |
| | | layout.AddChidren(this); |
| | | //btnBottom.Y = btnOkbj.Bottom + Application.GetRealWidth(16); |
| | | |
| | |
| | | //弹起来还原背景颜色 |
| | | }; |
| | | btnTop.MouseUpEventHandler += UpClick; |
| | | btnTopClick.MouseUpEventHandler += UpClick; |
| | | |
| | | |
| | | EventHandler<MouseEventArgs> DownClick = (sender, e) => |
| | |
| | | action?.Invoke(keypadEntity); |
| | | }; |
| | | btnTop.MouseDownEventHandler += DownClick; |
| | | btnTopClick.MouseDownEventHandler += DownClick; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | //弹起来还原背景颜色 |
| | | }; |
| | | btnBottom.MouseUpEventHandler += UpClick; |
| | | btnBottomClick.MouseUpEventHandler += UpClick; |
| | | |
| | | |
| | | EventHandler<MouseEventArgs> DownClick = (sender, e) => |
| | |
| | | //按下去改变背景颜色 |
| | | }; |
| | | btnBottom.MouseDownEventHandler += DownClick; |
| | | btnBottomClick.MouseDownEventHandler += DownClick; |
| | | } |
| | | /// <summary> |
| | | /// 左 |
| | |
| | | //弹起来还原背景颜色 |
| | | }; |
| | | btnLeft.MouseUpEventHandler += UpClick; |
| | | btnLeftClick.MouseUpEventHandler += UpClick; |
| | | |
| | | |
| | | EventHandler<MouseEventArgs> DownClick = (sender, e) => |
| | |
| | | //按下去改变背景颜色 |
| | | }; |
| | | btnLeft.MouseDownEventHandler += DownClick; |
| | | btnLeftClick.MouseDownEventHandler += DownClick; |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 右 |
| | |
| | | //弹起来还原背景颜色 |
| | | }; |
| | | btnRight.MouseUpEventHandler += UpClick; |
| | | btnRightClick.MouseUpEventHandler += UpClick; |
| | | |
| | | |
| | | EventHandler<MouseEventArgs> DownClick = (sender, e) => |
| | |
| | | action?.Invoke(keypadEntity); |
| | | }; |
| | | btnRight.MouseDownEventHandler += DownClick; |
| | | btnRightClick.MouseDownEventHandler += DownClick; |
| | | } |
| | | |
| | | |