From fd184b6ffeaf5b1d1dceb7de58a8ebb7c3d8c760 Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Fri, 25 Sep 2020 18:46:04 -0400 Subject: add initial writer move managed settings into wrapper move gui build into driver build dir --- writer/App.config | 6 ++++ writer/Program.cs | 30 ++++++++++++++++++ writer/Properties/AssemblyInfo.cs | 36 ++++++++++++++++++++++ writer/writer.csproj | 65 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 137 insertions(+) create mode 100644 writer/App.config create mode 100644 writer/Program.cs create mode 100644 writer/Properties/AssemblyInfo.cs create mode 100644 writer/writer.csproj (limited to 'writer') diff --git a/writer/App.config b/writer/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/writer/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/writer/Program.cs b/writer/Program.cs new file mode 100644 index 0000000..7f9c37c --- /dev/null +++ b/writer/Program.cs @@ -0,0 +1,30 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; + +using System; +using System.IO; + +namespace writer +{ + class Program + { + static void Main(string[] args) + { + try + { + var serializerSettings = new JsonSerializerSettings + { + MissingMemberHandling = MissingMemberHandling.Error, + }; + var token = JObject.Parse(File.ReadAllText(args[0]))["AccelerationSettings"]; + var settings = token.ToObject(JsonSerializer.Create(serializerSettings)); + DriverInterop.SetActiveSettings(settings); + } + catch (Exception e) + { + Console.WriteLine(e); + Console.ReadLine(); + } + } + } +} diff --git a/writer/Properties/AssemblyInfo.cs b/writer/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..37e79ad --- /dev/null +++ b/writer/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("writer")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("writer")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("28acf254-e4ef-4a0e-9761-0fe22048d6fd")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/writer/writer.csproj b/writer/writer.csproj new file mode 100644 index 0000000..4befc1a --- /dev/null +++ b/writer/writer.csproj @@ -0,0 +1,65 @@ + + + + + Debug + AnyCPU + {28ACF254-E4EF-4A0E-9761-0FE22048D6FD} + Exe + writer + writer + v4.7.2 + 512 + true + true + + + true + $(SolutionDir)$(Platform)\$(Configuration)\ + DEBUG;TRACE + full + x64 + 7.3 + prompt + MinimumRecommendedRules.ruleset + true + + + $(SolutionDir)$(Platform)\$(Configuration)\ + TRACE + true + pdbonly + x64 + 7.3 + prompt + MinimumRecommendedRules.ruleset + true + + + + ..\x64\Release\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + + {28a3656f-a1de-405c-b547-191c32ec555f} + wrapper + + + + \ No newline at end of file -- cgit v1.2.3