- adding IgnoreState to all ModalDialogs to prevent them get saved. - adding SaveState to AutoCleanForm to keep state - change OldMessages property of AutoCleanForm to public
29 lines
662 B
C#
29 lines
662 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using TelegramBotBase.Attributes;
|
|
using TelegramBotBase.Base;
|
|
|
|
namespace TelegramBotBase.Form
|
|
{
|
|
/// <summary>
|
|
/// A simple prompt dialog with one ok Button
|
|
/// </summary>
|
|
[IgnoreState]
|
|
public class AlertDialog : ConfirmDialog
|
|
{
|
|
public String ButtonText { get; set; }
|
|
|
|
public AlertDialog(String Message, String ButtonText) : base(Message)
|
|
{
|
|
this.Buttons.Add(new ButtonBase(ButtonText, "ok"));
|
|
this.ButtonText = ButtonText;
|
|
|
|
}
|
|
|
|
}
|
|
}
|