Kleine Fehler behoben

This commit is contained in:
BlubbFish 2017-10-01 21:56:34 +00:00
parent 4190c95ebe
commit 27f12d5bae
3 changed files with 4 additions and 5 deletions

View File

@ -6,7 +6,7 @@ namespace Dashboard.Connector {
public abstract event MqttMessage MessageIncomming;
public abstract event MqttMessage MessageSending;
public delegate void MqttMessage(Object sender, MqttEventArgs e);
public delegate void MqttMessage(ADataBackend sender, MqttEventArgs e);
public static ADataBackend GetInstance(Dictionary<String, String> dictionary) {
String object_sensor = "Dashboard.Connector." + Char.ToUpper(dictionary["type"][0]) + dictionary["type"].Substring(1).ToLower();

View File

@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Text;
using BlubbFish.Utils;
using uPLibrary.Networking.M2Mqtt;
using uPLibrary.Networking.M2Mqtt.Messages;

View File

@ -17,8 +17,8 @@ namespace MqttToTelegram {
public event TelegramMessage MessageSending;
private Telegram() {
bot = new TelegramBotClient(InIReader.GetInstance("settings.ini").GetValue("general", "telegram-key"));
bot.OnMessage += Bot_OnMessage;
this.bot = new TelegramBotClient(InIReader.GetInstance("settings.ini").GetValue("general", "telegram-key"));
this.bot.OnMessage += this.Bot_OnMessage;
this.Connect();
}
@ -36,7 +36,7 @@ namespace MqttToTelegram {
}
private void Connect() {
bot.StartReceiving();
this.bot.StartReceiving();
this.chat = new ChatId(InIReader.GetInstance("settings.ini").GetValue("general", "chatid"));
}