Plugins - Added optional configuration window

Plugins - Moved plugins to their own directory
Device providers - Added all RGB.NET device providers
This commit is contained in:
Robert committed 2020-02-27 13:25:38 +01:00
1 parent e15bf3688b
commit 2bcee30e11
752 files changed
+2198 -73

No files matched your search

@@ -0,0 +1,55 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyTitle>Artemis.Plugins.Devices.Wooting</AssemblyTitle>
<Product>Artemis.Plugins.Devices.Wooting</Product>
<Copyright>Copyright © 2019</Copyright>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<LangVersion>7.3</LangVersion>
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<UseWPF>true</UseWPF>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugType>full</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<DebugType>pdbonly</DebugType>
</PropertyGroup>
<ItemGroup>
<Compile Remove="x64\**" />
<Compile Remove="x86\**" />
<EmbeddedResource Remove="x64\**" />
<EmbeddedResource Remove="x86\**" />
<None Remove="x64\**" />
<None Remove="x86\**" />
</ItemGroup>
<ItemGroup>
<None Include="plugin.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Artemis.Core\Artemis.Core.csproj">
<Private>false</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="RGB.NET.Core">
<HintPath>..\..\..\..\RGB.NET\bin\netstandard2.0\RGB.NET.Core.dll</HintPath>
</Reference>
<Reference Include="RGB.NET.Devices.Novation">
<HintPath>..\..\..\..\RGB.NET\bin\netstandard2.0\RGB.NET.Devices.Novation.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Update="Images\**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Layouts\**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(BuildingInsideVisualStudio)' == 'true'">
<Exec Command="echo Copying resources to plugin output directory&#xD;&#xA;XCOPY &quot;$(ProjectDir)Images&quot; &quot;$(TargetDir)Images&quot; /s /q /i /y&#xD;&#xA;XCOPY &quot;$(ProjectDir)Layouts&quot; &quot;$(TargetDir)Layouts&quot; /s /q /i /y&#xD;&#xA;echo Copying plugin to Artemis.UI output directory&#xD;&#xA;XCOPY &quot;$(TargetDir.TrimEnd('\'))&quot; &quot;$(SolutionDir)\Artemis.UI\$(OutDir)Plugins\$(ProjectName)&quot; /s /q /i /y" />
</Target>
</Project>
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

