Update FormBase.cs
- adding RemoveAllControls method
This commit is contained in:
parent
47876681e0
commit
7a7a65c3a7
@ -410,6 +410,19 @@ namespace TelegramBotBase.Form
|
|||||||
this.Controls.Remove(control);
|
this.Controls.Remove(control);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Removes all controls.
|
||||||
|
/// </summary>
|
||||||
|
public void RemoveAllControls()
|
||||||
|
{
|
||||||
|
foreach(var c in this.Controls)
|
||||||
|
{
|
||||||
|
c.Cleanup().Wait();
|
||||||
|
|
||||||
|
this.Controls.Remove(c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Cleanup
|
/// Cleanup
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user