mirror of
https://github.com/DarthAffe/CUE.NET.git
synced 2025-12-12 16:58:29 +00:00
Added example project to reflect the current development state.
This commit is contained in:
parent
599491e630
commit
75412594a5
@ -93,8 +93,8 @@
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>if $(PlatformName) == x86 copy "$(ProjectDir)libs\CUESDK_2013.dll" "$(TargetDir)CUESDK_2013.dll"
|
||||
if $(PlatformName) == x64 copy "$(ProjectDir)libs\CUESDK.x64_2013.dll" "$(TargetDir)CUESDK.x64_2013.dll"</PostBuildEvent>
|
||||
<PostBuildEvent>if $(PlatformName) == x86 copy "$(SolutionDir)libs\CUESDK_2013.dll" "$(TargetDir)CUESDK_2013.dll"
|
||||
if $(PlatformName) == x64 copy "$(SolutionDir)libs\CUESDK.x64_2013.dll" "$(TargetDir)CUESDK.x64_2013.dll"</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
15
CUE.NET.sln
15
CUE.NET.sln
@ -5,6 +5,10 @@ VisualStudioVersion = 14.0.23107.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUE.NET", "CUE.NET.csproj", "{70A266B5-E9D4-4EAA-A91A-947C0039FFB6}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{1F52DDC9-E9D0-4A7B-8E78-930528203EE6}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleDevTest", "Examples\SimpleDevTest\SimpleDevTest.csproj", "{7FD88256-5E14-4D7C-862B-7BC2CD04081A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
@ -21,8 +25,19 @@ Global
|
||||
{70A266B5-E9D4-4EAA-A91A-947C0039FFB6}.Release|x64.Build.0 = Release|x64
|
||||
{70A266B5-E9D4-4EAA-A91A-947C0039FFB6}.Release|x86.ActiveCfg = Release|x86
|
||||
{70A266B5-E9D4-4EAA-A91A-947C0039FFB6}.Release|x86.Build.0 = Release|x86
|
||||
{7FD88256-5E14-4D7C-862B-7BC2CD04081A}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{7FD88256-5E14-4D7C-862B-7BC2CD04081A}.Debug|x64.Build.0 = Debug|x64
|
||||
{7FD88256-5E14-4D7C-862B-7BC2CD04081A}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{7FD88256-5E14-4D7C-862B-7BC2CD04081A}.Debug|x86.Build.0 = Debug|x86
|
||||
{7FD88256-5E14-4D7C-862B-7BC2CD04081A}.Release|x64.ActiveCfg = Release|x64
|
||||
{7FD88256-5E14-4D7C-862B-7BC2CD04081A}.Release|x64.Build.0 = Release|x64
|
||||
{7FD88256-5E14-4D7C-862B-7BC2CD04081A}.Release|x86.ActiveCfg = Release|x86
|
||||
{7FD88256-5E14-4D7C-862B-7BC2CD04081A}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{7FD88256-5E14-4D7C-862B-7BC2CD04081A} = {1F52DDC9-E9D0-4A7B-8E78-930528203EE6}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
6
Examples/SimpleDevTest/App.config
Normal file
6
Examples/SimpleDevTest/App.config
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
|
||||
</startup>
|
||||
</configuration>
|
||||
46
Examples/SimpleDevTest/Program.cs
Normal file
46
Examples/SimpleDevTest/Program.cs
Normal file
@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using CUE.NET.Enums;
|
||||
using CUE.NET.Exceptions;
|
||||
using CUE.NET.Wrapper;
|
||||
|
||||
namespace SimpleDevTest
|
||||
{
|
||||
class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
try
|
||||
{
|
||||
CueSDK.Initialize();
|
||||
|
||||
CueKeyboard keyboard = CueSDK.KeyboardSDK;
|
||||
if (keyboard == null)
|
||||
throw new WrapperException("No keyboard found");
|
||||
|
||||
keyboard.SetKeyColor('r', Color.Red);
|
||||
keyboard.SetKeyColor('g', Color.Green);
|
||||
keyboard.SetKeyColor('b', Color.Blue);
|
||||
|
||||
keyboard.SetKeyColors(new[] { 'w', 'h', 'i', 't', 'e' }, Color.White);
|
||||
|
||||
Console.WriteLine(CueSDK.LastError);
|
||||
}
|
||||
catch (CUEException ex)
|
||||
{
|
||||
Console.WriteLine("CUE Exception! ErrorCode: " + Enum.GetName(typeof(CorsairError), ex.Error));
|
||||
}
|
||||
catch (WrapperException ex)
|
||||
{
|
||||
Console.WriteLine("Wrapper Exception! Message:" + ex.Message);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("Exception! Message:" + ex.Message);
|
||||
}
|
||||
|
||||
Console.WriteLine("Press any key to exit ...");
|
||||
Console.ReadKey();
|
||||
}
|
||||
}
|
||||
}
|
||||
35
Examples/SimpleDevTest/Properties/AssemblyInfo.cs
Normal file
35
Examples/SimpleDevTest/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,35 @@
|
||||
using System.Reflection;
|
||||
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("SimpleDevTest")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Wyrez")]
|
||||
[assembly: AssemblyProduct("SimpleDevTest")]
|
||||
[assembly: AssemblyCopyright("Copyright © Wyrez 2015")]
|
||||
[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("7fd88256-5e14-4d7c-862b-7bc2cd04081a")]
|
||||
|
||||
// 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")]
|
||||
92
Examples/SimpleDevTest/SimpleDevTest.csproj
Normal file
92
Examples/SimpleDevTest/SimpleDevTest.csproj
Normal file
@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" 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>{7FD88256-5E14-4D7C-862B-7BC2CD04081A}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SimpleDevTest</RootNamespace>
|
||||
<AssemblyName>SimpleDevTest</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<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" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\CUE.NET.csproj">
|
||||
<Project>{70a266b5-e9d4-4eaa-a91a-947c0039ffb6}</Project>
|
||||
<Name>CUE.NET</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>if $(PlatformName) == x86 copy "$(SolutionDir)libs\CUESDK_2013.dll" "$(TargetDir)CUESDK_2013.dll"
|
||||
if $(PlatformName) == x64 copy "$(SolutionDir)libs\CUESDK.x64_2013.dll" "$(TargetDir)CUESDK.x64_2013.dll"</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
Loading…
x
Reference in New Issue
Block a user