@@ -0,0 +1,428 @@
<?xml version="1.0" encoding="utf-8"?>
<Device xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Name>Launchpad S</Name>
<Description>Launchpad S (8x8-Pad Grid)</Description>
<Author>Darth Affe</Author>
<Type>LedMatrix</Type>
<Lighting>Key</Lighting>
<Vendor>Novation</Vendor>
<Model>Launchpad S</Model>
<Width>240</Width>
<Height>240</Height>
<LedUnitWidth>20</LedUnitWidth>
<LedUnitHeight>20</LedUnitHeight>
<ImageBasePath>Images\Novation\Launchpads</ImageBasePath>
<DeviceImage>LaunchpadS.png</DeviceImage>
<Leds>
<!-- Custom-buttons -->
<Led Id="Custom1">
<Shape>Circle</Shape>
<X>16</X>
<Y>18</Y>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Custom2">
<Shape>Circle</Shape>
<X>+8</X>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Custom3">
<Shape>Circle</Shape>
<X>+8</X>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Custom4">
<Shape>Circle</Shape>
<X>+8</X>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Custom5">
<Shape>Circle</Shape>
<X>+8</X>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Custom6">
<Shape>Circle</Shape>
<X>+8</X>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Custom7">
<Shape>Circle</Shape>
<X>+8</X>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Custom8">
<Shape>Circle</Shape>
<X>+8</X>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<!-- Grid -->
<Led Id="LedMatrix1">
<X>14</X>
<Y>+4</Y>
</Led>
<Led Id="LedMatrix2">
<X>+4</X>
</Led>
<Led Id="LedMatrix3">
<X>+4</X>
</Led>
<Led Id="LedMatrix4">
<X>+4</X>
</Led>
<Led Id="LedMatrix5">
<X>+4</X>
</Led>
<Led Id="LedMatrix6">
<X>+4</X>
</Led>
<Led Id="LedMatrix7">
<X>+4</X>
</Led>
<Led Id="LedMatrix8">
<X>+4</X>
</Led>
<Led Id="LedMatrix9">
<X>14</X>
<Y>+4</Y>
</Led>
<Led Id="LedMatrix10">
<X>+4</X>
</Led>
<Led Id="LedMatrix11">
<X>+4</X>
</Led>
<Led Id="LedMatrix12">
<X>+4</X>
</Led>
<Led Id="LedMatrix13">
<X>+4</X>
</Led>
<Led Id="LedMatrix14">
<X>+4</X>
</Led>
<Led Id="LedMatrix15">
<X>+4</X>
</Led>
<Led Id="LedMatrix16">
<X>+4</X>
</Led>
<Led Id="LedMatrix17">
<X>14</X>
<Y>+4</Y>
</Led>
<Led Id="LedMatrix18">
<X>+4</X>
</Led>
<Led Id="LedMatrix19">
<X>+4</X>
</Led>
<Led Id="LedMatrix20">
<X>+4</X>
</Led>
<Led Id="LedMatrix21">
<X>+4</X>
</Led>
<Led Id="LedMatrix22">
<X>+4</X>
</Led>
<Led Id="LedMatrix23">
<X>+4</X>
</Led>
<Led Id="LedMatrix24">
<X>+4</X>
</Led>
<Led Id="LedMatrix25">
<X>14</X>
<Y>+4</Y>
</Led>
<Led Id="LedMatrix26">
<X>+4</X>
</Led>
<Led Id="LedMatrix27">
<X>+4</X>
</Led>
<Led Id="LedMatrix28">
<X>+4</X>
<Shape>M0,0 L0,1 L0.75,1 L1,0.75 L1,0 Z</Shape>
</Led>
<Led Id="LedMatrix29">
<X>+4</X>
<Shape>M0,0 L0,0.75 L0.25,1 L1,1 L1,0 Z</Shape>
</Led>
<Led Id="LedMatrix30">
<X>+4</X>
</Led>
<Led Id="LedMatrix31">
<X>+4</X>
</Led>
<Led Id="LedMatrix32">
<X>+4</X>
</Led>
<Led Id="LedMatrix33">
<X>14</X>
<Y>+4</Y>
</Led>
<Led Id="LedMatrix34">
<X>+4</X>
</Led>
<Led Id="LedMatrix35">
<X>+4</X>
</Led>
<Led Id="LedMatrix36">
<X>+4</X>
<Shape>M0,0 L0,1 L1,1 L1,0.25 L0.75,0 Z</Shape>
</Led>
<Led Id="LedMatrix37">
<X>+4</X>
<Shape>M0,0.25 L0,1 L1,1 L1,0 L0.25,0 Z</Shape>
</Led>
<Led Id="LedMatrix38">
<X>+4</X>
</Led>
<Led Id="LedMatrix39">
<X>+4</X>
</Led>
<Led Id="LedMatrix40">
<X>+4</X>
</Led>
<Led Id="LedMatrix41">
<X>14</X>
<Y>+4</Y>
</Led>
<Led Id="LedMatrix42">
<X>+4</X>
</Led>
<Led Id="LedMatrix43">
<X>+4</X>
</Led>
<Led Id="LedMatrix44">
<X>+4</X>
</Led>
<Led Id="LedMatrix45">
<X>+4</X>
</Led>
<Led Id="LedMatrix46">
<X>+4</X>
</Led>
<Led Id="LedMatrix47">
<X>+4</X>
</Led>
<Led Id="LedMatrix48">
<X>+4</X>
</Led>
<Led Id="LedMatrix49">
<X>14</X>
<Y>+4</Y>
</Led>
<Led Id="LedMatrix50">
<X>+4</X>
</Led>
<Led Id="LedMatrix51">
<X>+4</X>
</Led>
<Led Id="LedMatrix52">
<X>+4</X>
</Led>
<Led Id="LedMatrix53">
<X>+4</X>
</Led>
<Led Id="LedMatrix54">
<X>+4</X>
</Led>
<Led Id="LedMatrix55">
<X>+4</X>
</Led>
<Led Id="LedMatrix56">
<X>+4</X>
</Led>
<Led Id="LedMatrix57">
<X>14</X>
<Y>+4</Y>
</Led>
<Led Id="LedMatrix58">
<X>+4</X>
</Led>
<Led Id="LedMatrix59">
<X>+4</X>
</Led>
<Led Id="LedMatrix60">
<X>+4</X>
</Led>
<Led Id="LedMatrix61">
<X>+4</X>
</Led>
<Led Id="LedMatrix62">
<X>+4</X>
</Led>
<Led Id="LedMatrix63">
<X>+4</X>
</Led>
<Led Id="LedMatrix64">
<X>+4</X>
</Led>
<!-- Scene-buttons -->
<Led Id="Custom9">
<Shape>Circle</Shape>
<X>+4</X>
<Y>40</Y>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Custom10">
<Shape>Circle</Shape>
<X>~</X>
<Y>+8</Y>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Custom11">
<Shape>Circle</Shape>
<X>~</X>
<Y>+8</Y>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Custom12">
<Shape>Circle</Shape>
<X>~</X>
<Y>+8</Y>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Custom13">
<Shape>Circle</Shape>
<X>~</X>
<Y>+8</Y>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Custom14">
<Shape>Circle</Shape>
<X>~</X>
<Y>+8</Y>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Custom15">
<Shape>Circle</Shape>
<X>~</X>
<Y>+8</Y>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
<Led Id="Custom16">
<Shape>Circle</Shape>
<X>~</X>
<Y>+8</Y>
<Width>16mm</Width>
<Height>16mm</Height>
</Led>
</Leds>
<LedImageLayouts>
<LedImageLayout Layout="Default">
<LedImages>
<LedImage Id="Custom1" Image="Buttons\Round.png" />
<LedImage Id="Custom2" Image="Buttons\Round.png" />
<LedImage Id="Custom3" Image="Buttons\Round.png" />
<LedImage Id="Custom4" Image="Buttons\Round.png" />
<LedImage Id="Custom5" Image="Buttons\Round.png" />
<LedImage Id="Custom6" Image="Buttons\Round.png" />
<LedImage Id="Custom7" Image="Buttons\Round.png" />
<LedImage Id="Custom8" Image="Buttons\Round.png" />
<LedImage Id="Custom9" Image="Buttons\Round.png" />
<LedImage Id="Custom10" Image="Buttons\Round.png" />
<LedImage Id="Custom11" Image="Buttons\Round.png" />
<LedImage Id="Custom12" Image="Buttons\Round.png" />
<LedImage Id="Custom13" Image="Buttons\Round.png" />
<LedImage Id="Custom14" Image="Buttons\Round.png" />
<LedImage Id="Custom15" Image="Buttons\Round.png" />
<LedImage Id="Custom16" Image="Buttons\Round.png" />
<LedImage Id="LedMatrix1" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix2" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix3" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix4" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix5" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix6" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix7" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix8" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix9" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix10" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix11" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix12" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix13" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix14" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix15" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix16" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix17" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix18" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix19" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix20" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix21" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix22" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix23" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix24" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix25" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix26" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix27" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix28" Image="Buttons\GridCenter1.png" />
<LedImage Id="LedMatrix29" Image="Buttons\GridCenter2.png" />
<LedImage Id="LedMatrix30" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix31" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix32" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix33" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix34" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix35" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix36" Image="Buttons\GridCenter3.png" />
<LedImage Id="LedMatrix37" Image="Buttons\GridCenter4.png" />
<LedImage Id="LedMatrix38" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix39" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix40" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix41" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix42" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix43" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix44" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix45" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix46" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix47" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix48" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix49" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix50" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix51" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix52" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix53" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix54" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix55" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix56" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix57" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix58" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix59" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix60" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix61" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix62" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix63" Image="Buttons\Grid.png" />
<LedImage Id="LedMatrix64" Image="Buttons\Grid.png" />
</LedImages>
</LedImageLayout>
</LedImageLayouts>
</Device>
@@ -0,0 +1,37 @@
using Artemis.Core.Plugins.Abstract;
using Artemis.Core.Plugins.Models;
using Artemis.Core.Services.Interfaces;
using RGB.NET.Core;
using RGB.NET.Devices.Novation;
namespace Artemis.Plugins.Devices.Novation
{
// ReSharper disable once UnusedMember.Global
public class NovationDeviceProvider : DeviceProvider
{
private readonly IRgbService _rgbService;
public NovationDeviceProvider(PluginInfo pluginInfo, IRgbService rgbService) : base(pluginInfo, RGB.NET.Devices.Novation.NovationDeviceProvider.Instance)
{
_rgbService = rgbService;
}
public override void EnablePlugin()
{
PathHelper.ResolvingAbsolutePath += (sender, args) => ResolveAbsolutePath(typeof(NovationRGBDevice<>), sender, args);
_rgbService.AddDeviceProvider(RgbDeviceProvider);
}
public override void DisablePlugin()
{
// TODO: Remove the device provider from the surface
}
public override void Dispose()
{
// TODO: This will probably not go well without first removing the device provider
// NovationDeviceProvider.Instance.ResetDevices();
// NovationDeviceProvider.Instance.Dispose();
}
}
}
@@ -0,0 +1,10 @@
using System.Reflection;
using System.Runtime.InteropServices;
// 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("c6bdb6d9-062d-4c28-a280-f3bd6197f07f")]
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.4.5.0" newVersion="1.4.5.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.2.5.0" newVersion="1.2.5.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Ninject" publicKeyToken="c7192dc5380945e7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.3.4.0" newVersion="3.3.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
@@ -0,0 +1,6 @@
{
"Guid": "a487332f-c4b3-43e7-b80f-f33adc6fff87",
"Name": "Novation Devices",
"Version": "1.0.0.0",
"Main": "Artemis.Plugins.Devices.Novation.dll"
}