Updates and improvements

- refactoring of ButtonGrid control for more readability
- refactoring of TaggedButtonGrid control for more readability
- adding Index parameter to ButtenClickedEventArgs
- adding FindRowByButton method to ButtonForm to get the row index
-
This commit is contained in:
FlorianDahn
2021-02-28 15:34:04 +01:00
parent 91048b4f7c
commit 15a8b8897f
5 changed files with 92 additions and 58 deletions
@@ -14,6 +14,8 @@ namespace TelegramBotBase.Args
{
public ButtonBase Button { get; set; }
public int Index { get; set; }
public ButtonClickedEventArgs()
{
@@ -23,6 +25,13 @@ namespace TelegramBotBase.Args
public ButtonClickedEventArgs(ButtonBase button)
{
this.Button = button;
this.Index = -1;
}
public ButtonClickedEventArgs(ButtonBase button, int Index)
{
this.Button = button;
this.Index = Index;
}
}