The online racing simulator
.NET (C#) - Mary (local InSim application)
(7 posts, started )
.NET (C#) - Mary (local InSim application)
Hello. I would like to release my local InSim application I've been working on over the last few years. I'm not very active anymore in LFS so I don't think I will develop this any much anyway. This is by no way perfect code. The initial plan for the project has changed many times, which can be seen in the code. The bit I release here is the last version I personally use (without some small pieces that should not be in public). There has been other functions over the time, but I have gotten rid of parts on the way that I didn't find useful.

What is it?
It's a local InSim application I developed over several years to make my own user experience inside LFS easier and more interesting. I'm a cruiser, I'm mainly on TC servers which is why there is some functions that gather information from their website. Some bits I have found online (for example the lowlevel stuff that registers numpad keypresses and wheeelscrolling), so I don't want to claim all the code as my own, because it's not. But the majority is my own.

I hope other people can use parts of this, learn something, be inspired, get motivation... I just don't want this to die on my harddrive, its way to many hours spent. Smile If anything, it can be used as an example project for InSim.NET.

It's written in C#, using DarkTime's InSim.NET library. I have put the project on, a platform I have used very little, so excuse any mess.

The project is released under the same license as InSim.NET, the Lesser General Public License (LGPL).

Like I said I'm not very active anymore, but I will do my best to help anyone who genuine needs help to understand, get started, etc...

Fully working version of the tool: (go to settings.txt and edit the line that says "key=mariusmm" to your own username)

Update 2019: Version 2 is now available here (not open source):
If we make any changes to our statistics API, I'll make sure I send you some pull requests/issues on the repo to keep it up to date. Glad to see you open sourced it. Smile
Thanks!!! i missed this baby Wink
Thanks Smile
First of good program, was wondering does the cruise control no longer work or do I need to update to the newest version of lfs?
EDIT:Tried the newest version of lfs and still does not work
6/02/2017 00:19:55 : Application starting up...
6/02/2017 00:19:55 : Using version 1.2
6/02/2017 00:19:55 : Loading settings...
6/02/2017 00:19:55 : ---------------------------------------------
6/02/2017 00:19:55 : ----------InSim Error Message start----------
6/02/2017 00:19:55 : System.InvalidOperationException: Cannot load Counter Name data because an invalid index '' was read from the registry.
at System.Diagnostics.PerformanceCounterLib.GetStringTable(Boolean isHelp)
at System.Diagnostics.PerformanceCounterLib.get_NameTable()
at System.Diagnostics.PerformanceCounterLib.get_CategoryTable()
at System.Diagnostics.PerformanceCounterLib.CounterExists(String category, String counter, Boolean& categoryExists)
at System.Diagnostics.PerformanceCounterLib.CounterExists(String machine, String category, String counter)
at System.Diagnostics.PerformanceCounter.InitializeImpl()
at System.Diagnostics.PerformanceCounter..ctor(String categoryName, String counterName, String instanceName, Boolean readOnly)
at System.Diagnostics.PerformanceCounter..ctor(String categoryName, String counterName)
at Mary.Performance.a()
at Mary.Program.Main()
6/02/2017 00:19:55 : ----------InSim Error Message end------------
6/02/2017 00:19:55 : ---------------------------------------------

Unhandled Exception: System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "InSimDotNet.StringResources.resources" was correctly embedded or linked into assembly "Mary" at compile time, or that all the satellite assemblies required are loadable and fully signed.
at System.Resources.ManifestBasedResourceGroveler.HandleResourceStreamMissing(String fileName)
at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
at InSimDotNet.InSim.ThrowIfNotConnected()
at InSimDotNet.InSim.Send(ISendable packet)
at Mary.Program.Main()

This happens when I try to run the .exe

.NET (C#) - Mary (local InSim application)
(7 posts, started )