summaryrefslogtreecommitdiff
path: root/grapher
diff options
context:
space:
mode:
Diffstat (limited to 'grapher')
-rw-r--r--grapher/AboutBox.cs6
-rw-r--r--grapher/App.config6
-rw-r--r--grapher/Form1.cs13
-rw-r--r--grapher/Models/Devices/DeviceIDManager.cs5
-rw-r--r--grapher/Models/Serialized/GUISettings.cs21
-rw-r--r--grapher/Models/Serialized/SettingsManager.cs7
-rw-r--r--grapher/grapher.csproj246
-rw-r--r--grapher/packages.config4
8 files changed, 44 insertions, 264 deletions
diff --git a/grapher/AboutBox.cs b/grapher/AboutBox.cs
index 5547c59..5a22329 100644
--- a/grapher/AboutBox.cs
+++ b/grapher/AboutBox.cs
@@ -21,7 +21,7 @@ namespace grapher
#region Assembly Attribute Accessors
- public string AssemblyTitle
+ public static string AssemblyTitle
{
get
{
@@ -34,11 +34,11 @@ namespace grapher
return titleAttribute.Title;
}
}
- return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
+ return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().Location);
}
}
- public string AssemblyVersion
+ public static string AssemblyVersion
{
get
{
diff --git a/grapher/App.config b/grapher/App.config
deleted file mode 100644
index 56efbc7..0000000
--- a/grapher/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<configuration>
- <startup>
- <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
- </startup>
-</configuration> \ No newline at end of file
diff --git a/grapher/Form1.cs b/grapher/Form1.cs
index c492a9b..66f4ce2 100644
--- a/grapher/Form1.cs
+++ b/grapher/Form1.cs
@@ -1,20 +1,7 @@
using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Data;
using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using System.Windows.Forms;
-using System.Runtime.InteropServices;
-using grapher.Models.Calculations;
-using grapher.Models.Options;
-using grapher.Models.Serialized;
using grapher.Models;
-using System.Reflection;
-using System.Diagnostics;
namespace grapher
{
diff --git a/grapher/Models/Devices/DeviceIDManager.cs b/grapher/Models/Devices/DeviceIDManager.cs
index e0ee686..ff18718 100644
--- a/grapher/Models/Devices/DeviceIDManager.cs
+++ b/grapher/Models/Devices/DeviceIDManager.cs
@@ -1,10 +1,5 @@
using System;
using System.Collections.Generic;
-using System.Drawing;
-using System.Linq;
-using System.Management;
-using System.Text;
-using System.Threading.Tasks;
using System.Windows.Forms;
namespace grapher.Models.Devices
diff --git a/grapher/Models/Serialized/GUISettings.cs b/grapher/Models/Serialized/GUISettings.cs
index e7b67ba..b7fe4de 100644
--- a/grapher/Models/Serialized/GUISettings.cs
+++ b/grapher/Models/Serialized/GUISettings.cs
@@ -1,11 +1,10 @@
-using Newtonsoft.Json;
-using System;
+using System;
using System.IO;
-
+using System.Text.Json;
+using System.Text.Json.Serialization;
namespace grapher.Models.Serialized
{
[Serializable]
- [JsonObject(ItemRequired = Required.Always)]
public class GUISettings
{
#region Constructors
@@ -17,22 +16,16 @@ namespace grapher.Models.Serialized
#region Properties
- [JsonProperty(Order = 1)]
public int DPI { get; set; }
- [JsonProperty(Order = 2)]
public int PollRate { get; set; }
- [JsonProperty(Order = 3)]
public bool ShowLastMouseMove { get; set; }
- [JsonProperty(Order = 4)]
public bool ShowVelocityAndGain { get; set; }
- [JsonProperty(Order = 5)]
public bool AutoWriteToDriverOnStartup { get; set; }
- [JsonProperty(Order = 6)]
public bool StreamingMode { get; set; }
#endregion Properties
@@ -41,9 +34,7 @@ namespace grapher.Models.Serialized
public override bool Equals(object obj)
{
- var other = obj as GUISettings;
-
- if (other == null)
+ if (obj is not GUISettings other)
{
return false;
}
@@ -73,7 +64,7 @@ namespace grapher.Models.Serialized
public void Save()
{
- File.WriteAllText(Constants.GuiConfigFileName, JsonConvert.SerializeObject(this));
+ File.WriteAllText(Constants.GuiConfigFileName, JsonSerializer.Serialize(this));
}
public static GUISettings MaybeLoad()
@@ -82,7 +73,7 @@ namespace grapher.Models.Serialized
try
{
- settings = JsonConvert.DeserializeObject<GUISettings>(
+ settings = JsonSerializer.Deserialize<GUISettings>(
File.ReadAllText(Constants.GuiConfigFileName));
}
catch (Exception ex)
diff --git a/grapher/Models/Serialized/SettingsManager.cs b/grapher/Models/Serialized/SettingsManager.cs
index 3789c05..6db211f 100644
--- a/grapher/Models/Serialized/SettingsManager.cs
+++ b/grapher/Models/Serialized/SettingsManager.cs
@@ -1,11 +1,8 @@
-using Newtonsoft.Json;
-using System;
+using System;
using System.IO;
using System.Windows.Forms;
using System.Threading;
-using System.Text;
-using System.Drawing;
-using grapher.Models.Devices;
+using System.Text.Json;
using System.Collections.Generic;
using System.Linq;
diff --git a/grapher/grapher.csproj b/grapher/grapher.csproj
index 9a9412b..f96fea7 100644
--- a/grapher/grapher.csproj
+++ b/grapher/grapher.csproj
@@ -1,217 +1,37 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{EF67F71F-ABF5-4760-B50D-D1B9836DF01C}</ProjectGuid>
+<Project Sdk="Microsoft.NET.Sdk">
+
+<PropertyGroup>
<OutputType>WinExe</OutputType>
- <RootNamespace>grapher</RootNamespace>
- <AssemblyName>rawaccel</AssemblyName>
- <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
- <Deterministic>true</Deterministic>
- <PublishUrl>publish\</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Disk</InstallFrom>
- <UpdateEnabled>false</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <IsWebBootstrapper>false</IsWebBootstrapper>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <DebugType>full</DebugType>
- <PlatformTarget>x64</PlatformTarget>
- <LangVersion>7.3</LangVersion>
- <ErrorReport>prompt</ErrorReport>
- <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
- <Prefer32Bit>true</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ <TargetFramework>net5.0-windows</TargetFramework>
+ <Platforms>ARM64;x64</Platforms>
+ <UseWindowsForms>true</UseWindowsForms>
+ <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
+ <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <Optimize>true</Optimize>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>x64</PlatformTarget>
- <LangVersion>7.3</LangVersion>
- <ErrorReport>prompt</ErrorReport>
- <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
- <Prefer32Bit>true</Prefer32Bit>
- </PropertyGroup>
- <PropertyGroup>
+ <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<ApplicationIcon>mouse.ico</ApplicationIcon>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
- <HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Core" />
- <Reference Include="System.Windows.Forms.DataVisualization" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="Microsoft.CSharp" />
- <Reference Include="System.Data" />
- <Reference Include="System.Deployment" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Net.Http" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="AboutBox.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="AboutBox.Designer.cs">
- <DependentUpon>AboutBox.cs</DependentUpon>
- </Compile>
- <Compile Include="Constants\Constants.cs" />
- <Compile Include="DeviceMenuForm.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="DeviceMenuForm.Designer.cs">
- <DependentUpon>DeviceMenuForm.cs</DependentUpon>
- </Compile>
- <Compile Include="Layouts\LUTLayout.cs" />
- <Compile Include="Layouts\MotivityLayout.cs" />
- <Compile Include="Layouts\JumpLayout.cs" />
- <Compile Include="Layouts\UnsupportedLayout.cs" />
- <Compile Include="MessageDialog.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="MessageDialog.Designer.cs">
- <DependentUpon>MessageDialog.cs</DependentUpon>
- </Compile>
- <Compile Include="Models\AccelGUIFactory.cs" />
- <Compile Include="Models\Calculations\AccelCalculator.cs" />
- <Compile Include="Models\Calculations\AccelChartData.cs" />
- <Compile Include="Models\Calculations\Data\AccelDataCombined.cs" />
- <Compile Include="Models\Calculations\Data\AccelDataXYComponential.cs" />
- <Compile Include="Models\Calculations\Data\AccelDataXYDirectional.cs" />
- <Compile Include="Models\Calculations\Data\IAccelData.cs" />
- <Compile Include="Models\Charts\AccelCharts.cs" />
- <Compile Include="Models\AccelGUI.cs" />
- <Compile Include="Models\Charts\ChartState\ChartState.cs" />
- <Compile Include="Models\Charts\ChartState\ChartStateManager.cs" />
- <Compile Include="Models\Charts\ChartState\CombinedState.cs" />
- <Compile Include="Models\Charts\EstimatedPoints.cs" />
- <Compile Include="Models\Charts\ChartState\XYOneGraphState.cs" />
- <Compile Include="Models\Charts\ChartState\XYTwoGraphState.cs" />
- <Compile Include="Models\Devices\DeviceIDItem.cs" />
- <Compile Include="Models\Devices\DeviceIDManager.cs" />
- <Compile Include="Models\Mouse\MouseData.cs" />
- <Compile Include="Models\Mouse\MouseWatcher.cs" />
- <Compile Include="Models\Mouse\PointData.cs" />
- <Compile Include="Models\Options\AccelTypeOptions.cs" />
- <Compile Include="Models\Options\AccelOptionSet.cs" />
- <Compile Include="Models\Options\ActiveValueLabel.cs" />
- <Compile Include="Models\Options\ActiveValueLabelXY.cs" />
- <Compile Include="Models\Options\ApplyOptions.cs" />
- <Compile Include="Models\Charts\ChartXY.cs" />
- <Compile Include="Models\Fields\Field.cs" />
- <Compile Include="Models\Fields\FieldXY.cs" />
- <Compile Include="Form1.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="Form1.Designer.cs">
- <DependentUpon>Form1.cs</DependentUpon>
- </Compile>
- <Compile Include="Layouts\ClassicLayout.cs" />
- <Compile Include="Layouts\DefaultLayout.cs" />
- <Compile Include="Layouts\LayoutBase.cs" />
- <Compile Include="Layouts\LinearLayout.cs" />
- <Compile Include="Layouts\NaturalLayout.cs" />
- <Compile Include="Layouts\OffLayout.cs" />
- <Compile Include="Layouts\PowerLayout.cs" />
- <Compile Include="Models\Options\CheckBoxOption.cs" />
- <Compile Include="Models\Options\Directionality\DirectionalityOptions.cs" />
- <Compile Include="Models\Options\LUT\LutApplyOptions.cs" />
- <Compile Include="Models\Options\IOption.cs" />
- <Compile Include="Models\Options\LUT\LUTPanelOptions.cs" />
- <Compile Include="Models\Options\OffsetOptions.cs" />
- <Compile Include="Models\Options\Option.cs" />
- <Compile Include="Layouts\OptionLayout.cs" />
- <Compile Include="Models\Options\OptionBase.cs" />
- <Compile Include="Models\Options\OptionXY.cs" />
- <Compile Include="Models\Options\TextOption.cs" />
- <Compile Include="Models\Serialized\GUISettings.cs" />
- <Compile Include="Models\Serialized\SettingsManager.cs" />
- <Compile Include="Program.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <EmbeddedResource Include="AboutBox.resx">
- <DependentUpon>AboutBox.cs</DependentUpon>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <EmbeddedResource Include="DeviceMenuForm.resx">
- <DependentUpon>DeviceMenuForm.cs</DependentUpon>
- </EmbeddedResource>
- <EmbeddedResource Include="Form1.resx">
- <DependentUpon>Form1.cs</DependentUpon>
- </EmbeddedResource>
- <EmbeddedResource Include="Properties\Resources.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>Resources.Designer.cs</LastGenOutput>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <Compile Include="Properties\Resources.Designer.cs">
- <AutoGen>True</AutoGen>
- <DependentUpon>Resources.resx</DependentUpon>
- </Compile>
- <None Include="packages.config" />
- <None Include="Properties\Settings.settings">
- <Generator>SettingsSingleFileGenerator</Generator>
- <LastGenOutput>Settings.Designer.cs</LastGenOutput>
- </None>
- <Compile Include="Properties\Settings.Designer.cs">
- <AutoGen>True</AutoGen>
- <DependentUpon>Settings.settings</DependentUpon>
- <DesignTimeSharedInput>True</DesignTimeSharedInput>
- </Compile>
- </ItemGroup>
- <ItemGroup>
- <None Include="App.config" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\wrapper\wrapper.vcxproj">
- <Project>{28a3656f-a1de-405c-b547-191c32ec555f}</Project>
- <Name>wrapper</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Icon\" />
- <Folder Include="ReadMe\" />
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
- <Visible>False</Visible>
- <ProductName>Microsoft .NET Framework 4.7.2 %28x86 and x64%29</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <ItemGroup>
- <Content Include="mouse.ico" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <PropertyGroup>
- <PostBuildEvent>IF ($(ConfigurationName)) == (Debug) GOTO END
-copy /Y "$(TargetPath)" "$(SolutionDir)signed\$(TargetFileName)"
-:END</PostBuildEvent>
- </PropertyGroup>
+ <ProduceReferenceAssembly>false</ProduceReferenceAssembly>
+ <AssemblyName>rawaccel</AssemblyName>
+</PropertyGroup>
+
+<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
+ <PlatformTarget>ARM64</PlatformTarget>
+</PropertyGroup>
+<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
+ <PlatformTarget>ARM64</PlatformTarget>
+</PropertyGroup>
+
+<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <PlatformTarget>x64</PlatformTarget>
+</PropertyGroup>
+<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <PlatformTarget>x64</PlatformTarget>
+</PropertyGroup>
+
+<ItemGroup>
+ <PackageReference Include="System.Data.SqlClient" Version="4.8.2" />
+ <PackageReference Include="System.Windows.Forms.DataVisualization" Version="1.0.0-prerelease.20110.1" />
+ <ProjectReference Include="..\wrapper\wrapper.vcxproj" />
+</ItemGroup>
+
</Project> \ No newline at end of file
diff --git a/grapher/packages.config b/grapher/packages.config
deleted file mode 100644
index a9de8b5..0000000
--- a/grapher/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="Newtonsoft.Json" version="12.0.3" targetFramework="net472" />
-</packages> \ No newline at end of file