- change Formbase for better navigation management

This commit is contained in:
FlorianDahn 2019-12-04 01:28:15 +01:00
parent 7e4174a3be
commit 2989456fe5

View File

@ -144,7 +144,7 @@ namespace TelegramBotBase.Form
{ {
foreach (var b in this.Controls) foreach (var b in this.Controls)
{ {
await b.Cleanup(); b.Cleanup().Wait();
} }
} }
@ -289,12 +289,12 @@ namespace TelegramBotBase.Form
newForm.Client = this.Client; newForm.Client = this.Client;
newForm.Device = ds; newForm.Device = ds;
await newForm.OnInit(new InitEventArgs(args));
this.CloseControls().Wait(); this.CloseControls().Wait();
await this.OnClosed(new EventArgs()); await this.OnClosed(new EventArgs());
await newForm.OnInit(new InitEventArgs(args));
await newForm.OnOpened(new EventArgs()); await newForm.OnOpened(new EventArgs());
} }