| | |
| | | Width = Application.GetRealWidth(24), |
| | | Height = Application.GetRealHeight(20), |
| | | UnSelectedImagePath = "AksIcon/shang.png", |
| | | Name= "上", |
| | | SelectedImagePath = "AksIcon/shang_selected.png", |
| | | Name = "上", |
| | | }; |
| | | Button btnBottom = new Button |
| | | { |
| | |
| | | Width = Application.GetRealWidth(24), |
| | | Height = Application.GetRealHeight(20), |
| | | UnSelectedImagePath = "AksIcon/xia.png", |
| | | SelectedImagePath = "AksIcon/xia_selected.png", |
| | | Name = "下", |
| | | }; |
| | | Button btnLeft = new Button |
| | |
| | | Width = Application.GetRealWidth(20), |
| | | Height = Application.GetRealHeight(24), |
| | | UnSelectedImagePath = "AksIcon/zuo.png", |
| | | SelectedImagePath = "AksIcon/zuo_selected.png", |
| | | Name = "左", |
| | | |
| | | }; |
| | |
| | | Width = Application.GetRealWidth(20), |
| | | Height = Application.GetRealHeight(24), |
| | | UnSelectedImagePath = "AksIcon/you.png", |
| | | SelectedImagePath = "AksIcon/you_selected.png", |
| | | Name = "右", |
| | | |
| | | }; |
| | |
| | | { |
| | | EventHandler<MouseEventArgs> UpClick = (sender, e) => |
| | | { |
| | | //btnTop.BackgroundColor = this.UpBackgroundColor; |
| | | btnTop.IsSelected = false; |
| | | KeypadEntity keypadEntity = new KeypadEntity(); |
| | | keypadEntity.name = btnTop.Name; |
| | | keypadEntity.keypad = "key_up"; |
| | | action?.Invoke(keypadEntity); |
| | | //弹起来还原背景颜色 |
| | | }; |
| | | btnTop.MouseUpEventHandler += UpClick; |
| | |
| | | EventHandler<MouseEventArgs> DownClick = (sender, e) => |
| | | { |
| | | //按下去改变背景颜色 |
| | | btnTop.BackgroundColor = this.DownBackgroundColor; |
| | | btnTop.IsSelected = true; |
| | | KeypadEntity keypadEntity = new KeypadEntity(); |
| | | keypadEntity.name = btnTop.Name; |
| | | keypadEntity.keypad = "key_up"; |
| | | action?.Invoke(keypadEntity); |
| | | }; |
| | | btnTop.MouseDownEventHandler += DownClick; |
| | | } |
| | |
| | | { |
| | | EventHandler<MouseEventArgs> UpClick = (sender, e) => |
| | | { |
| | | //btnBottom.BackgroundColor = this.UpBackgroundColor; |
| | | btnBottom.IsSelected = false; |
| | | KeypadEntity keypadEntity = new KeypadEntity(); |
| | | keypadEntity.name = btnBottom.Name; |
| | | keypadEntity.keypad = "key_down"; |
| | | action?.Invoke(keypadEntity); |
| | | |
| | | |
| | | //弹起来还原背景颜色 |
| | | }; |
| | | btnBottom.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); |
| | | //按下去改变背景颜色 |
| | | btnBottom.BackgroundColor = this.DownBackgroundColor; |
| | | }; |
| | | btnBottom.MouseDownEventHandler += DownClick; |
| | | } |
| | |
| | | { |
| | | EventHandler<MouseEventArgs> UpClick = (sender, e) => |
| | | { |
| | | //btnLeft.BackgroundColor = this.UpBackgroundColor; |
| | | btnLeft.IsSelected = false; |
| | | KeypadEntity keypadEntity = new KeypadEntity(); |
| | | keypadEntity.name = btnLeft.Name; |
| | | keypadEntity.keypad = "key_left"; |
| | | action?.Invoke(keypadEntity); |
| | | //弹起来还原背景颜色 |
| | | }; |
| | | btnLeft.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); |
| | | //按下去改变背景颜色 |
| | | btnLeft.BackgroundColor = this.DownBackgroundColor; |
| | | }; |
| | | btnLeft.MouseDownEventHandler += DownClick; |
| | | } |
| | |
| | | { |
| | | EventHandler<MouseEventArgs> UpClick = (sender, e) => |
| | | { |
| | | //btnRight.BackgroundColor = this.UpBackgroundColor; |
| | | btnRight.IsSelected = false; |
| | | KeypadEntity keypadEntity = new KeypadEntity(); |
| | | keypadEntity.name = btnRight.Name; |
| | | keypadEntity.keypad = "key_right"; |
| | | action?.Invoke(keypadEntity); |
| | | //弹起来还原背景颜色 |
| | | }; |
| | | btnRight.MouseUpEventHandler += UpClick; |
| | |
| | | EventHandler<MouseEventArgs> DownClick = (sender, e) => |
| | | { |
| | | //按下去改变背景颜色 |
| | | btnRight.BackgroundColor = this.DownBackgroundColor; |
| | | btnRight.IsSelected = true; |
| | | KeypadEntity keypadEntity = new KeypadEntity(); |
| | | keypadEntity.name = btnRight.Name; |
| | | keypadEntity.keypad = "key_right"; |
| | | action?.Invoke(keypadEntity); |
| | | }; |
| | | btnRight.MouseDownEventHandler += DownClick; |
| | | } |
| | |
| | | EventHandler<MouseEventArgs> UpClick = (sender, e) => |
| | | { |
| | | btnOk.BackgroundColor = MusicColor.SelectedColor;// this.UpBackgroundColor; |
| | | KeypadEntity keypadEntity = new KeypadEntity(); |
| | | keypadEntity.name = btnOk.Name; |
| | | keypadEntity.keypad = "key_ok"; |
| | | action?.Invoke(keypadEntity); |
| | | //弹起来还原背景颜色 |
| | | }; |
| | | btnOk.MouseUpEventHandler += UpClick; |
| | |
| | | |
| | | EventHandler<MouseEventArgs> DownClick = (sender, e) => |
| | | { |
| | | KeypadEntity keypadEntity = new KeypadEntity(); |
| | | keypadEntity.name = btnOk.Name; |
| | | keypadEntity.keypad = "key_ok"; |
| | | action?.Invoke(keypadEntity); |
| | | //按下去改变背景颜色 |
| | | btnOk.BackgroundColor = this.DownBackgroundColor; |
| | | }; |