- update readme and formbase
This commit is contained in:
parent
058539777f
commit
d1456d5bd1
20
README.md
20
README.md
@ -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
|
||||
|
||||
```
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user