From 6142dec9f78587da9a4de2ec5981b2ea2c72a69b Mon Sep 17 00:00:00 2001 From: Anthony Purchase Date: Sat, 27 Jan 2018 02:17:24 +0000 Subject: [PATCH] Publish v1.6.1 Fixed broken installer by reworking to remove a newly introduced dependency. --- LarkatorGUI/CalibrationWindow.xaml.cs | 22 ++++++++++++---------- LarkatorGUI/LarkatorGUI.csproj | 21 ++++----------------- 2 files changed, 16 insertions(+), 27 deletions(-) diff --git a/LarkatorGUI/CalibrationWindow.xaml.cs b/LarkatorGUI/CalibrationWindow.xaml.cs index 448377c..0d2f857 100644 --- a/LarkatorGUI/CalibrationWindow.xaml.cs +++ b/LarkatorGUI/CalibrationWindow.xaml.cs @@ -1,7 +1,6 @@ using Newtonsoft.Json; using System; using System.Diagnostics; -using System.Runtime.Serialization; using System.Windows; using System.Windows.Controls; using System.Windows.Input; @@ -81,52 +80,44 @@ public ExampleCalibration() } } - [DataContract] public class Calibration : DependencyObject { - [JsonIgnore] public Bounds Bounds { get { return (Bounds)GetValue(BoundsProperty); } set { SetValue(BoundsProperty, value); } } - [DataMember] public string Filename { get { return (string)GetValue(FilenameProperty); } set { SetValue(FilenameProperty, value); } } - [DataMember] public double OffsetX { get { return (double)GetValue(OffsetXProperty); } set { SetValue(OffsetXProperty, value); } } - [DataMember] public double OffsetY { get { return (double)GetValue(OffsetYProperty); } set { SetValue(OffsetYProperty, value); } } - [DataMember] public double ScaleX { get { return (double)GetValue(ScaleXProperty); } set { SetValue(ScaleXProperty, value); } } - [DataMember] public double ScaleY { get { return (double)GetValue(ScaleYProperty); } set { SetValue(ScaleYProperty, value); } } - [JsonIgnore] public string Output { get { return (string)GetValue(OutputProperty); } @@ -172,7 +163,18 @@ public void Recalculate() OffsetX = minX - ScaleX * 10; OffsetY = minY - ScaleY * 10; - Output = JsonConvert.SerializeObject(this, Formatting.Indented); + Output = RecreateOutput(); + } + + private string RecreateOutput() + { + return $"{{\n" + + $" \"Filename\": \"{Filename}\",\n" + + $" \"OffsetX\": \"{OffsetX}\",\n" + + $" \"OffsetY\": \"{OffsetY}\",\n" + + $" \"ScaleX\": \"{ScaleX}\",\n" + + $" \"ScaleY\": \"{ScaleY}\"\n" + + $"}},"; } } diff --git a/LarkatorGUI/LarkatorGUI.csproj b/LarkatorGUI/LarkatorGUI.csproj index f8b1f2a..6bb7717 100644 --- a/LarkatorGUI/LarkatorGUI.csproj +++ b/LarkatorGUI/LarkatorGUI.csproj @@ -30,8 +30,8 @@ Larkator coldino true - 2 - 1.6.0.%2a + 3 + 1.6.1.%2a false true true @@ -94,23 +94,10 @@ ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - - - - - - False - ..\..\..\..\program files\dotnet\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.Runtime.Serialization.Primitives.dll - - - + + - - - - 4.0 -