diff options
| author | Tomáš Pazdiora <[email protected]> | 2021-01-07 23:21:33 +0100 |
|---|---|---|
| committer | Tomáš Pazdiora <[email protected]> | 2021-01-07 23:21:33 +0100 |
| commit | 215a21f9b62aa50d9ca4037ca0a22f5b0920f373 (patch) | |
| tree | 3f0cbca12e4575cc325c86996d952d01829b2acd /devicelist | |
| parent | update devicelist app (diff) | |
| download | rawaccel-215a21f9b62aa50d9ca4037ca0a22f5b0920f373.tar.xz rawaccel-215a21f9b62aa50d9ca4037ca0a22f5b0920f373.zip | |
rough GUI integration of "Device Hardware ID"
Diffstat (limited to 'devicelist')
| -rw-r--r-- | devicelist/App.config | 6 | ||||
| -rw-r--r-- | devicelist/Program.cs | 37 | ||||
| -rw-r--r-- | devicelist/Properties/AssemblyInfo.cs | 36 | ||||
| -rw-r--r-- | devicelist/devicelist.csproj | 73 |
4 files changed, 0 insertions, 152 deletions
diff --git a/devicelist/App.config b/devicelist/App.config deleted file mode 100644 index 56efbc7..0000000 --- a/devicelist/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/devicelist/Program.cs b/devicelist/Program.cs deleted file mode 100644 index 9323fd4..0000000 --- a/devicelist/Program.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Text; -using System.Management; -using System.Windows.Forms; - -namespace devicelist -{ - class Program - { - static void Main(string[] args) - { - Console.WriteLine("To use Raw Accel driver for a specific device, " - + "replace '\"Device Hardware ID\": null' in 'settings.json' by following:"); - Console.WriteLine(""); - - ManagementObjectSearcher searcher = new ManagementObjectSearcher(new SelectQuery("Win32_PnPEntity")); - - foreach (ManagementObject obj in searcher.Get()) - { - bool is_mouse = obj["PNPClass"] != null && obj["PNPClass"].ToString() == "Mouse"; // == "HIDClass" ??? - - if (is_mouse && obj["HardwareID"] != null) { - String[] hwidArray = (String[])(obj["HardwareID"]); - if (hwidArray.Length > 0) { - String hwid = hwidArray[0].ToString().Replace(@"\", @"\\"); - String name = obj["Name"].ToString(); - Console.WriteLine(name + ":"); - Console.WriteLine("\"Device Hardware ID\": \"" + hwid + "\""); - Console.WriteLine(""); - } - } - } - - Console.ReadKey(); - } - } -} diff --git a/devicelist/Properties/AssemblyInfo.cs b/devicelist/Properties/AssemblyInfo.cs deleted file mode 100644 index 36f0015..0000000 --- a/devicelist/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -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("Raw Accel devicelist")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Raw Accel")] -[assembly: AssemblyCopyright("")] -[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("3666b731-7406-41b1-bcfc-c65073fd09a1")] - -// 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(RawAccelVersion.value)] -[assembly: AssemblyFileVersion(RawAccelVersion.value)] diff --git a/devicelist/devicelist.csproj b/devicelist/devicelist.csproj deleted file mode 100644 index 154d0d0..0000000 --- a/devicelist/devicelist.csproj +++ /dev/null @@ -1,73 +0,0 @@ -<?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>{3666B731-7406-41B1-BCFC-C65073FD09A1}</ProjectGuid> - <OutputType>Exe</OutputType> - <RootNamespace>devicelist</RootNamespace> - <AssemblyName>devicelist</AssemblyName> - <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> - <Deterministic>true</Deterministic> - </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'"> - <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> - <StartupObject /> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Core" /> - <Reference Include="System.Management" /> - <Reference Include="System.Windows.Forms" /> - <Reference Include="System.Xml.Linq" /> - <Reference Include="System.Data.DataSetExtensions" /> - <Reference Include="Microsoft.CSharp" /> - <Reference Include="System.Data" /> - <Reference Include="System.Net.Http" /> - <Reference Include="System.Xml" /> - <Reference Include="System.Management" /> - </ItemGroup> - <ItemGroup> - <Compile Include="Program.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - </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> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <PropertyGroup> - <PostBuildEvent>IF ($(ConfigurationName)) == (Debug) GOTO END -copy /Y "$(TargetPath)" "$(SolutionDir)signed\$(TargetFileName)" -:END</PostBuildEvent> - </PropertyGroup> -</Project>
\ No newline at end of file |