using System;
using System.Threading.Tasks;
namespace TelegramBotBase.Form;
public class ModalDialog : FormBase
{
///
/// Contains the parent from where the modal dialog has been opened.
///
public FormBase ParentForm { get; set; }
///
/// This is a modal only function and does everything to close this form.
///
public async Task CloseForm()
{
await CloseControls();
await OnClosed(EventArgs.Empty);
await ParentForm?.ReturnFromModal(this);
}
}