Merge branch 'development' into development
This commit is contained in:
commit
d7abe6f023
@ -26,16 +26,6 @@ public class FormBase : IDisposable
|
|||||||
public EventHandlerList Events = new();
|
public EventHandlerList Events = new();
|
||||||
|
|
||||||
|
|
||||||
public FormBase()
|
|
||||||
{
|
|
||||||
Controls = new List<ControlBase>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public FormBase(MessageClient client) : this()
|
|
||||||
{
|
|
||||||
Client = client;
|
|
||||||
}
|
|
||||||
|
|
||||||
public NavigationController NavigationController { get; set; }
|
public NavigationController NavigationController { get; set; }
|
||||||
|
|
||||||
public DeviceSession Device { get; set; }
|
public DeviceSession Device { get; set; }
|
||||||
@ -49,6 +39,16 @@ public class FormBase : IDisposable
|
|||||||
|
|
||||||
public List<ControlBase> Controls { get; set; }
|
public List<ControlBase> Controls { get; set; }
|
||||||
|
|
||||||
|
public FormBase()
|
||||||
|
{
|
||||||
|
Controls = new List<ControlBase>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public FormBase(MessageClient client) : this()
|
||||||
|
{
|
||||||
|
Client = client;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Cleanup
|
/// Cleanup
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
48
TelegramBotBase/Form/WebAppButtonBase.cs
Normal file
48
TelegramBotBase/Form/WebAppButtonBase.cs
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Telegram.Bot.Types;
|
||||||
|
using Telegram.Bot.Types.ReplyMarkups;
|
||||||
|
|
||||||
|
namespace TelegramBotBase.Form
|
||||||
|
{
|
||||||
|
public class WebAppButtonBase : ButtonBase
|
||||||
|
{
|
||||||
|
public WebAppInfo WebAppInfo { get; set; }
|
||||||
|
|
||||||
|
public WebAppButtonBase()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public WebAppButtonBase(String Text, WebAppInfo WebAppInfo)
|
||||||
|
{
|
||||||
|
this.Text = Text;
|
||||||
|
this.WebAppInfo = WebAppInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns an inline Button
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="form"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public override InlineKeyboardButton ToInlineButton(ButtonForm form)
|
||||||
|
{
|
||||||
|
return InlineKeyboardButton.WithWebApp(this.Text, this.WebAppInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a KeyBoardButton
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="form"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public override KeyboardButton ToKeyboardButton(ButtonForm form)
|
||||||
|
{
|
||||||
|
return KeyboardButton.WithWebApp(this.Text, this.WebAppInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user