- Adding a progress bar control
- Adding a control base class - Adding an option to log all incomming messages with an event handler - Some necessary added try/catch stuff to catch exceptions for "blocked" Bots, to prevent crashing - Added some progress bar Test to Testproject
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TelegramBotBase.Base
|
||||
{
|
||||
public class ControlBase
|
||||
{
|
||||
public Sessions.DeviceSession Device { get; set; }
|
||||
|
||||
public virtual async Task Render()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public virtual async Task Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using TelegramBotBase.Sessions;
|
||||
|
||||
namespace TelegramBotBase.Base
|
||||
{
|
||||
public class MessageIncomeResult : EventArgs
|
||||
{
|
||||
|
||||
public long DeviceId { get; set; }
|
||||
|
||||
public DeviceSession Device { get; set; }
|
||||
|
||||
public MessageResult Message { get; set; }
|
||||
|
||||
public MessageIncomeResult(long DeviceId, DeviceSession Device, MessageResult message)
|
||||
{
|
||||
this.DeviceId = DeviceId;
|
||||
this.Device = Device;
|
||||
this.Message = message;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user