Fixed some code issues

This commit is contained in:
DarthAffe committed 2017-09-05 14:02:12 +02:00
1 parent 2086b3729d
commit 8e212190ae
76 files changed
+375 -241

No files matched your search

@@ -2,6 +2,7 @@
namespace RGB.NET.Devices.Novation.Attributes
{
/// <inheritdoc />
/// <summary>
/// Specifies the color-capability of a field.
/// </summary>
@@ -19,8 +20,9 @@ namespace RGB.NET.Devices.Novation.Attributes
#region Constructors
/// <inheritdoc />
/// <summary>
/// Initializes a new instance of the <see cref="ColorCapabilityAttribute"/> class.
/// Initializes a new instance of the <see cref="T:RGB.NET.Devices.Novation.Attributes.ColorCapabilityAttribute" /> class.
/// </summary>
/// <param name="capability">The capability.</param>
public ColorCapabilityAttribute(NovationColorCapabilities capability)
@@ -2,6 +2,7 @@
namespace RGB.NET.Devices.Novation.Attributes
{
/// <inheritdoc />
/// <summary>
/// Specifies the device-id of a field.
/// </summary>
@@ -19,8 +20,9 @@ namespace RGB.NET.Devices.Novation.Attributes
#region Constructors
/// <inheritdoc />
/// <summary>
/// Initializes a new instance of the <see cref="DeviceIdAttribute"/> class.
/// Initializes a new instance of the <see cref="T:RGB.NET.Devices.Novation.Attributes.DeviceIdAttribute" /> class.
/// </summary>
/// <param name="id">The id.</param>
public DeviceIdAttribute(string id)
@@ -3,8 +3,9 @@ using RGB.NET.Core;
namespace RGB.NET.Devices.Novation
{
/// <inheritdoc />
/// <summary>
/// Represents a Id of a <see cref="Led"/> on a <see cref="NovationRGBDevice"/>.
/// Represents a Id of a <see cref="T:RGB.NET.Core.Led" /> on a <see cref="T:RGB.NET.Devices.Novation.NovationRGBDevice" />.
/// </summary>
[DebuggerDisplay("{" + nameof(LedId) + "}")]
public class NovationLedId : ILedId
@@ -8,6 +8,7 @@ using Sanford.Multimedia.Midi;
namespace RGB.NET.Devices.Novation
{
/// <inheritdoc />
/// <summary>
/// Represents a generic Novation-device. (launchpad).
/// </summary>
@@ -18,8 +19,9 @@ namespace RGB.NET.Devices.Novation
private readonly OutputDevice _outputDevice;
private readonly NovationRGBDeviceInfo _deviceInfo;
/// <inheritdoc />
/// <summary>
/// Gets information about the <see cref="NovationRGBDevice"/>.
/// Gets information about the <see cref="T:RGB.NET.Devices.Novation.NovationRGBDevice" />.
/// </summary>
public override IRGBDeviceInfo DeviceInfo => _deviceInfo;
@@ -80,11 +82,9 @@ namespace RGB.NET.Devices.Novation
if (layout.Leds != null)
foreach (LedLayout layoutLed in layout.Leds)
{
NovationLedIds ledId;
if (Enum.TryParse(layoutLed.Id, true, out ledId))
if (Enum.TryParse(layoutLed.Id, true, out NovationLedIds ledId))
{
Led led;
if (LedMapping.TryGetValue(new NovationLedId(this, ledId), out led))
if (LedMapping.TryGetValue(new NovationLedId(this, ledId), out Led led))
{
led.LedRectangle.Location.X = layoutLed.X;
led.LedRectangle.Location.Y = layoutLed.Y;
@@ -3,8 +3,9 @@ using RGB.NET.Core;
namespace RGB.NET.Devices.Novation
{
/// <inheritdoc />
/// <summary>
/// Represents a generic information for a Corsair-<see cref="IRGBDevice"/>.
/// Represents a generic information for a Corsair-<see cref="T:RGB.NET.Core.IRGBDevice" />.
/// </summary>
public class NovationRGBDeviceInfo : IRGBDeviceInfo
{
@@ -3,6 +3,7 @@ using RGB.NET.Core;
namespace RGB.NET.Devices.Novation
{
/// <inheritdoc />
/// <summary>
/// Represents a Novation launchpad.
/// </summary>
@@ -19,8 +20,9 @@ namespace RGB.NET.Devices.Novation
#region Constructors
/// <inheritdoc />
/// <summary>
/// Initializes a new instance of the <see cref="NovationLaunchpadRGBDevice"/> class.
/// Initializes a new instance of the <see cref="T:RGB.NET.Devices.Novation.NovationLaunchpadRGBDevice" /> class.
/// </summary>
/// <param name="info">The specific information provided by Novation for the launchpad</param>
internal NovationLaunchpadRGBDevice(NovationLaunchpadRGBDeviceInfo info)
@@ -3,19 +3,21 @@ using RGB.NET.Core;
namespace RGB.NET.Devices.Novation
{
/// <inheritdoc />
/// <summary>
/// Represents a generic information for a <see cref="NovationLaunchpadRGBDevice"/>.
/// Represents a generic information for a <see cref="T:RGB.NET.Devices.Novation.NovationLaunchpadRGBDevice" />.
/// </summary>
public class NovationLaunchpadRGBDeviceInfo : NovationRGBDeviceInfo
{
#region Constructors
/// <inheritdoc />
/// <summary>
/// Internal constructor of managed <see cref="NovationLaunchpadRGBDeviceInfo"/>.
/// Internal constructor of managed <see cref="T:RGB.NET.Devices.Novation.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>
/// <param name="colorCapabilities">The <see cref="T:RGB.NET.Devices.Novation.NovationColorCapabilities" /> of the <see cref="T:RGB.NET.Core.IRGBDevice" />.</param>
internal NovationLaunchpadRGBDeviceInfo(string model, int deviceId, NovationColorCapabilities colorCapabilities)
: base(RGBDeviceType.LedMatrix, model, deviceId, colorCapabilities)
{
@@ -10,6 +10,7 @@ using Sanford.Multimedia.Midi;
namespace RGB.NET.Devices.Novation
{
/// <inheritdoc />
/// <summary>
/// Represents a device provider responsible for Novation devices.
/// </summary>
@@ -23,11 +24,13 @@ namespace RGB.NET.Devices.Novation
/// </summary>
public static NovationDeviceProvider Instance => _instance ?? new NovationDeviceProvider();
/// <inheritdoc />
/// <summary>
/// Indicates if the SDK is initialized and ready to use.
/// </summary>
public bool IsInitialized { get; private set; }
/// <inheritdoc />
/// <summary>
/// Gets whether the application has exclusive access to the SDK or not.
/// </summary>