Skip to content

Commit

Permalink
Publish v1.6.1
Browse files Browse the repository at this point in the history
Fixed broken installer by reworking to remove a newly introduced dependency.
  • Loading branch information
coldino committed Jan 27, 2018
1 parent 017e7f5 commit 6142dec
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 27 deletions.
22 changes: 12 additions & 10 deletions LarkatorGUI/CalibrationWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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); }
Expand Down Expand Up @@ -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" +
$"}},";
}
}

Expand Down
21 changes: 4 additions & 17 deletions LarkatorGUI/LarkatorGUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
<ProductName>Larkator</ProductName>
<PublisherName>coldino</PublisherName>
<AutorunEnabled>true</AutorunEnabled>
<ApplicationRevision>2</ApplicationRevision>
<ApplicationVersion>1.6.0.%2a</ApplicationVersion>
<ApplicationRevision>3</ApplicationRevision>
<ApplicationVersion>1.6.1.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>
Expand Down Expand Up @@ -94,23 +94,10 @@
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Runtime.Serialization.Primitives, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\program files\dotnet\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.Runtime.Serialization.Primitives.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Deployment" />
<Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
Expand Down

0 comments on commit 6142dec

Please sign in to comment.