- 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:
FlorianDahn
2018-10-14 02:26:50 +02:00
parent f431a4afc2
commit be19bbec5d
11 changed files with 627 additions and 20 deletions
+24
View File
@@ -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;
}
}
}