- update readme and formbase

This commit is contained in:
FlorianDahn 2019-09-28 01:17:38 +02:00
parent 058539777f
commit d1456d5bd1
2 changed files with 3 additions and 21 deletions

View File

@ -688,26 +688,8 @@ No example yet
<img src="images/promptdialog.PNG" />
#### Without Eventhandler (pre-init of form necessary)
```
PromptDialog pd = new PromptDialog("Please confirm");
pd.AddButton(new ButtonBase("Ok", "ok"));
pd.AddButton(new ButtonBase("Cancel", "cancel"));
var tf = new TestForm2();
pd.ButtonForms.Add("ok", tf);
pd.ButtonForms.Add("cancel", tf);
await this.NavigateTo(pd);
```
#### With Eventhandler (no pre-init of form necessary)
#### With Eventhandler
```

View File

@ -312,12 +312,12 @@ namespace TelegramBotBase.Form
/// Removes control from the formular and runs a cleanup on it.
/// </summary>
/// <param name="control"></param>
public async void RemoveControl(ControlBase control)
public void RemoveControl(ControlBase control)
{
if (!this.Controls.Contains(control))
return;
await control.Cleanup();
control.Cleanup().Wait();
this.Controls.Remove(control);
}