diff --git a/Bot.cs b/Bot.cs index 80251ea..0fd1cc7 100644 --- a/Bot.cs +++ b/Bot.cs @@ -79,6 +79,7 @@ namespace BlubbFish.Utils.IoT.Bots { protected void ModulEvents() { foreach (KeyValuePair> item in this.moduls) { + item.Value.EventLibSetter(); item.Value.Update += this.ModulUpdate; } } diff --git a/Moduls/AModul.cs b/Moduls/AModul.cs index e7ec1a5..76ee7fd 100644 --- a/Moduls/AModul.cs +++ b/Moduls/AModul.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Threading; using BlubbFish.Utils.IoT.Bots.Events; namespace BlubbFish.Utils.IoT.Bots.Moduls { @@ -49,6 +50,14 @@ namespace BlubbFish.Utils.IoT.Bots.Moduls { public virtual void SetInterconnection(String param, Action hook, Object data) { } + public abstract void EventLibSetter(); + + protected abstract void LibUpadteThread(Object state); + + protected void HandleLibUpdate(Object sender, EventArgs e) { + ThreadPool.QueueUserWorkItem(this.LibUpadteThread, e); + } + public abstract void Dispose(); public void SetConfig(Dictionary> newconf) { diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 0dd2507..0fc2b19 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, // indem Sie "*" wie unten gezeigt eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.0.1.0")] +[assembly: AssemblyFileVersion("1.0.1.0")]