[NF] Umbenennung zu IoTBot Namespace

This commit is contained in:
2017-10-02 00:49:44 +02:00
parent ceef3daf21
commit 8d80a132dc
47 changed files with 186 additions and 175 deletions
@@ -1,15 +1,15 @@
using System;
using System.Collections.Generic;
namespace Dashboard.Connector {
namespace IoTBot.Connector {
public abstract class ADataBackend {
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();
String object_sensor = "IoTBot.Connector." + Char.ToUpper(dictionary["type"][0]) + dictionary["type"].Substring(1).ToLower();
Type t = null;
try {
t = Type.GetType(object_sensor, true);
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Text.RegularExpressions;
namespace Dashboard.Connector {
namespace IoTBot.Connector {
class Mosquitto : ADataBackend, IDisposable {
private Process p;
private String message;
@@ -1,11 +1,10 @@
using System;
using System.Collections.Generic;
using System.Text;
using BlubbFish.Utils;
using uPLibrary.Networking.M2Mqtt;
using uPLibrary.Networking.M2Mqtt.Messages;
namespace Dashboard.Connector {
namespace IoTBot.Connector {
class Mqtt : ADataBackend, IDisposable {
private MqttClient client;
@@ -5,7 +5,7 @@ using Telegram.Bot.Args;
using Telegram.Bot.Exceptions;
using Telegram.Bot.Types;
namespace MqttToTelegram {
namespace IoTBot.Connector {
class Telegram {
private static Telegram instance;
private TelegramBotClient bot;
@@ -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"));
}
@@ -2,7 +2,7 @@
using System;
using System.Globalization;
using System.Windows;
using Dashboard.Connector;
using IoTBot.Connector;
namespace Mqtt_SWB_Dashboard {
/// <summary>
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using Dashboard.Connector;
using IoTBot.Connector;
using LitJson;
using Mqtt_SWB_Dashboard.Helper;