- Update of ControlBase for partial rendering options - Updating serveral base classes to better asyc event management - separating Enums into different folder - some small bug fixes - removed "CustomEventManagement" cause it doesnt make sense now
45 lines
778 B
C#
45 lines
778 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace TelegramBotBase.Base
|
|
{
|
|
/// <summary>
|
|
/// Base class for controls
|
|
/// </summary>
|
|
public class ControlBase
|
|
{
|
|
public Sessions.DeviceSession Device { get; set; }
|
|
|
|
public int ID { get; set; }
|
|
|
|
/// <summary>
|
|
/// Defines if the control should be rendered and invoked with actions
|
|
/// </summary>
|
|
public bool Enabled { get; set; } = true;
|
|
|
|
public virtual async Task Action(MessageResult result)
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
public virtual async Task Render(MessageResult result)
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
public virtual async Task Cleanup()
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
}
|