- making Events property of FormBase public, for use in sub classes
- making ResultBase derive from Eventargs - adding messagetype to messageresult
This commit is contained in:
parent
1f9539a23d
commit
0eab45bdbb
@ -28,7 +28,7 @@ namespace TelegramBotBase.Form
|
||||
public List<ControlBase> Controls { get; set; }
|
||||
|
||||
|
||||
private EventHandlerList Events = new EventHandlerList();
|
||||
public EventHandlerList Events = new EventHandlerList();
|
||||
|
||||
|
||||
private static object __evInit = new object();
|
||||
@ -118,6 +118,7 @@ namespace TelegramBotBase.Form
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Form has been closed (left)
|
||||
/// </summary>
|
||||
|
||||
@ -54,6 +54,14 @@ namespace TelegramBotBase.Base
|
||||
}
|
||||
}
|
||||
|
||||
public Telegram.Bot.Types.Enums.MessageType MessageType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.RawMessageData?.Message?.Type ?? Telegram.Bot.Types.Enums.MessageType.Unknown;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is this an action ? (i.e. button click)
|
||||
/// </summary>
|
||||
|
||||
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace TelegramBotBase.Base
|
||||
{
|
||||
public class ResultBase
|
||||
public class ResultBase : EventArgs
|
||||
{
|
||||
public MessageClient Client { get; set; }
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user