commit e8639760352ba05628c9e7237044428f883a9f43 Author: BlubbFish Date: Thu Mar 9 20:39:14 2017 +0000 LFSInsim hinzugefügt diff --git a/LFSInsim.sln b/LFSInsim.sln new file mode 100644 index 0000000..eb28dd4 --- /dev/null +++ b/LFSInsim.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LFSInsim", "LFSInsim\LFSInsim.csproj", "{92E36D8B-DD7C-4B82-BDE0-413F6FD97C25}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {92E36D8B-DD7C-4B82-BDE0-413F6FD97C25}.Debug|x86.ActiveCfg = Debug|x86 + {92E36D8B-DD7C-4B82-BDE0-413F6FD97C25}.Debug|x86.Build.0 = Debug|x86 + {92E36D8B-DD7C-4B82-BDE0-413F6FD97C25}.Release|x86.ActiveCfg = Release|x86 + {92E36D8B-DD7C-4B82-BDE0-413F6FD97C25}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/LFSInsim/InSimDotNet.dll b/LFSInsim/InSimDotNet.dll new file mode 100644 index 0000000..14a7f99 Binary files /dev/null and b/LFSInsim/InSimDotNet.dll differ diff --git a/LFSInsim/LFSInsim.csproj b/LFSInsim/LFSInsim.csproj new file mode 100644 index 0000000..e60c592 --- /dev/null +++ b/LFSInsim/LFSInsim.csproj @@ -0,0 +1,61 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {92E36D8B-DD7C-4B82-BDE0-413F6FD97C25} + Exe + Properties + LFSInsim + LFSInsim + v4.0 + Client + 512 + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + .\InSimDotNet.dll + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/LFSInsim/Program.cs b/LFSInsim/Program.cs new file mode 100644 index 0000000..39b6256 --- /dev/null +++ b/LFSInsim/Program.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace LFSInsim +{ + class Program + { + static void Main(string[] args) + { + Sim s = new Sim("127.0.0.1", 29999, String.Empty); + Console.ReadKey(); + } + } +} diff --git a/LFSInsim/Properties/AssemblyInfo.cs b/LFSInsim/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..c311ee6 --- /dev/null +++ b/LFSInsim/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die mit einer Assembly verknüpft sind. +[assembly: AssemblyTitle("LFSInsim")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("LFSInsim")] +[assembly: AssemblyCopyright("Copyright © 2012")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar +// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von +// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. +[assembly: ComVisible(false)] + +// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +[assembly: Guid("68eab44a-37bf-4dc4-a5a5-64089bf813c9")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern +// übernehmen, indem Sie "*" eingeben: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/LFSInsim/Sim.cs b/LFSInsim/Sim.cs new file mode 100644 index 0000000..e99015b --- /dev/null +++ b/LFSInsim/Sim.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using InSimDotNet; +using InSimDotNet.Packets; + +namespace LFSInsim +{ + class Sim + { + private InSim insim; + public Sim(string host, int port, string admin) + { + this.insim = new InSim(); + + this.insim.PacketReceived += this.PacketReceived; + + this.insim.Initialize(new InSimSettings + { + Host = host, + Port = port, + Admin = admin + }); + + + + } + + + private void PacketReceived(object sender, PacketEventArgs e) + { + if (e.Packet.Type == PacketType.ISP_MSO) + { + IS_MSO mso = (IS_MSO)e.Packet; + if(mso.Msg == "Ping") + this.insim.Send("Pong"); + Console.WriteLine(mso.Msg); + } + } + } +} diff --git a/LFSInsim/bin/Debug/InSimDotNet.dll b/LFSInsim/bin/Debug/InSimDotNet.dll new file mode 100644 index 0000000..14a7f99 Binary files /dev/null and b/LFSInsim/bin/Debug/InSimDotNet.dll differ diff --git a/LFSInsim/bin/Debug/LFSInsim.exe b/LFSInsim/bin/Debug/LFSInsim.exe new file mode 100644 index 0000000..1a6d967 Binary files /dev/null and b/LFSInsim/bin/Debug/LFSInsim.exe differ