New control: CheckedButtonList

- new control for having a checked listview with paging possible
- new CheckedChangedEventArgs class
- adding Test for CheckedButtonList
- refactoring MultiView Test
This commit is contained in:
FlorianDahn
2021-02-28 15:35:49 +01:00
parent 15a8b8897f
commit dfe64b22ab
5 changed files with 919 additions and 14 deletions
@@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.Text;
using TelegramBotBase.Form;
namespace TelegramBotBase.Args
{
public class CheckedChangedEventArgs : EventArgs
{
/// <summary>
/// Contains the index of the row where the button is inside.
/// Contains -1 when it is a layout button or not found.
/// </summary>
public int Index { get; set; }
/// <summary>
/// Contains all buttons within this row, excluding the checkbox.
/// </summary>
public List<ButtonBase> Row { get; set; }
/// <summary>
/// Contains the new checked status of the row.
/// </summary>
public bool Checked { get; set; }
public CheckedChangedEventArgs()
{
}
public CheckedChangedEventArgs(List<ButtonBase> row, int Index, bool Checked)
{
this.Row = row;
this.Index = Index;
this.Checked = Checked;
}
}
}