| | |
| | | { |
| | | public class VerticalBoutonFLayout:BaseFramLayout |
| | | { |
| | | /// <summary> |
| | | /// 是否可以点击 |
| | | /// </summary> |
| | | private bool mIsClick = true; |
| | | |
| | | /// <summary> |
| | | /// 设置控制点击事件 |
| | | /// </summary> |
| | | /// <param name="isClick">false点击无效</param> |
| | | public void setClick(bool isClick) |
| | | { |
| | | this.mIsClick = isClick; |
| | | } |
| | | public const int widthFrameLayout = 80; |
| | | public const int heightFrameLayout = 140-15; |
| | | public const int cornerValue = 12; |
| | |
| | | { |
| | | EventHandler<MouseEventArgs> UpClick = (sender, e) => |
| | | { |
| | | action?.Invoke(OFFFLayout, OFFButton); |
| | | OFFFLayout.BackgroundColor = MusicColor.WhiteColor; |
| | | OFFButton.TextColor = 0xFFA5AEBC; |
| | | |
| | | //弹起来还原背景颜色 |
| | | }; |
| | | OFFFLayout.MouseUpEventHandler += UpClick; |
| | | OFFButton.MouseUpEventHandler += UpClick; |
| | | |
| | | |
| | | //EventHandler<MouseEventArgs> MoveClick = (sender, e) => |
| | | //{ |
| | | // this.BackgroundColor = 0x00000000; |
| | | // //弹起来还原背景颜色 |
| | | //}; |
| | | //this.MouseMoveEventHandler += MoveClick; |
| | | //btnImage.MouseMoveEventHandler += MoveClick; |
| | | //btnName.MouseMoveEventHandler += MoveClick; |
| | | EventHandler<MouseEventArgs> CancelClick = (sender, e) => |
| | | { |
| | | OFFFLayout.BackgroundColor = MusicColor.WhiteColor; |
| | | OFFButton.TextColor = 0xFFA5AEBC; |
| | | //弹起来还原背景颜色 |
| | | }; |
| | | OFFFLayout.MouseUpOutsideEventHandler += CancelClick; |
| | | OFFButton.MouseUpOutsideEventHandler += CancelClick; |
| | | |
| | | EventHandler<MouseEventArgs> DownClick = (sender, e) => |
| | | { |
| | | //按下去改变背景颜色 |
| | | OFFFLayout.BackgroundColor = MusicColor.MusicTxet14SelectedColor; |
| | | OFFButton.TextColor = MusicColor.WhiteColor; |
| | | action?.Invoke(OFFFLayout, OFFButton); |
| | | |
| | | }; |
| | | OFFFLayout.MouseDownEventHandler += DownClick; |
| | | OFFButton.MouseDownEventHandler += DownClick; |