| | |
| | | { |
| | | this.mIsClick = isClick; |
| | | } |
| | | private uint UpBackgroundColor = MusicColor.ViewColor; |
| | | private uint DownBackgroundColor = AksCommonMethod.seleBackgroundColor; |
| | | private uint UpBackgroundColor =BaseFramLayout.unParentBackgroundColor; |
| | | private uint DownBackgroundColor =BaseFramLayout.seleBackgroundColor; |
| | | |
| | | /// <summary> |
| | | /// 多个类型容器 |
| | |
| | | }; |
| | | |
| | | |
| | | public Button btnBottonLeftImage = new Button |
| | | public Button btnLeftImage = new Button |
| | | { |
| | | Width = Application.GetRealWidth(16), |
| | | Height = Application.GetRealWidth(16), |
| | |
| | | Name = "btnBottonLeftImage", |
| | | }; |
| | | |
| | | public Button btnBottonName = new Button |
| | | public Button btnLeftName = new Button |
| | | { |
| | | Width = Application.GetRealWidth(100), |
| | | Width = Application.GetRealWidth(100 + 10), |
| | | Height = Application.GetRealHeight(23), |
| | | TextID = StringId.shixuqi, |
| | | TextSize = TextSize.Text16, |
| | | TextColor = MusicColor.TextColor, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Gravity = Gravity.CenterVertical, |
| | | IsMoreLines = true, |
| | | }; |
| | | |
| | | |
| | |
| | | }; |
| | | |
| | | |
| | | public Button btnBottonRightImage = new Button |
| | | public Button btnRightImage = new Button |
| | | { |
| | | Width = Application.GetRealWidth(16), |
| | | Height = Application.GetRealWidth(16), |
| | |
| | | }; |
| | | |
| | | |
| | | public Button btnBottonRightName = new Button |
| | | public Button btnRightName = new Button |
| | | { |
| | | Width = Application.GetRealWidth(100), |
| | | Width = Application.GetRealWidth(100 + 16), |
| | | Height = Application.GetRealHeight(23), |
| | | TextID = StringId.bofangqi, |
| | | TextSize = TextSize.Text16, |
| | | TextColor = MusicColor.TextColor, |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | Gravity = Gravity.CenterVertical, |
| | | Padding=new Padding(0,0,0,0), |
| | | IsMoreLines = true, |
| | | Padding = new Padding(0, 0, 0, 0), |
| | | }; |
| | | |
| | | |
| | |
| | | { |
| | | layout.AddChidren(multiFramLayout); |
| | | multiFramLayout.AddChidren(leftFramLayout); |
| | | leftFramLayout.AddChidren(btnBottonLeftImage); |
| | | leftFramLayout.AddChidren(btnBottonName); |
| | | leftFramLayout.AddChidren(btnLeftImage); |
| | | leftFramLayout.AddChidren(btnLeftName); |
| | | multiFramLayout.AddChidren(lineFramLayout); |
| | | multiFramLayout.AddChidren(rightFramLayout); |
| | | rightFramLayout.AddChidren(btnBottonRightImage); |
| | | rightFramLayout.AddChidren(btnBottonRightName); |
| | | btnBottonName.X = btnBottonLeftImage.Right + Application.GetRealWidth(4); |
| | | rightFramLayout.AddChidren(btnRightImage); |
| | | rightFramLayout.AddChidren(btnRightName); |
| | | btnLeftName.X = btnLeftImage.Right + Application.GetRealWidth(4); |
| | | lineFramLayout.X = leftFramLayout.Right; |
| | | rightFramLayout.X = lineFramLayout.Right; |
| | | btnBottonRightName.X = btnBottonLeftImage.Right + Application.GetRealWidth(4); |
| | | btnRightName.X = Application.GetRealWidth(4); |
| | | } |
| | | |
| | | |
| | |
| | | EventHandler<MouseEventArgs> UpClick = (sender, e) => |
| | | { |
| | | //leftFramLayout.BackgroundColor = this.UpBackgroundColor; |
| | | |
| | | |
| | | //弹起来还原背景颜色 |
| | | }; |
| | | leftFramLayout.MouseUpEventHandler += UpClick; |
| | | btnBottonLeftImage.MouseUpEventHandler += UpClick; |
| | | btnBottonName.MouseUpEventHandler += UpClick; |
| | | btnLeftImage.MouseUpEventHandler += UpClick; |
| | | btnLeftName.MouseUpEventHandler += UpClick; |
| | | |
| | | |
| | | EventHandler<MouseEventArgs> DownClick = (sender, e) => |
| | |
| | | action?.Invoke(leftFramLayout); |
| | | }; |
| | | leftFramLayout.MouseDownEventHandler += DownClick; |
| | | btnBottonLeftImage.MouseDownEventHandler += DownClick; |
| | | btnBottonName.MouseDownEventHandler += DownClick; |
| | | btnLeftImage.MouseDownEventHandler += DownClick; |
| | | btnLeftName.MouseDownEventHandler += DownClick; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | //弹起来还原背景颜色 |
| | | }; |
| | | rightFramLayout.MouseUpEventHandler += UpClick; |
| | | btnBottonRightImage.MouseUpEventHandler += UpClick; |
| | | btnBottonRightName.MouseUpEventHandler += UpClick; |
| | | btnRightImage.MouseUpEventHandler += UpClick; |
| | | btnRightName.MouseUpEventHandler += UpClick; |
| | | |
| | | |
| | | EventHandler<MouseEventArgs> DownClick = (sender, e) => |
| | | { |
| | | //按下去改变背景颜色 |
| | | //rightFramLayout.BackgroundColor =AksCommonMethod.seleBackgroundColor; |
| | | |
| | | |
| | | }; |
| | | rightFramLayout.MouseDownEventHandler += DownClick; |
| | | btnBottonRightImage.MouseDownEventHandler += DownClick; |
| | | btnBottonRightName.MouseDownEventHandler += DownClick; |
| | | btnRightImage.MouseDownEventHandler += DownClick; |
| | | btnRightName.MouseDownEventHandler += DownClick; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |