Modal and Form updates
- adding ReturnFromModal method to FormBase, will get invoked if context leaves a ModalDialog - ModalDialog contains ParentForm for better navigation - ModalDialog invokes ReturnFromModal on parentForm after closing - adding ShowBackButton to PromptDialog for show a back button
This commit is contained in:
@@ -107,6 +107,8 @@ namespace TelegramBotBase.Form
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public async Task OnClosed(EventArgs e)
|
||||
{
|
||||
if (this.Events[__evClosed] == null)
|
||||
@@ -136,6 +138,16 @@ namespace TelegramBotBase.Form
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get invoked when a modal child from has been closed.
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <returns></returns>
|
||||
public virtual async Task ReturnFromModal(ModalDialog modal)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Pre to form close, cleanup all controls
|
||||
@@ -337,6 +349,7 @@ namespace TelegramBotBase.Form
|
||||
ds.ActiveForm = newForm;
|
||||
newForm.Client = parentForm.Client;
|
||||
newForm.Device = ds;
|
||||
newForm.ParentForm = parentForm;
|
||||
|
||||
newForm.Closed += async (s, en) =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user