Merge pull request #1 from DarthAffe/launchpad
Added support for novation devices
31
NuGet/RGB.NET.Devices.Novation.nuspec
Normal file
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>RGB.NET.Devices.Novation</id>
|
||||
<title>RGB.NET.Devices.Novation</title>
|
||||
<version>1.0.0.0</version>
|
||||
<authors>Darth Affe</authors>
|
||||
<owners>Darth Affe</owners>
|
||||
<projectUrl>https://github.com/DarthAffe/RGB.NET</projectUrl>
|
||||
<licenseUrl>https://raw.githubusercontent.com/DarthAffe/RGB.NET/master/LICENSE</licenseUrl>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
<description>Novation-Device-Implementations of RGB.NET</description>
|
||||
<releaseNotes></releaseNotes>
|
||||
<summary>Novation-Device-Implementations of RGB.NET, a C# (.NET) library for accessing various RGB-peripherals</summary>
|
||||
<copyright>Copyright © Wyrez 2017</copyright>
|
||||
<language>en-US</language>
|
||||
<dependencies>
|
||||
<dependency id="RGB.NET.Core" version="1.0" />
|
||||
<dependency id="System.ValueTuple" version="4.3.1" />
|
||||
<dependency id="Sanford.Multimedia.Midi" version="6.4.1" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="..\bin\RGB.NET.Devices.Novation.dll" target="lib\net45\RGB.NET.Devices.Novation.dll" />
|
||||
<file src="..\bin\RGB.NET.Devices.Novation.pdb" target="lib\net45\RGB.NET.Devices.Novation.pdb" />
|
||||
<file src="..\bin\RGB.NET.Devices.Novation.xml" target="lib\net45\RGB.NET.Devices.Novation.xml" />
|
||||
<file src="..\RGB.NET.Devices.Novation\**\*.cs" target="src" exclude="..\RGB.NET.Devices.Novation\obj\**\*.*" />
|
||||
<file src="..\RGB.NET.Devices.Novation\Images\**\*.*" target="build\net45\resources\Images\" />
|
||||
<file src="..\RGB.NET.Devices.Novation\Layouts\**\*.*" target="build\net45\resources\Layouts\" />
|
||||
</files>
|
||||
</package>
|
||||
@ -33,6 +33,11 @@
|
||||
/// <summary>
|
||||
/// Represents a LED-stipe.
|
||||
/// </summary>
|
||||
LedStripe
|
||||
LedStripe,
|
||||
|
||||
/// <summary>
|
||||
/// Represents a LED-matrix
|
||||
/// </summary>
|
||||
LedMatrix
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
using System;
|
||||
|
||||
namespace RGB.NET.Devices.Novation.Attributes
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the color-capability of a field.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Field)]
|
||||
public class ColorCapabilityAttribute : Attribute
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Id.
|
||||
/// </summary>
|
||||
public NovationColorCapabilities Capability { get; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ColorCapabilityAttribute"/> class.
|
||||
/// </summary>
|
||||
/// <param name="capability">The capability.</param>
|
||||
public ColorCapabilityAttribute(NovationColorCapabilities capability)
|
||||
{
|
||||
this.Capability = capability;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
33
RGB.NET.Devices.Novation/Attributes/DeviceIdAttribute.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using System;
|
||||
|
||||
namespace RGB.NET.Devices.Novation.Attributes
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the device-id of a field.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Field)]
|
||||
public class DeviceIdAttribute : Attribute
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Id.
|
||||
/// </summary>
|
||||
public string Id { get; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DeviceIdAttribute"/> class.
|
||||
/// </summary>
|
||||
/// <param name="id">The id.</param>
|
||||
public DeviceIdAttribute(string id)
|
||||
{
|
||||
this.Id = id;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
16
RGB.NET.Devices.Novation/Enum/NovationColorCapabilities.cs
Normal file
@ -0,0 +1,16 @@
|
||||
#pragma warning disable 1591
|
||||
// ReSharper disable InconsistentNaming
|
||||
// ReSharper disable UnusedMember.Global
|
||||
|
||||
namespace RGB.NET.Devices.Novation
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the color-capabilities of a novation device.
|
||||
/// </summary>
|
||||
public enum NovationColorCapabilities
|
||||
{
|
||||
None,
|
||||
RGB,
|
||||
LimitedRG
|
||||
}
|
||||
}
|
||||
18
RGB.NET.Devices.Novation/Enum/NovationDevices.cs
Normal file
@ -0,0 +1,18 @@
|
||||
#pragma warning disable 1591
|
||||
// ReSharper disable InconsistentNaming
|
||||
// ReSharper disable UnusedMember.Global
|
||||
|
||||
using RGB.NET.Devices.Novation.Attributes;
|
||||
|
||||
namespace RGB.NET.Devices.Novation
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a specific novation device.
|
||||
/// </summary>
|
||||
public enum NovationDevices
|
||||
{
|
||||
[DeviceId("Launchpad S")]
|
||||
[ColorCapability(NovationColorCapabilities.LimitedRG)]
|
||||
LaunchpadS
|
||||
}
|
||||
}
|
||||
107
RGB.NET.Devices.Novation/Enum/NovationLedIds.cs
Normal file
@ -0,0 +1,107 @@
|
||||
// ReSharper disable InconsistentNaming
|
||||
// ReSharper disable UnusedMember.Global
|
||||
|
||||
#pragma warning disable 1591 // Missing XML comment for publicly visible type or member
|
||||
|
||||
namespace RGB.NET.Devices.Novation
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains list of all LEDs available for all Novation devices.
|
||||
/// They are represented as Hex 0x[00][11] where [00] is the status flag, [1] the id of the led.
|
||||
/// </summary>
|
||||
//TODO DarthAffe 15.08.2017: Check if this is really correct for all devices
|
||||
public enum NovationLedIds
|
||||
{
|
||||
Invalid = -1,
|
||||
|
||||
Grid1 = 0x9000,
|
||||
Grid2 = 0x9001,
|
||||
Grid3 = 0x9002,
|
||||
Grid4 = 0x9003,
|
||||
Grid5 = 0x9004,
|
||||
Grid6 = 0x9005,
|
||||
Grid7 = 0x9006,
|
||||
Grid8 = 0x9007,
|
||||
|
||||
Grid9 = 0x9010,
|
||||
Grid10 = 0x9011,
|
||||
Grid11 = 0x9012,
|
||||
Grid12 = 0x9013,
|
||||
Grid13 = 0x9014,
|
||||
Grid14 = 0x9015,
|
||||
Grid15 = 0x9016,
|
||||
Grid16 = 0x9017,
|
||||
|
||||
Grid17 = 0x9020,
|
||||
Grid18 = 0x9021,
|
||||
Grid19 = 0x9022,
|
||||
Grid20 = 0x9023,
|
||||
Grid21 = 0x9024,
|
||||
Grid22 = 0x9025,
|
||||
Grid23 = 0x9026,
|
||||
Grid24 = 0x9027,
|
||||
|
||||
Grid25 = 0x9030,
|
||||
Grid26 = 0x9031,
|
||||
Grid27 = 0x9032,
|
||||
Grid28 = 0x9033,
|
||||
Grid29 = 0x9034,
|
||||
Grid30 = 0x9035,
|
||||
Grid31 = 0x9036,
|
||||
Grid32 = 0x9037,
|
||||
|
||||
Grid33 = 0x9040,
|
||||
Grid34 = 0x9041,
|
||||
Grid35 = 0x9042,
|
||||
Grid36 = 0x9043,
|
||||
Grid37 = 0x9044,
|
||||
Grid38 = 0x9045,
|
||||
Grid39 = 0x9046,
|
||||
Grid40 = 0x9047,
|
||||
|
||||
Grid41 = 0x9050,
|
||||
Grid42 = 0x9051,
|
||||
Grid43 = 0x9052,
|
||||
Grid44 = 0x9053,
|
||||
Grid45 = 0x9054,
|
||||
Grid46 = 0x9055,
|
||||
Grid47 = 0x9056,
|
||||
Grid48 = 0x9057,
|
||||
|
||||
Grid49 = 0x9060,
|
||||
Grid50 = 0x9061,
|
||||
Grid51 = 0x9062,
|
||||
Grid52 = 0x9063,
|
||||
Grid53 = 0x9064,
|
||||
Grid54 = 0x9065,
|
||||
Grid55 = 0x9066,
|
||||
Grid56 = 0x9067,
|
||||
|
||||
Grid57 = 0x9070,
|
||||
Grid58 = 0x9071,
|
||||
Grid59 = 0x9072,
|
||||
Grid60 = 0x9073,
|
||||
Grid61 = 0x9074,
|
||||
Grid62 = 0x9075,
|
||||
Grid63 = 0x9076,
|
||||
Grid64 = 0x9077,
|
||||
|
||||
Up = 0xB068,
|
||||
Down = 0xB069,
|
||||
Left = 0xB06A,
|
||||
Right = 0xB06B,
|
||||
Session = 0xB06C,
|
||||
User1 = 0xB06D,
|
||||
User2 = 0xB06E,
|
||||
Mix = 0xB06F,
|
||||
|
||||
Scene1 = 0x9009,
|
||||
Scene2 = 0x9019,
|
||||
Scene3 = 0x9029,
|
||||
Scene4 = 0x9039,
|
||||
Scene5 = 0x9049,
|
||||
Scene6 = 0x9059,
|
||||
Scene7 = 0x9069,
|
||||
Scene8 = 0x9079
|
||||
}
|
||||
}
|
||||
107
RGB.NET.Devices.Novation/Generic/NovationLedId.cs
Normal file
@ -0,0 +1,107 @@
|
||||
using System.Diagnostics;
|
||||
using RGB.NET.Core;
|
||||
|
||||
namespace RGB.NET.Devices.Novation
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a Id of a <see cref="Led"/> on a <see cref="NovationRGBDevice"/>.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("{" + nameof(LedId) + "}")]
|
||||
public class NovationLedId : ILedId
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
internal readonly NovationLedIds LedId;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IRGBDevice Device { get; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsValid => LedId != NovationLedIds.Invalid;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NovationLedId"/> class.
|
||||
/// </summary>
|
||||
/// <param name="device">The <see cref="IRGBDevice"/> the <see cref="ILedId"/> belongs to.</param>
|
||||
/// <param name="ledId">The <see cref="NovationLedId"/> of the represented <see cref="Led"/>.</param>
|
||||
public NovationLedId(IRGBDevice device, NovationLedIds ledId)
|
||||
{
|
||||
this.Device = device;
|
||||
this.LedId = ledId;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Converts the Id of this <see cref="NovationLedId"/> to a human-readable string.
|
||||
/// </summary>
|
||||
/// <returns>A string that contains the Id of this <see cref="NovationLedId"/>. For example "Enter".</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
return LedId.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tests whether the specified object is a <see cref="NovationLedId" /> and is equivalent to this <see cref="NovationLedId" />.
|
||||
/// </summary>
|
||||
/// <param name="obj">The object to test.</param>
|
||||
/// <returns><c>true</c> if <paramref name="obj" /> is a <see cref="NovationLedId" /> equivalent to this <see cref="NovationLedId" />; otherwise, <c>false</c>.</returns>
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
NovationLedId compareLedId = obj as NovationLedId;
|
||||
if (ReferenceEquals(compareLedId, null))
|
||||
return false;
|
||||
|
||||
if (ReferenceEquals(this, compareLedId))
|
||||
return true;
|
||||
|
||||
if (GetType() != compareLedId.GetType())
|
||||
return false;
|
||||
|
||||
return compareLedId.LedId == LedId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a hash code for this <see cref="NovationLedId" />.
|
||||
/// </summary>
|
||||
/// <returns>An integer value that specifies the hash code for this <see cref="NovationLedId" />.</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return LedId.GetHashCode();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Operators
|
||||
|
||||
/// <summary>
|
||||
/// Returns a value that indicates whether two specified <see cref="NovationLedId" /> are equal.
|
||||
/// </summary>
|
||||
/// <param name="ledId1">The first <see cref="NovationLedId" /> to compare.</param>
|
||||
/// <param name="ledId2">The second <see cref="NovationLedId" /> to compare.</param>
|
||||
/// <returns><c>true</c> if <paramref name="ledId1" /> and <paramref name="ledId2" /> are equal; otherwise, <c>false</c>.</returns>
|
||||
public static bool operator ==(NovationLedId ledId1, NovationLedId ledId2)
|
||||
{
|
||||
return ReferenceEquals(ledId1, null) ? ReferenceEquals(ledId2, null) : ledId1.Equals(ledId2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a value that indicates whether two specified <see cref="NovationLedId" /> are equal.
|
||||
/// </summary>
|
||||
/// <param name="ledId1">The first <see cref="NovationLedId" /> to compare.</param>
|
||||
/// <param name="ledId2">The second <see cref="NovationLedId" /> to compare.</param>
|
||||
/// <returns><c>true</c> if <paramref name="ledId1" /> and <paramref name="ledId2" /> are not equal; otherwise, <c>false</c>.</returns>
|
||||
public static bool operator !=(NovationLedId ledId1, NovationLedId ledId2)
|
||||
{
|
||||
return !(ledId1 == ledId2);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
203
RGB.NET.Devices.Novation/Generic/NovationRGBDevice.cs
Normal file
@ -0,0 +1,203 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using RGB.NET.Core;
|
||||
using RGB.NET.Core.Layout;
|
||||
using Sanford.Multimedia.Midi;
|
||||
|
||||
namespace RGB.NET.Devices.Novation
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a generic Novation-device. (launchpad).
|
||||
/// </summary>
|
||||
public abstract class NovationRGBDevice : AbstractRGBDevice
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
private readonly OutputDevice _outputDevice;
|
||||
private readonly NovationRGBDeviceInfo _deviceInfo;
|
||||
|
||||
/// <summary>
|
||||
/// Gets information about the <see cref="NovationRGBDevice"/>.
|
||||
/// </summary>
|
||||
public override IRGBDeviceInfo DeviceInfo => _deviceInfo;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NovationRGBDevice"/> class.
|
||||
/// </summary>
|
||||
/// <param name="info">The generic information provided by Novation for the device.</param>
|
||||
protected NovationRGBDevice(NovationRGBDeviceInfo info)
|
||||
{
|
||||
_deviceInfo = info;
|
||||
|
||||
_outputDevice = new OutputDevice(info.DeviceId);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the device.
|
||||
/// </summary>
|
||||
internal void Initialize()
|
||||
{
|
||||
InitializeLayout();
|
||||
|
||||
if (InternalSize == null)
|
||||
{
|
||||
Rectangle ledRectangle = new Rectangle(this.Select(x => x.LedRectangle));
|
||||
InternalSize = ledRectangle.Size + new Size(ledRectangle.Location.X, ledRectangle.Location.Y);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the <see cref="Led"/> and <see cref="Size"/> of the device.
|
||||
/// </summary>
|
||||
protected abstract void InitializeLayout();
|
||||
|
||||
/// <summary>
|
||||
/// Applies the given layout.
|
||||
/// </summary>
|
||||
/// <param name="layoutPath">The file containing the layout.</param>
|
||||
/// <param name="imageLayout">The name of the layout used to get the images of the leds.</param>
|
||||
/// <param name="imageBasePath">The path images for this device are collected in.</param>
|
||||
protected void ApplyLayoutFromFile(string layoutPath, string imageLayout, string imageBasePath)
|
||||
{
|
||||
DeviceLayout layout = DeviceLayout.Load(layoutPath);
|
||||
if (layout != null)
|
||||
{
|
||||
LedImageLayout ledImageLayout = layout.LedImageLayouts.FirstOrDefault(x => string.Equals(x.Layout, imageLayout, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
InternalSize = new Size(layout.Width, layout.Height);
|
||||
|
||||
if (layout.Leds != null)
|
||||
foreach (LedLayout layoutLed in layout.Leds)
|
||||
{
|
||||
NovationLedIds ledId;
|
||||
if (Enum.TryParse(layoutLed.Id, true, out ledId))
|
||||
{
|
||||
Led led;
|
||||
if (LedMapping.TryGetValue(new NovationLedId(this, ledId), out led))
|
||||
{
|
||||
led.LedRectangle.Location.X = layoutLed.X;
|
||||
led.LedRectangle.Location.Y = layoutLed.Y;
|
||||
led.LedRectangle.Size.Width = layoutLed.Width;
|
||||
led.LedRectangle.Size.Height = layoutLed.Height;
|
||||
|
||||
led.Shape = layoutLed.Shape;
|
||||
led.ShapeData = layoutLed.ShapeData;
|
||||
|
||||
LedImage image = ledImageLayout?.LedImages.FirstOrDefault(x => x.Id == layoutLed.Id);
|
||||
led.Image = (!string.IsNullOrEmpty(image?.Image))
|
||||
? new Uri(Path.Combine(imageBasePath, image.Image), UriKind.Absolute)
|
||||
: new Uri(Path.Combine(imageBasePath, "Missing.png"), UriKind.Absolute);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void UpdateLeds(IEnumerable<Led> ledsToUpdate)
|
||||
{
|
||||
List<Led> leds = ledsToUpdate.Where(x => x.Color.A > 0).ToList();
|
||||
|
||||
if (leds.Count > 0)
|
||||
{
|
||||
foreach (Led led in leds)
|
||||
{
|
||||
NovationLedId ledId = led.Id as NovationLedId;
|
||||
if (ledId == null) continue;
|
||||
|
||||
int color = ConvertColor(led.Color);
|
||||
SendMessage(ledId.LedId.GetStatus(), ledId.LedId.GetId(), color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Resets the <see cref="NovationRGBDevice"/> back top default.
|
||||
/// </summary>
|
||||
public virtual void Reset() => SendMessage(0xB0, 0, 0);
|
||||
|
||||
/// <summary>
|
||||
/// Convert a <see cref="Color"/> to its novation-representation depending on the <see cref="NovationColorCapabilities"/> of the <see cref="NovationRGBDevice"/>.
|
||||
/// </summary>
|
||||
/// <param name="color">The <see cref="Color"/> to convert.</param>
|
||||
/// <returns>The novation-representation of the <see cref="Color"/>.</returns>
|
||||
protected virtual int ConvertColor(Color color)
|
||||
{
|
||||
switch (_deviceInfo.ColorCapabilities)
|
||||
{
|
||||
case NovationColorCapabilities.RGB:
|
||||
return ConvertColorFull(color);
|
||||
case NovationColorCapabilities.LimitedRG:
|
||||
return ConvertColorLimited(color);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert a <see cref="Color"/> to its novation-representation depending on the <see cref="NovationColorCapabilities"/> of the <see cref="NovationRGBDevice"/>.
|
||||
/// The conversion uses the full rgb-range.
|
||||
/// </summary>
|
||||
/// <param name="color">The <see cref="Color"/> to convert.</param>
|
||||
/// <returns>The novation-representation of the <see cref="Color"/>.</returns>
|
||||
protected virtual int ConvertColorFull(Color color)
|
||||
{
|
||||
//TODO DarthAffe 16.08.2017: How are colors for full rgb devices encoded?
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert a <see cref="Color"/> to its novation-representation depending on the <see cref="NovationColorCapabilities"/> of the <see cref="NovationRGBDevice"/>.
|
||||
/// The conversion uses only a limited amount of colors (3 red, 3 yellow, 3 green).
|
||||
/// </summary>
|
||||
/// <param name="color">The <see cref="Color"/> to convert.</param>
|
||||
/// <returns>The novation-representation of the <see cref="Color"/>.</returns>
|
||||
protected virtual int ConvertColorLimited(Color color)
|
||||
{
|
||||
if ((color.Hue >= 330) || (color.Hue < 30))
|
||||
return (int)Math.Ceiling(color.Value * 3); // red with brightness 1, 2 or 3
|
||||
|
||||
if ((color.Hue >= 30) && (color.Hue < 90)) // yellow with brightness 17, 34 or 51
|
||||
return (int)Math.Ceiling(color.Value * 3) * 17;
|
||||
|
||||
if ((color.Hue >= 90) && (color.Hue < 150)) // green with brightness 16, 32 or 48
|
||||
return (int)Math.Ceiling(color.Value * 3) * 16;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a message to the <see cref="NovationRGBDevice"/>.
|
||||
/// </summary>
|
||||
/// <param name="status">The status-code of the message.</param>
|
||||
/// <param name="data1">The first data-package of the message.</param>
|
||||
/// <param name="data2">The second data-package of the message.</param>
|
||||
protected virtual void SendMessage(int status, int data1, int data2)
|
||||
{
|
||||
ShortMessage shortMessage = new ShortMessage(Convert.ToByte(status), Convert.ToByte(data1), Convert.ToByte(data2));
|
||||
_outputDevice.SendShort(shortMessage.Message);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void Dispose()
|
||||
{
|
||||
Reset();
|
||||
_outputDevice.Dispose();
|
||||
|
||||
base.Dispose();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
59
RGB.NET.Devices.Novation/Generic/NovationRGBDeviceInfo.cs
Normal file
@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using RGB.NET.Core;
|
||||
|
||||
namespace RGB.NET.Devices.Novation
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a generic information for a Corsair-<see cref="IRGBDevice"/>.
|
||||
/// </summary>
|
||||
public class NovationRGBDeviceInfo : IRGBDeviceInfo
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
/// <inheritdoc />
|
||||
public RGBDeviceType DeviceType { get; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Manufacturer => "Novation";
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Model { get; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public Uri Image { get; protected set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public RGBDeviceLighting Lighting => RGBDeviceLighting.Key;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="NovationColorCapabilities"/> of the <see cref="IRGBDevice"/>.
|
||||
/// </summary>
|
||||
public NovationColorCapabilities ColorCapabilities { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the (midi)-id of the <see cref="IRGBDevice"/>..
|
||||
/// </summary>
|
||||
public int DeviceId { get; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Internal constructor of managed <see cref="NovationRGBDeviceInfo"/>.
|
||||
/// </summary>
|
||||
/// <param name="deviceType">The type of the <see cref="IRGBDevice"/>.</param>
|
||||
/// <param name="model">The represented device model.</param>
|
||||
/// <param name="deviceId">The (midi)-id of the <see cref="IRGBDevice"/>.</param>
|
||||
/// <param name="colorCapabilities">The <see cref="NovationColorCapabilities"/> of the <see cref="IRGBDevice"/>.</param>
|
||||
internal NovationRGBDeviceInfo(RGBDeviceType deviceType, string model, int deviceId, NovationColorCapabilities colorCapabilities)
|
||||
{
|
||||
this.DeviceType = deviceType;
|
||||
this.Model = model;
|
||||
this.DeviceId = deviceId;
|
||||
this.ColorCapabilities = colorCapabilities;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
40
RGB.NET.Devices.Novation/Helper/EnumExtension.cs
Normal file
@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using RGB.NET.Devices.Novation.Attributes;
|
||||
|
||||
namespace RGB.NET.Devices.Novation
|
||||
{
|
||||
/// <summary>
|
||||
/// Offers some extensions and helper-methods for enum related things.
|
||||
/// </summary>
|
||||
internal static class EnumExtension
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the value of the <see cref="DeviceIdAttribute"/>.
|
||||
/// </summary>
|
||||
/// <param name="source">The enum value to get the description from.</param>
|
||||
/// <returns>The value of the <see cref="DeviceIdAttribute"/> of the source.</returns>
|
||||
internal static string GetDeviceId(this Enum source) => source.GetAttribute<DeviceIdAttribute>()?.Id;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the value of the <see cref="ColorCapabilityAttribute"/>.
|
||||
/// </summary>
|
||||
/// <param name="source">The enum value to get the description from.</param>
|
||||
/// <returns>The value of the <see cref="ColorCapabilityAttribute"/> of the source.</returns>
|
||||
internal static NovationColorCapabilities GetColorCapability(this Enum source) => source.GetAttribute<ColorCapabilityAttribute>()?.Capability ?? NovationColorCapabilities.None;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the attribute of type T.
|
||||
/// </summary>
|
||||
/// <param name="source">The enum value to get the attribute from</param>
|
||||
/// <typeparam name="T">The generic attribute type</typeparam>
|
||||
/// <returns>The <see cref="Attribute"/>.</returns>
|
||||
private static T GetAttribute<T>(this Enum source)
|
||||
where T : Attribute
|
||||
{
|
||||
FieldInfo fi = source.GetType().GetField(source.ToString());
|
||||
T[] attributes = (T[])fi.GetCustomAttributes(typeof(T), false);
|
||||
return attributes.Length > 0 ? attributes[0] : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
47
RGB.NET.Devices.Novation/Helper/NovationLedIdsExtension.cs
Normal file
@ -0,0 +1,47 @@
|
||||
namespace RGB.NET.Devices.Novation
|
||||
{
|
||||
/// <summary>
|
||||
/// Offers some extensions and helper-methods for NovationLedIds related things.
|
||||
/// </summary>
|
||||
public static class NovationLedIdsExtension
|
||||
{
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Gets the status-flag associated with the id.
|
||||
/// </summary>
|
||||
/// <param name="ledId">The <see cref="NovationLedIds"/> whose status-flag should be determinated.</param>
|
||||
/// <returns>The status-flag of the <see cref="NovationLedIds"/>.</returns>
|
||||
public static int GetStatus(this NovationLedIds ledId) => ((int)ledId & 0xFF00) >> 8;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the id associated with the id.
|
||||
/// </summary>
|
||||
/// <param name="ledId">The <see cref="NovationLedIds"/> whose idshould be determinated.</param>
|
||||
/// <returns>The id of the <see cref="NovationLedIds"/>.</returns>
|
||||
public static int GetId(this NovationLedIds ledId) => (int)ledId & 0x00FF;
|
||||
|
||||
/// <summary>
|
||||
/// Tests if the given <see cref="NovationLedIds"/> is a grid-button.
|
||||
/// </summary>
|
||||
/// <param name="ledId">the <see cref="NovationLedIds"/> to test.</param>
|
||||
/// <returns><c>true</c> if <paramref name="ledId" /> is a grid-button; otherwise, <c>false</c>.</returns>
|
||||
public static bool IsGrid(this NovationLedIds ledId) => (ledId.GetStatus() == 0x90) && ((ledId.GetId() / 0x10) < 0x08) && ((ledId.GetId() % 0x10) < 0x08);
|
||||
|
||||
/// <summary>
|
||||
/// Tests if the given <see cref="NovationLedIds"/> is a scene-button.
|
||||
/// </summary>
|
||||
/// <param name="ledId">the <see cref="NovationLedIds"/> to test.</param>
|
||||
/// <returns><c>true</c> if <paramref name="ledId" /> is a scene-button; otherwise, <c>false</c>.</returns>
|
||||
public static bool IsScene(this NovationLedIds ledId) => (ledId.GetStatus() == 0x90) && ((ledId.GetId() / 0x10) < 0x08) && ((ledId.GetId() % 0x10) == 0x09);
|
||||
|
||||
/// <summary>
|
||||
/// Tests if the given <see cref="NovationLedIds"/> is custom-button.
|
||||
/// </summary>
|
||||
/// <param name="ledId">the <see cref="NovationLedIds"/> to test.</param>
|
||||
/// <returns><c>true</c> if <paramref name="ledId" /> is a custom-button; otherwise, <c>false</c>.</returns>
|
||||
public static bool IsCustom(this NovationLedIds ledId) => (ledId.GetStatus() == 0xB0) && ((ledId.GetId() / 0x10) == 0x06) && ((ledId.GetId() % 0x10) > 0x07);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 327 KiB |
@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using RGB.NET.Core;
|
||||
|
||||
namespace RGB.NET.Devices.Novation
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a Novation launchpad.
|
||||
/// </summary>
|
||||
public class NovationLaunchpadRGBDevice : NovationRGBDevice
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
/// <summary>
|
||||
/// Gets information about the <see cref="NovationLaunchpadRGBDevice"/>.
|
||||
/// </summary>
|
||||
public NovationLaunchpadRGBDeviceInfo LaunchpadDeviceInfo { get; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NovationLaunchpadRGBDevice"/> class.
|
||||
/// </summary>
|
||||
/// <param name="info">The specific information provided by Novation for the launchpad</param>
|
||||
internal NovationLaunchpadRGBDevice(NovationLaunchpadRGBDeviceInfo info)
|
||||
: base(info)
|
||||
{
|
||||
this.LaunchpadDeviceInfo = info;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void InitializeLayout()
|
||||
{
|
||||
//TODO DarthAffe 15.08.2017: Check if all launchpads are using the same basic layout
|
||||
const int BUTTON_SIZE = 20;
|
||||
foreach (NovationLedIds ledId in Enum.GetValues(typeof(NovationLedIds)))
|
||||
{
|
||||
Rectangle rectangle;
|
||||
if (ledId.IsCustom())
|
||||
rectangle = new Rectangle(BUTTON_SIZE * (ledId.GetId() - 0x68), 0, BUTTON_SIZE, BUTTON_SIZE);
|
||||
else if (ledId.IsScene())
|
||||
rectangle = new Rectangle(8 * BUTTON_SIZE, BUTTON_SIZE * (((int)ledId.GetId() / 0x10) + 1), BUTTON_SIZE, BUTTON_SIZE);
|
||||
else if (ledId.IsGrid())
|
||||
rectangle = new Rectangle(BUTTON_SIZE * ((int)ledId.GetId() % 0x10), BUTTON_SIZE * (((int)ledId.GetId() / 0x10) + 1), BUTTON_SIZE, BUTTON_SIZE);
|
||||
else continue;
|
||||
|
||||
InitializeLed(new NovationLedId(this, ledId), rectangle);
|
||||
}
|
||||
|
||||
string model = LaunchpadDeviceInfo.Model.Replace(" ", string.Empty).ToUpper();
|
||||
ApplyLayoutFromFile(PathHelper.GetAbsolutePath(
|
||||
$@"Layouts\Novation\Launchpads\{model.ToUpper()}.xml"), "Default", PathHelper.GetAbsolutePath(@"Images\Novation\Launchpads"));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using RGB.NET.Core;
|
||||
|
||||
namespace RGB.NET.Devices.Novation
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a generic information for a <see cref="NovationLaunchpadRGBDevice"/>.
|
||||
/// </summary>
|
||||
public class NovationLaunchpadRGBDeviceInfo : NovationRGBDeviceInfo
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Internal constructor of managed <see cref="NovationLaunchpadRGBDeviceInfo"/>.
|
||||
/// </summary>
|
||||
/// <param name="model">The represented device model.</param>
|
||||
/// <param name="deviceId"></param>
|
||||
/// <param name="colorCapabilities">The <see cref="NovationColorCapabilities"/> of the <see cref="IRGBDevice"/>.</param>
|
||||
internal NovationLaunchpadRGBDeviceInfo(string model, int deviceId, NovationColorCapabilities colorCapabilities)
|
||||
: base(RGBDeviceType.LedMatrix, model, deviceId, colorCapabilities)
|
||||
{
|
||||
Image = new Uri(PathHelper.GetAbsolutePath($@"Images\Novation\Launchpads\{Model.Replace(" ", string.Empty).ToUpper()}.png"), UriKind.Absolute);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
63
RGB.NET.Devices.Novation/Layouts/DeviceLayout.xsd
Normal file
@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified">
|
||||
<xsd:element name="Device">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Name" type="xsd:string" />
|
||||
<xsd:element name="Description" type="xsd:string" />
|
||||
<xsd:element name="Type" type="xsd:string" />
|
||||
<xsd:element name="Lighting" type="xsd:string" />
|
||||
<xsd:element name="Vendor" type="xsd:string" />
|
||||
<xsd:element name="Model" type="xsd:string" />
|
||||
<xsd:element name="Shape" type="xsd:string" />
|
||||
<xsd:element name="Width" type="xsd:double" />
|
||||
<xsd:element name="Height" type="xsd:double" />
|
||||
<xsd:element name="LedUnitWidth" type="xsd:double" />
|
||||
<xsd:element name="LedUnitHeight" type="xsd:double" />
|
||||
<xsd:element name="Leds">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element maxOccurs="unbounded" name="Led">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Shape" type="xsd:string" />
|
||||
<xsd:element name="X" type="xsd:string" />
|
||||
<xsd:element name="Y" type="xsd:string" />
|
||||
<xsd:element name="Width" type="xsd:string" />
|
||||
<xsd:element name="Height" type="xsd:string" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Id" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="LedImageLayouts">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element maxOccurs="unbounded" name="LedImageLayout">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="LedImages">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element maxOccurs="unbounded" name="LedImage">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="Id" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="Image" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="Layout" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xs:schema>
|
||||
@ -0,0 +1,425 @@
|
||||
<?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>
|
||||
<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>
|
||||
<Leds>
|
||||
<!-- Custom-buttons -->
|
||||
<Led Id="Up">
|
||||
<Shape>Circle</Shape>
|
||||
<X>16</X>
|
||||
<Y>18</Y>
|
||||
<Width>16mm</Width>
|
||||
<Height>16mm</Height>
|
||||
</Led>
|
||||
<Led Id="Down">
|
||||
<Shape>Circle</Shape>
|
||||
<X>+8</X>
|
||||
<Width>16mm</Width>
|
||||
<Height>16mm</Height>
|
||||
</Led>
|
||||
<Led Id="Left">
|
||||
<Shape>Circle</Shape>
|
||||
<X>+8</X>
|
||||
<Width>16mm</Width>
|
||||
<Height>16mm</Height>
|
||||
</Led>
|
||||
<Led Id="Right">
|
||||
<Shape>Circle</Shape>
|
||||
<X>+8</X>
|
||||
<Width>16mm</Width>
|
||||
<Height>16mm</Height>
|
||||
</Led>
|
||||
<Led Id="Session">
|
||||
<Shape>Circle</Shape>
|
||||
<X>+8</X>
|
||||
<Width>16mm</Width>
|
||||
<Height>16mm</Height>
|
||||
</Led>
|
||||
<Led Id="User1">
|
||||
<Shape>Circle</Shape>
|
||||
<X>+8</X>
|
||||
<Width>16mm</Width>
|
||||
<Height>16mm</Height>
|
||||
</Led>
|
||||
<Led Id="User2">
|
||||
<Shape>Circle</Shape>
|
||||
<X>+8</X>
|
||||
<Width>16mm</Width>
|
||||
<Height>16mm</Height>
|
||||
</Led>
|
||||
<Led Id="Mix">
|
||||
<Shape>Circle</Shape>
|
||||
<X>+8</X>
|
||||
<Width>16mm</Width>
|
||||
<Height>16mm</Height>
|
||||
</Led>
|
||||
|
||||
<!-- Grid -->
|
||||
<Led Id="Grid1">
|
||||
<X>14</X>
|
||||
<Y>+4</Y>
|
||||
</Led>
|
||||
<Led Id="Grid2">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid3">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid4">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid5">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid6">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid7">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid8">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
|
||||
<Led Id="Grid9">
|
||||
<X>14</X>
|
||||
<Y>+4</Y>
|
||||
</Led>
|
||||
<Led Id="Grid10">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid11">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid12">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid13">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid14">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid15">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid16">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
|
||||
<Led Id="Grid17">
|
||||
<X>14</X>
|
||||
<Y>+4</Y>
|
||||
</Led>
|
||||
<Led Id="Grid18">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid19">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid20">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid21">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid22">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid23">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid24">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
|
||||
<Led Id="Grid25">
|
||||
<X>14</X>
|
||||
<Y>+4</Y>
|
||||
</Led>
|
||||
<Led Id="Grid26">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid27">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid28">
|
||||
<X>+4</X>
|
||||
<Shape>M0,0 L0,1 L0.75,1 L1,0.75 L1,0 Z</Shape>
|
||||
</Led>
|
||||
<Led Id="Grid29">
|
||||
<X>+4</X>
|
||||
<Shape>M0,0 L0,0.75 L0.25,1 L1,1 L1,0 Z</Shape>
|
||||
</Led>
|
||||
<Led Id="Grid30">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid31">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid32">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
|
||||
<Led Id="Grid33">
|
||||
<X>14</X>
|
||||
<Y>+4</Y>
|
||||
</Led>
|
||||
<Led Id="Grid34">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid35">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid36">
|
||||
<X>+4</X>
|
||||
<Shape>M0,0 L0,1 L1,1 L1,0.25 L0.75,0 Z</Shape>
|
||||
</Led>
|
||||
<Led Id="Grid37">
|
||||
<X>+4</X>
|
||||
<Shape>M0,0.25 L0,1 L1,1 L1,0 L0.25,0 Z</Shape>
|
||||
</Led>
|
||||
<Led Id="Grid38">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid39">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid40">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
|
||||
<Led Id="Grid41">
|
||||
<X>14</X>
|
||||
<Y>+4</Y>
|
||||
</Led>
|
||||
<Led Id="Grid42">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid43">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid44">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid45">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid46">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid47">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid48">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
|
||||
<Led Id="Grid49">
|
||||
<X>14</X>
|
||||
<Y>+4</Y>
|
||||
</Led>
|
||||
<Led Id="Grid50">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid51">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid52">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid53">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid54">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid55">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid56">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
|
||||
<Led Id="Grid57">
|
||||
<X>14</X>
|
||||
<Y>+4</Y>
|
||||
</Led>
|
||||
<Led Id="Grid58">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid59">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid60">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid61">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid62">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid63">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
<Led Id="Grid64">
|
||||
<X>+4</X>
|
||||
</Led>
|
||||
|
||||
<!-- Scene-buttons -->
|
||||
<Led Id="Scene1">
|
||||
<Shape>Circle</Shape>
|
||||
<X>+4</X>
|
||||
<Y>40</Y>
|
||||
<Width>16mm</Width>
|
||||
<Height>16mm</Height>
|
||||
</Led>
|
||||
<Led Id="Scene2">
|
||||
<Shape>Circle</Shape>
|
||||
<X>~</X>
|
||||
<Y>+8</Y>
|
||||
<Width>16mm</Width>
|
||||
<Height>16mm</Height>
|
||||
</Led>
|
||||
<Led Id="Scene3">
|
||||
<Shape>Circle</Shape>
|
||||
<X>~</X>
|
||||
<Y>+8</Y>
|
||||
<Width>16mm</Width>
|
||||
<Height>16mm</Height>
|
||||
</Led>
|
||||
<Led Id="Scene4">
|
||||
<Shape>Circle</Shape>
|
||||
<X>~</X>
|
||||
<Y>+8</Y>
|
||||
<Width>16mm</Width>
|
||||
<Height>16mm</Height>
|
||||
</Led>
|
||||
<Led Id="Scene5">
|
||||
<Shape>Circle</Shape>
|
||||
<X>~</X>
|
||||
<Y>+8</Y>
|
||||
<Width>16mm</Width>
|
||||
<Height>16mm</Height>
|
||||
</Led>
|
||||
<Led Id="Scene6">
|
||||
<Shape>Circle</Shape>
|
||||
<X>~</X>
|
||||
<Y>+8</Y>
|
||||
<Width>16mm</Width>
|
||||
<Height>16mm</Height>
|
||||
</Led>
|
||||
<Led Id="Scene7">
|
||||
<Shape>Circle</Shape>
|
||||
<X>~</X>
|
||||
<Y>+8</Y>
|
||||
<Width>16mm</Width>
|
||||
<Height>16mm</Height>
|
||||
</Led>
|
||||
<Led Id="Scene8">
|
||||
<Shape>Circle</Shape>
|
||||
<X>~</X>
|
||||
<Y>+8</Y>
|
||||
<Width>16mm</Width>
|
||||
<Height>16mm</Height>
|
||||
</Led>
|
||||
</Leds>
|
||||
|
||||
<LedImageLayouts>
|
||||
<LedImageLayout Layout="Default">
|
||||
<LedImages>
|
||||
<LedImage Id="Up" Image="Buttons\Round.png" />
|
||||
<LedImage Id="Down" Image="Buttons\Round.png" />
|
||||
<LedImage Id="Left" Image="Buttons\Round.png" />
|
||||
<LedImage Id="Right" Image="Buttons\Round.png" />
|
||||
<LedImage Id="Session" Image="Buttons\Round.png" />
|
||||
<LedImage Id="User1" Image="Buttons\Round.png" />
|
||||
<LedImage Id="User2" Image="Buttons\Round.png" />
|
||||
<LedImage Id="Mix" Image="Buttons\Round.png" />
|
||||
|
||||
<LedImage Id="Scene1" Image="Buttons\Round.png" />
|
||||
<LedImage Id="Scene2" Image="Buttons\Round.png" />
|
||||
<LedImage Id="Scene3" Image="Buttons\Round.png" />
|
||||
<LedImage Id="Scene4" Image="Buttons\Round.png" />
|
||||
<LedImage Id="Scene5" Image="Buttons\Round.png" />
|
||||
<LedImage Id="Scene6" Image="Buttons\Round.png" />
|
||||
<LedImage Id="Scene7" Image="Buttons\Round.png" />
|
||||
<LedImage Id="Scene8" Image="Buttons\Round.png" />
|
||||
|
||||
<LedImage Id="Grid1" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid2" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid3" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid4" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid5" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid6" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid7" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid8" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid9" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid10" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid11" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid12" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid13" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid14" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid15" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid16" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid17" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid18" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid19" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid20" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid21" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid22" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid23" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid24" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid25" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid26" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid27" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid28" Image="Buttons\GridCenter1.png" />
|
||||
<LedImage Id="Grid29" Image="Buttons\GridCenter2.png" />
|
||||
<LedImage Id="Grid30" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid31" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid32" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid33" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid34" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid35" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid36" Image="Buttons\GridCenter3.png" />
|
||||
<LedImage Id="Grid37" Image="Buttons\GridCenter4.png" />
|
||||
<LedImage Id="Grid38" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid39" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid40" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid41" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid42" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid43" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid44" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid45" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid46" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid47" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid48" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid49" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid50" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid51" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid52" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid53" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid54" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid55" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid56" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid57" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid58" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid59" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid60" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid61" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid62" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid63" Image="Buttons\Grid.png" />
|
||||
<LedImage Id="Grid64" Image="Buttons\Grid.png" />
|
||||
</LedImages>
|
||||
</LedImageLayout>
|
||||
</LedImageLayouts>
|
||||
</Device>
|
||||
116
RGB.NET.Devices.Novation/NovationDeviceProvider.cs
Normal file
@ -0,0 +1,116 @@
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
// ReSharper disable UnusedMember.Global
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using RGB.NET.Core;
|
||||
using Sanford.Multimedia.Midi;
|
||||
|
||||
namespace RGB.NET.Devices.Novation
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a device provider responsible for Novation devices.
|
||||
/// </summary>
|
||||
public class NovationDeviceProvider : IRGBDeviceProvider
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
private static NovationDeviceProvider _instance;
|
||||
/// <summary>
|
||||
/// Gets the singleton <see cref="NovationDeviceProvider"/> instance.
|
||||
/// </summary>
|
||||
public static NovationDeviceProvider Instance => _instance ?? new NovationDeviceProvider();
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if the SDK is initialized and ready to use.
|
||||
/// </summary>
|
||||
public bool IsInitialized { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether the application has exclusive access to the SDK or not.
|
||||
/// </summary>
|
||||
public bool HasExclusiveAccess => false;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<IRGBDevice> Devices { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="NovationDeviceProvider"/> class.
|
||||
/// </summary>
|
||||
/// <exception cref="InvalidOperationException">Thrown if this constructor is called even if there is already an instance of this class.</exception>
|
||||
private NovationDeviceProvider()
|
||||
{
|
||||
if (_instance != null) throw new InvalidOperationException($"There can be only one instanc of type {nameof(NovationDeviceProvider)}");
|
||||
_instance = this;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool Initialize(bool exclusiveAccessIfPossible = false, bool throwExceptions = false)
|
||||
{
|
||||
IsInitialized = false;
|
||||
|
||||
try
|
||||
{
|
||||
IList<IRGBDevice> devices = new List<IRGBDevice>();
|
||||
|
||||
try
|
||||
{
|
||||
for (int index = 0; index < OutputDeviceBase.DeviceCount; index++)
|
||||
{
|
||||
MidiOutCaps outCaps = OutputDeviceBase.GetDeviceCapabilities(index);
|
||||
if (outCaps.name == null) continue;
|
||||
|
||||
NovationDevices? deviceId = (NovationDevices?)Enum.GetValues(typeof(NovationDevices)).Cast<Enum>()
|
||||
.FirstOrDefault(x => string.Equals(x.GetDeviceId(), outCaps.name, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
if (deviceId == null) continue;
|
||||
|
||||
NovationRGBDevice device = new NovationLaunchpadRGBDevice(new NovationLaunchpadRGBDeviceInfo(outCaps.name, index, deviceId.GetColorCapability()));
|
||||
device.Initialize();
|
||||
devices.Add(device);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
if (throwExceptions)
|
||||
throw;
|
||||
}
|
||||
|
||||
Devices = new ReadOnlyCollection<IRGBDevice>(devices);
|
||||
}
|
||||
catch
|
||||
{
|
||||
if (throwExceptions)
|
||||
throw;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
IsInitialized = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void ResetDevices()
|
||||
{
|
||||
foreach (IRGBDevice device in Devices)
|
||||
{
|
||||
NovationLaunchpadRGBDevice novationDevice = device as NovationLaunchpadRGBDevice;
|
||||
novationDevice?.Reset();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
35
RGB.NET.Devices.Novation/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("RGB.NET.Devices.Novation")]
|
||||
[assembly: AssemblyDescription("Novation-Device-Implementations of RGB.NET")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Wyrez")]
|
||||
[assembly: AssemblyProduct("RGB.NET.Devices.Novation")]
|
||||
[assembly: AssemblyCopyright("Copyright © Wyrez 2017")]
|
||||
[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("dda8c4c2-8abf-4fa0-9af9-c47ad0bfe47d")]
|
||||
|
||||
// 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")]
|
||||
91
RGB.NET.Devices.Novation/RGB.NET.Devices.Novation.csproj
Normal file
@ -0,0 +1,91 @@
|
||||
<?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>{DB2911F6-404C-4BC8-B35F-232A7450755F}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>RGB.NET.Devices.Novation</RootNamespace>
|
||||
<AssemblyName>RGB.NET.Devices.Novation</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DocumentationFile>..\bin\RGB.NET.Devices.Novation.XML</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DocumentationFile>..\bin\RGB.NET.Devices.Novation.XML</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Sanford.Multimedia.Midi, Version=6.4.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Sanford.Multimedia.Midi.6.4.1\lib\net20\Sanford.Multimedia.Midi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.4.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<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="Attributes\ColorCapabilityAttribute.cs" />
|
||||
<Compile Include="Attributes\DeviceIdAttribute.cs" />
|
||||
<Compile Include="Enum\NovationColorCapabilities.cs" />
|
||||
<Compile Include="Enum\NovationDevices.cs" />
|
||||
<Compile Include="Enum\NovationLedIds.cs" />
|
||||
<Compile Include="Generic\NovationLedId.cs" />
|
||||
<Compile Include="Generic\NovationRGBDevice.cs" />
|
||||
<Compile Include="Generic\NovationRGBDeviceInfo.cs" />
|
||||
<Compile Include="Helper\EnumExtension.cs" />
|
||||
<Compile Include="Helper\NovationLedIdsExtension.cs" />
|
||||
<Compile Include="Launchpad\NovationLaunchpadRGBDevice.cs" />
|
||||
<Compile Include="Launchpad\NovationLaunchpadRGBDeviceInfo.cs" />
|
||||
<Compile Include="NovationDeviceProvider.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\RGB.NET.Core\RGB.NET.Core.csproj">
|
||||
<Project>{5a4f9a75-75fe-47cd-90e5-914d5b20d232}</Project>
|
||||
<Name>RGB.NET.Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Layouts\DeviceLayout.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Images\Novation\Launchpads\Buttons\Grid.png" />
|
||||
<Content Include="Images\Novation\Launchpads\Buttons\GridCenter1.png" />
|
||||
<Content Include="Images\Novation\Launchpads\Buttons\GridCenter2.png" />
|
||||
<Content Include="Images\Novation\Launchpads\Buttons\GridCenter3.png" />
|
||||
<Content Include="Images\Novation\Launchpads\Buttons\GridCenter4.png" />
|
||||
<Content Include="Images\Novation\Launchpads\Buttons\Round.png" />
|
||||
<Content Include="Images\Novation\Launchpads\LaunchpadS.png" />
|
||||
<Content Include="Layouts\Novation\Launchpads\LaunchpadS.xml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@ -0,0 +1,5 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=enum/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=generic/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=helper/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=launchpad/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||
5
RGB.NET.Devices.Novation/packages.config
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Sanford.Multimedia.Midi" version="6.4.1" targetFramework="net45" />
|
||||
<package id="System.ValueTuple" version="4.4.0" targetFramework="net45" />
|
||||
</packages>
|
||||
@ -32,6 +32,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{06416566
|
||||
NuGet\RGB.NET.Devices.CoolerMaster.nuspec = NuGet\RGB.NET.Devices.CoolerMaster.nuspec
|
||||
NuGet\RGB.NET.Devices.Corsair.nuspec = NuGet\RGB.NET.Devices.Corsair.nuspec
|
||||
NuGet\RGB.NET.Devices.Logitech.nuspec = NuGet\RGB.NET.Devices.Logitech.nuspec
|
||||
NuGet\RGB.NET.Devices.Novation.nuspec = NuGet\RGB.NET.Devices.Novation.nuspec
|
||||
NuGet\RGB.NET.Effects.nuspec = NuGet\RGB.NET.Effects.nuspec
|
||||
NuGet\RGB.NET.Groups.nuspec = NuGet\RGB.NET.Groups.nuspec
|
||||
NuGet\RGB.NET.Input.Corsair.nuspec = NuGet\RGB.NET.Input.Corsair.nuspec
|
||||
@ -47,6 +48,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RGB.NET.Devices.Logitech",
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RGB.NET.Devices.CoolerMaster", "RGB.NET.Devices.CoolerMaster\RGB.NET.Devices.CoolerMaster.csproj", "{85609427-D433-44E2-A249-CE890B66D845}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RGB.NET.Devices.Novation", "RGB.NET.Devices.Novation\RGB.NET.Devices.Novation.csproj", "{DB2911F6-404C-4BC8-B35F-232A7450755F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -93,6 +96,10 @@ Global
|
||||
{85609427-D433-44E2-A249-CE890B66D845}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{85609427-D433-44E2-A249-CE890B66D845}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{85609427-D433-44E2-A249-CE890B66D845}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DB2911F6-404C-4BC8-B35F-232A7450755F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DB2911F6-404C-4BC8-B35F-232A7450755F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DB2911F6-404C-4BC8-B35F-232A7450755F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DB2911F6-404C-4BC8-B35F-232A7450755F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@ -107,5 +114,6 @@ Global
|
||||
{8D6C4FE6-0046-4E98-876F-4C0B87249989} = {BD7C9994-1747-4595-9C21-298E8FDCB657}
|
||||
{E7B2F174-FCC6-4FC7-9970-3138B5F4C921} = {33D5E279-1C4E-4AB6-9D1E-6D18109A6C25}
|
||||
{85609427-D433-44E2-A249-CE890B66D845} = {33D5E279-1C4E-4AB6-9D1E-6D18109A6C25}
|
||||
{DB2911F6-404C-4BC8-B35F-232A7450755F} = {33D5E279-1C4E-4AB6-9D1E-6D18109A6C25}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||