1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2025-12-12 17:48:31 +00:00

Fixed some code issues

This commit is contained in:
Darth Affe 2017-09-05 14:02:12 +02:00
parent 2086b3729d
commit 8e212190ae
76 changed files with 375 additions and 241 deletions

View File

@ -10,6 +10,7 @@ using RGB.NET.Core;
namespace RGB.NET.Brushes namespace RGB.NET.Brushes
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a brush drawing a conical gradient. /// Represents a brush drawing a conical gradient.
/// </summary> /// </summary>
@ -27,6 +28,7 @@ namespace RGB.NET.Brushes
/// </summary> /// </summary>
public Point Center { get; set; } = new Point(0.5, 0.5); public Point Center { get; set; } = new Point(0.5, 0.5);
/// <inheritdoc />
/// <summary> /// <summary>
/// Gets or sets the gradient drawn by the brush. If null it will default to full transparent. /// Gets or sets the gradient drawn by the brush. If null it will default to full transparent.
/// </summary> /// </summary>
@ -36,38 +38,42 @@ namespace RGB.NET.Brushes
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ConicalGradientBrush"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.ConicalGradientBrush" /> class.
/// </summary> /// </summary>
public ConicalGradientBrush() public ConicalGradientBrush()
{ } { }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ConicalGradientBrush"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.ConicalGradientBrush" /> class.
/// </summary> /// </summary>
/// <param name="gradient">The <see cref="IGradient"/> drawn by this <see cref="ConicalGradientBrush"/>.</param> /// <param name="gradient">The <see cref="T:RGB.NET.Brushes.Gradients.IGradient" /> drawn by this <see cref="T:RGB.NET.Brushes.ConicalGradientBrush" />.</param>
public ConicalGradientBrush(IGradient gradient) public ConicalGradientBrush(IGradient gradient)
{ {
this.Gradient = gradient; this.Gradient = gradient;
} }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ConicalGradientBrush"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.ConicalGradientBrush" /> class.
/// </summary> /// </summary>
/// <param name="center">The center <see cref="Point"/> (as percentage in the range [0..1]).</param> /// <param name="center">The center <see cref="T:RGB.NET.Core.Point" /> (as percentage in the range [0..1]).</param>
/// <param name="gradient">The <see cref="IGradient"/> drawn by this <see cref="ConicalGradientBrush"/>.</param> /// <param name="gradient">The <see cref="T:RGB.NET.Brushes.Gradients.IGradient" /> drawn by this <see cref="T:RGB.NET.Brushes.ConicalGradientBrush" />.</param>
public ConicalGradientBrush(Point center, IGradient gradient) public ConicalGradientBrush(Point center, IGradient gradient)
{ {
this.Center = center; this.Center = center;
this.Gradient = gradient; this.Gradient = gradient;
} }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ConicalGradientBrush"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.ConicalGradientBrush" /> class.
/// </summary> /// </summary>
/// <param name="center">The center <see cref="Point"/> (as percentage in the range [0..1]).</param> /// <param name="center">The center <see cref="T:RGB.NET.Core.Point" /> (as percentage in the range [0..1]).</param>
/// <param name="origin">The origin (radian-angle) the <see cref="IBrush"/> is drawn to.</param> /// <param name="origin">The origin (radian-angle) the <see cref="T:RGB.NET.Core.IBrush" /> is drawn to.</param>
/// <param name="gradient">The <see cref="IGradient"/> drawn by this <see cref="ConicalGradientBrush"/>.</param> /// <param name="gradient">The <see cref="T:RGB.NET.Brushes.Gradients.IGradient" /> drawn by this <see cref="T:RGB.NET.Brushes.ConicalGradientBrush" />.</param>
public ConicalGradientBrush(Point center, float origin, IGradient gradient) public ConicalGradientBrush(Point center, float origin, IGradient gradient)
{ {
this.Center = center; this.Center = center;

View File

@ -3,6 +3,7 @@ using RGB.NET.Core;
namespace RGB.NET.Brushes namespace RGB.NET.Brushes
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a basic gradient-brush. /// Represents a basic gradient-brush.
/// </summary> /// </summary>

View File

@ -11,6 +11,7 @@ using RGB.NET.Core;
namespace RGB.NET.Brushes namespace RGB.NET.Brushes
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a brush drawing a linear gradient. /// Represents a brush drawing a linear gradient.
/// </summary> /// </summary>
@ -35,26 +36,29 @@ namespace RGB.NET.Brushes
#region Constructor #region Constructor
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="LinearGradientBrush"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.LinearGradientBrush" /> class.
/// </summary> /// </summary>
public LinearGradientBrush() public LinearGradientBrush()
{ } { }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="LinearGradientBrush"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.LinearGradientBrush" /> class.
/// </summary> /// </summary>
/// <param name="gradient">The <see cref="IGradient"/> drawn by this <see cref="LinearGradientBrush"/>.</param> /// <param name="gradient">The <see cref="T:RGB.NET.Brushes.Gradients.IGradient" /> drawn by this <see cref="T:RGB.NET.Brushes.LinearGradientBrush" />.</param>
public LinearGradientBrush(IGradient gradient) public LinearGradientBrush(IGradient gradient)
{ {
this.Gradient = gradient; this.Gradient = gradient;
} }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="LinearGradientBrush"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.LinearGradientBrush" /> class.
/// </summary> /// </summary>
/// <param name="startPoint">The start <see cref="Point"/> (as percentage in the range [0..1]).</param> /// <param name="startPoint">The start <see cref="T:RGB.NET.Core.Point" /> (as percentage in the range [0..1]).</param>
/// <param name="endPoint">The end <see cref="Point"/> (as percentage in the range [0..1]).</param> /// <param name="endPoint">The end <see cref="T:RGB.NET.Core.Point" /> (as percentage in the range [0..1]).</param>
/// <param name="gradient">The <see cref="IGradient"/> drawn by this <see cref="LinearGradientBrush"/>.</param> /// <param name="gradient">The <see cref="T:RGB.NET.Brushes.Gradients.IGradient" /> drawn by this <see cref="T:RGB.NET.Brushes.LinearGradientBrush" />.</param>
public LinearGradientBrush(Point startPoint, Point endPoint, IGradient gradient) public LinearGradientBrush(Point startPoint, Point endPoint, IGradient gradient)
{ {
this.StartPoint = startPoint; this.StartPoint = startPoint;
@ -66,6 +70,7 @@ namespace RGB.NET.Brushes
#region Methods #region Methods
/// <inheritdoc />
/// <summary> /// <summary>
/// Gets the color at an specific point assuming the brush is drawn into the given rectangle. /// Gets the color at an specific point assuming the brush is drawn into the given rectangle.
/// </summary> /// </summary>

View File

@ -9,6 +9,7 @@ using RGB.NET.Core;
namespace RGB.NET.Brushes namespace RGB.NET.Brushes
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a brush drawing a radial gradient around a center point. /// Represents a brush drawing a radial gradient around a center point.
/// </summary> /// </summary>
@ -28,14 +29,16 @@ namespace RGB.NET.Brushes
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="RadialGradientBrush"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.RadialGradientBrush" /> class.
/// </summary> /// </summary>
public RadialGradientBrush() public RadialGradientBrush()
{ } { }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="RadialGradientBrush"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.RadialGradientBrush" /> class.
/// </summary> /// </summary>
/// <param name="gradient">The gradient drawn by the brush.</param> /// <param name="gradient">The gradient drawn by the brush.</param>
public RadialGradientBrush(IGradient gradient) public RadialGradientBrush(IGradient gradient)
@ -43,8 +46,9 @@ namespace RGB.NET.Brushes
this.Gradient = gradient; this.Gradient = gradient;
} }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="RadialGradientBrush"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.RadialGradientBrush" /> class.
/// </summary> /// </summary>
/// <param name="center">The center point (as percentage in the range [0..1]).</param> /// <param name="center">The center point (as percentage in the range [0..1]).</param>
/// <param name="gradient">The gradient drawn by the brush.</param> /// <param name="gradient">The gradient drawn by the brush.</param>

View File

@ -5,6 +5,7 @@ using RGB.NET.Core;
namespace RGB.NET.Brushes namespace RGB.NET.Brushes
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a brush drawing only a single color. /// Represents a brush drawing only a single color.
/// </summary> /// </summary>
@ -21,10 +22,11 @@ namespace RGB.NET.Brushes
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="SolidColorBrush"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.SolidColorBrush" /> class.
/// </summary> /// </summary>
/// <param name="color">The <see cref="Color"/> drawn by this <see cref="SolidColorBrush"/>.</param> /// <param name="color">The <see cref="P:RGB.NET.Brushes.SolidColorBrush.Color" /> drawn by this <see cref="T:RGB.NET.Brushes.SolidColorBrush" />.</param>
public SolidColorBrush(Color color) public SolidColorBrush(Color color)
{ {
this.Color = color; this.Color = color;

View File

@ -1,10 +1,10 @@
using RGB.NET.Brushes.Gradients; using RGB.NET.Core;
using RGB.NET.Core;
namespace RGB.NET.Brushes namespace RGB.NET.Brushes
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a basic decorator decorating a <see cref="IGradient"/>. /// Represents a basic decorator decorating a <see cref="T:RGB.NET.Brushes.Gradients.IGradient" />.
/// </summary> /// </summary>
public interface IGradientDecorator : IDecorator public interface IGradientDecorator : IDecorator
{ } { }

View File

@ -8,6 +8,7 @@ using RGB.NET.Core;
namespace RGB.NET.Brushes.Gradients namespace RGB.NET.Brushes.Gradients
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a basic gradient. /// Represents a basic gradient.
/// </summary> /// </summary>

View File

@ -2,6 +2,7 @@
namespace RGB.NET.Brushes.Gradients namespace RGB.NET.Brushes.Gradients
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a basic gradient. /// Represents a basic gradient.
/// </summary> /// </summary>

View File

@ -6,6 +6,7 @@ using RGB.NET.Core;
namespace RGB.NET.Brushes.Gradients namespace RGB.NET.Brushes.Gradients
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a linear interpolated gradient with n stops. /// Represents a linear interpolated gradient with n stops.
/// </summary> /// </summary>
@ -13,24 +14,27 @@ namespace RGB.NET.Brushes.Gradients
{ {
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="LinearGradient"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.Gradients.LinearGradient" /> class.
/// </summary> /// </summary>
public LinearGradient() public LinearGradient()
{ } { }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="LinearGradient"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.Gradients.LinearGradient" /> class.
/// </summary> /// </summary>
/// <param name="gradientStops">The stops with which the gradient should be initialized.</param> /// <param name="gradientStops">The stops with which the gradient should be initialized.</param>
public LinearGradient(params GradientStop[] gradientStops) public LinearGradient(params GradientStop[] gradientStops)
: base(gradientStops) : base(gradientStops)
{ } { }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="AbstractGradient"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Brushes.Gradients.AbstractGradient" /> class.
/// </summary> /// </summary>
/// <param name="wrapGradient">Specifies whether the gradient should wrapp or not (see <see cref="AbstractGradient.WrapGradient"/> for an example of what this means).</param> /// <param name="wrapGradient">Specifies whether the gradient should wrapp or not (see <see cref="P:RGB.NET.Brushes.Gradients.AbstractGradient.WrapGradient" /> for an example of what this means).</param>
/// <param name="gradientStops">The stops with which the gradient should be initialized.</param> /// <param name="gradientStops">The stops with which the gradient should be initialized.</param>
public LinearGradient(bool wrapGradient, params GradientStop[] gradientStops) public LinearGradient(bool wrapGradient, params GradientStop[] gradientStops)
: base(wrapGradient, gradientStops) : base(wrapGradient, gradientStops)
@ -40,11 +44,12 @@ namespace RGB.NET.Brushes.Gradients
#region Methods #region Methods
/// <inheritdoc />
/// <summary> /// <summary>
/// Gets the linear interpolated <see cref="Color"/> at the given offset. /// Gets the linear interpolated <see cref="T:RGB.NET.Core.Color" /> at the given offset.
/// </summary> /// </summary>
/// <param name="offset">The percentage offset to take the color from.</param> /// <param name="offset">The percentage offset to take the color from.</param>
/// <returns>The <see cref="Color"/> at the specific offset.</returns> /// <returns>The <see cref="T:RGB.NET.Core.Color" /> at the specific offset.</returns>
public override Color GetColor(double offset) public override Color GetColor(double offset)
{ {
if (GradientStops.Count == 0) return Color.Transparent; if (GradientStops.Count == 0) return Color.Transparent;

View File

@ -5,6 +5,7 @@ using RGB.NET.Core;
namespace RGB.NET.Brushes.Gradients namespace RGB.NET.Brushes.Gradients
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a rainbow gradient which circles through all colors of the HUE-color-space.<br /> /// Represents a rainbow gradient which circles through all colors of the HUE-color-space.<br />
/// See <see href="http://upload.wikimedia.org/wikipedia/commons/a/ad/HueScale.svg" /> as reference. /// See <see href="http://upload.wikimedia.org/wikipedia/commons/a/ad/HueScale.svg" /> as reference.
@ -42,6 +43,7 @@ namespace RGB.NET.Brushes.Gradients
#region Methods #region Methods
/// <inheritdoc />
/// <summary> /// <summary>
/// Gets the color on the rainbow at the given offset. /// Gets the color on the rainbow at the given offset.
/// </summary> /// </summary>

View File

@ -2,12 +2,12 @@
// ReSharper disable MemberCanBePrivate.Global // ReSharper disable MemberCanBePrivate.Global
// ReSharper disable VirtualMemberNeverOverridden.Global // ReSharper disable VirtualMemberNeverOverridden.Global
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
namespace RGB.NET.Core namespace RGB.NET.Core
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a basic brush. /// Represents a basic brush.
/// </summary> /// </summary>

View File

@ -1,7 +1,8 @@
namespace RGB.NET.Core namespace RGB.NET.Core
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a basic decorator which is aware of the <see cref="RGBSurface.Updating"/> event. /// Represents a basic decorator which is aware of the <see cref="E:RGB.NET.Core.RGBSurface.Updating" /> event.
/// </summary> /// </summary>
public abstract class AbstractUpdateAwareDecorator : AbstractDecorator public abstract class AbstractUpdateAwareDecorator : AbstractDecorator
{ {
@ -20,7 +21,7 @@
/// Initializes a new instance of the <see cref="AbstractUpdateAwareDecorator"/> class. /// Initializes a new instance of the <see cref="AbstractUpdateAwareDecorator"/> class.
/// </summary> /// </summary>
/// <param name="updateIfDisabled">Bool indicating if the <see cref="AbstractUpdateAwareDecorator"/> should call <see cref="Update"/> even if the Decorator is disabled.</param> /// <param name="updateIfDisabled">Bool indicating if the <see cref="AbstractUpdateAwareDecorator"/> should call <see cref="Update"/> even if the Decorator is disabled.</param>
public AbstractUpdateAwareDecorator(bool updateIfDisabled = false) protected AbstractUpdateAwareDecorator(bool updateIfDisabled = false)
{ {
this.UpdateIfDisabled = updateIfDisabled; this.UpdateIfDisabled = updateIfDisabled;
} }

View File

@ -1,7 +1,8 @@
namespace RGB.NET.Core namespace RGB.NET.Core
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a basic decorator decorating a <see cref="ILedGroup"/>. /// Represents a basic decorator decorating a <see cref="T:RGB.NET.Core.ILedGroup" />.
/// </summary> /// </summary>
public interface ILedGroupDecorator : IDecorator public interface ILedGroupDecorator : IDecorator
{ } { }

View File

@ -8,6 +8,7 @@ using System.Linq;
namespace RGB.NET.Core namespace RGB.NET.Core
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a generic RGB-device /// Represents a generic RGB-device
/// </summary> /// </summary>
@ -57,14 +58,7 @@ namespace RGB.NET.Core
#region Indexer #region Indexer
/// <inheritdoc /> /// <inheritdoc />
Led IRGBDevice.this[ILedId ledId] Led IRGBDevice.this[ILedId ledId] => LedMapping.TryGetValue(ledId, out Led led) ? led : null;
{
get
{
Led led;
return LedMapping.TryGetValue(ledId, out led) ? led : null;
}
}
/// <inheritdoc /> /// <inheritdoc />
Led IRGBDevice.this[Point location] => LedMapping.Values.FirstOrDefault(x => x.LedRectangle.Contains(location)); Led IRGBDevice.this[Point location] => LedMapping.Values.FirstOrDefault(x => x.LedRectangle.Contains(location));
@ -138,19 +132,21 @@ namespace RGB.NET.Core
#region Enumerator #region Enumerator
/// <inheritdoc />
/// <summary> /// <summary>
/// Returns an enumerator that iterates over all <see cref="Led"/> of the <see cref="IRGBDevice"/>. /// Returns an enumerator that iterates over all <see cref="T:RGB.NET.Core.Led" /> of the <see cref="T:RGB.NET.Core.IRGBDevice" />.
/// </summary> /// </summary>
/// <returns>An enumerator for all <see cref="Led"/> of the <see cref="IRGBDevice"/>.</returns> /// <returns>An enumerator for all <see cref="T:RGB.NET.Core.Led" /> of the <see cref="T:RGB.NET.Core.IRGBDevice" />.</returns>
public IEnumerator<Led> GetEnumerator() public IEnumerator<Led> GetEnumerator()
{ {
return LedMapping.Values.GetEnumerator(); return LedMapping.Values.GetEnumerator();
} }
/// <inheritdoc />
/// <summary> /// <summary>
/// Returns an enumerator that iterates over all <see cref="Led"/> of the <see cref="IRGBDevice"/>. /// Returns an enumerator that iterates over all <see cref="T:RGB.NET.Core.Led" /> of the <see cref="T:RGB.NET.Core.IRGBDevice" />.
/// </summary> /// </summary>
/// <returns>An enumerator for all <see cref="Led"/> of the <see cref="IRGBDevice"/>.</returns> /// <returns>An enumerator for all <see cref="T:RGB.NET.Core.Led" /> of the <see cref="T:RGB.NET.Core.IRGBDevice" />.</returns>
IEnumerator IEnumerable.GetEnumerator() IEnumerator IEnumerable.GetEnumerator()
{ {
return GetEnumerator(); return GetEnumerator();

View File

@ -3,6 +3,7 @@ using System.Collections.Generic;
namespace RGB.NET.Core namespace RGB.NET.Core
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a generic RGB-device /// Represents a generic RGB-device
/// </summary> /// </summary>

View File

@ -2,8 +2,9 @@
namespace RGB.NET.Core namespace RGB.NET.Core
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a special part of a <see cref="IRGBDevice"/>. /// Represents a special part of a <see cref="T:RGB.NET.Core.IRGBDevice" />.
/// </summary> /// </summary>
public interface IRGBDeviceSpecialPart : IEnumerable<Led> public interface IRGBDeviceSpecialPart : IEnumerable<Led>
{ } { }

View File

@ -107,8 +107,7 @@ namespace RGB.NET.Core.Layout
/// <param name="lastLed">The <see cref="LedLayout"/> previously calculated.</param> /// <param name="lastLed">The <see cref="LedLayout"/> previously calculated.</param>
public void CalculateValues(DeviceLayout device, LedLayout lastLed) public void CalculateValues(DeviceLayout device, LedLayout lastLed)
{ {
Shape shape; if (!Enum.TryParse(DescriptiveShape, true, out Shape shape))
if (!Enum.TryParse(DescriptiveShape, true, out shape))
{ {
shape = Shape.Custom; shape = Shape.Custom;
ShapeData = DescriptiveShape; ShapeData = DescriptiveShape;

View File

@ -5,8 +5,9 @@ using System;
namespace RGB.NET.Core namespace RGB.NET.Core
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents the information supplied with an <see cref="RGBSurface.Exception"/>-event. /// Represents the information supplied with an <see cref="E:RGB.NET.Core.RGBSurface.Exception" />-event.
/// </summary> /// </summary>
public class ExceptionEventArgs : EventArgs public class ExceptionEventArgs : EventArgs
{ {
@ -21,10 +22,11 @@ namespace RGB.NET.Core
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ExceptionEventArgs"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Core.ExceptionEventArgs" /> class.
/// </summary> /// </summary>
/// <param name="exception">The <see cref="System.Exception"/> which is responsible for the event-call.</param> /// <param name="exception">The <see cref="T:System.Exception" /> which is responsible for the event-call.</param>
public ExceptionEventArgs(Exception exception) public ExceptionEventArgs(Exception exception)
{ {
this.Exception = exception; this.Exception = exception;

View File

@ -6,8 +6,9 @@ using System.Collections.Generic;
namespace RGB.NET.Core namespace RGB.NET.Core
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents the information supplied with an <see cref="RGBSurface.SurfaceLayoutChanged"/>-event. /// Represents the information supplied with an <see cref="E:RGB.NET.Core.RGBSurface.SurfaceLayoutChanged" />-event.
/// </summary> /// </summary>
public class SurfaceLayoutChangedEventArgs : EventArgs public class SurfaceLayoutChangedEventArgs : EventArgs
{ {
@ -32,12 +33,13 @@ namespace RGB.NET.Core
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="SurfaceLayoutChangedEventArgs"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Core.SurfaceLayoutChangedEventArgs" /> class.
/// </summary> /// </summary>
/// <param name="devices">The <see cref="IRGBDevice"/> that caused the change.</param> /// <param name="devices">The <see cref="T:RGB.NET.Core.IRGBDevice" /> that caused the change.</param>
/// <param name="deviceAdded">A value indicating if the event is caused by the addition of a new <see cref="IRGBDevice"/> to the <see cref="RGBSurface"/>.</param> /// <param name="deviceAdded">A value indicating if the event is caused by the addition of a new <see cref="T:RGB.NET.Core.IRGBDevice" /> to the <see cref="T:RGB.NET.Core.RGBSurface" />.</param>
/// <param name="deviceLocationChanged">A value indicating if the event is caused by a changed location of one of the devices on the <see cref="RGBSurface"/>.</param> /// <param name="deviceLocationChanged">A value indicating if the event is caused by a changed location of one of the devices on the <see cref="T:RGB.NET.Core.RGBSurface" />.</param>
public SurfaceLayoutChangedEventArgs(IEnumerable<IRGBDevice> devices, bool deviceAdded, bool deviceLocationChanged) public SurfaceLayoutChangedEventArgs(IEnumerable<IRGBDevice> devices, bool deviceAdded, bool deviceLocationChanged)
{ {
this.Devices = devices; this.Devices = devices;

View File

@ -2,8 +2,9 @@
namespace RGB.NET.Core namespace RGB.NET.Core
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents the information supplied with an <see cref="RGBSurface.Updated"/>-event. /// Represents the information supplied with an <see cref="E:RGB.NET.Core.RGBSurface.Updated" />-event.
/// </summary> /// </summary>
public class UpdatedEventArgs : EventArgs public class UpdatedEventArgs : EventArgs
{ } { }

View File

@ -5,8 +5,9 @@ using System;
namespace RGB.NET.Core namespace RGB.NET.Core
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents the information supplied with an <see cref="RGBSurface.Updating"/>-event. /// Represents the information supplied with an <see cref="E:RGB.NET.Core.RGBSurface.Updating" />-event.
/// </summary> /// </summary>
public class UpdatingEventArgs : EventArgs public class UpdatingEventArgs : EventArgs
{ {
@ -21,8 +22,9 @@ namespace RGB.NET.Core
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="UpdatingEventArgs"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Core.UpdatingEventArgs" /> class.
/// </summary> /// </summary>
/// <param name="deltaTime">The elapsed time (in seconds) since the last update.</param> /// <param name="deltaTime">The elapsed time (in seconds) since the last update.</param>
public UpdatingEventArgs(double deltaTime) public UpdatingEventArgs(double deltaTime)

View File

@ -2,15 +2,17 @@
namespace RGB.NET.Core.Exceptions namespace RGB.NET.Core.Exceptions
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents an exception thrown by an <see cref="IRGBDevice"/>. /// Represents an exception thrown by an <see cref="T:RGB.NET.Core.IRGBDevice" />.
/// </summary> /// </summary>
public class RGBDeviceException : ApplicationException public class RGBDeviceException : ApplicationException
{ {
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="RGBDeviceException"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Core.Exceptions.RGBDeviceException" /> class.
/// </summary> /// </summary>
/// <param name="message">The message which describes the reason of throwing this exception.</param> /// <param name="message">The message which describes the reason of throwing this exception.</param>
/// <param name="innerException">Optional inner exception, which lead to this exception.</param> /// <param name="innerException">Optional inner exception, which lead to this exception.</param>

View File

@ -2,8 +2,9 @@
namespace RGB.NET.Core namespace RGB.NET.Core
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a generic <see cref="AbstractLedGroup"/>. /// Represents a generic <see cref="T:RGB.NET.Core.AbstractLedGroup" />.
/// </summary> /// </summary>
public abstract class AbstractLedGroup : AbstractDecoratable<ILedGroupDecorator>, ILedGroup public abstract class AbstractLedGroup : AbstractDecoratable<ILedGroupDecorator>, ILedGroup
{ {

View File

@ -5,6 +5,7 @@ using System.Collections.Generic;
namespace RGB.NET.Core namespace RGB.NET.Core
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a generic ledgroup. /// Represents a generic ledgroup.
/// </summary> /// </summary>

View File

@ -6,6 +6,7 @@ using System.Diagnostics;
namespace RGB.NET.Core namespace RGB.NET.Core
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents an ARGB (alpha, red, green, blue) color. /// Represents an ARGB (alpha, red, green, blue) color.
/// </summary> /// </summary>
@ -184,21 +185,23 @@ namespace RGB.NET.Core
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Color"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Core.Color" /> class.
/// The class created by this constructor equals <see cref="Transparent"/>. /// The class created by this constructor equals <see cref="P:RGB.NET.Core.Color.Transparent" />.
/// </summary> /// </summary>
public Color() public Color()
: this(0, 0, 0, 0) : this(0, 0, 0, 0)
{ } { }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Color"/> class using only RGB-Values. /// Initializes a new instance of the <see cref="T:RGB.NET.Core.Color" /> class using only RGB-Values.
/// Alpha defaults to 255. /// Alpha defaults to 255.
/// </summary> /// </summary>
/// <param name="r">The red component value of this <see cref="Color"/>.</param> /// <param name="r">The red component value of this <see cref="T:RGB.NET.Core.Color" />.</param>
/// <param name="g">The green component value of this <see cref="Color"/>.</param> /// <param name="g">The green component value of this <see cref="T:RGB.NET.Core.Color" />.</param>
/// <param name="b">The blue component value of this <see cref="Color"/>.</param> /// <param name="b">The blue component value of this <see cref="T:RGB.NET.Core.Color" />.</param>
public Color(byte r, byte g, byte b) public Color(byte r, byte g, byte b)
: this(255, r, g, b) : this(255, r, g, b)
{ } { }
@ -218,13 +221,14 @@ namespace RGB.NET.Core
this.B = b; this.B = b;
} }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Color"/> class using only RGB-Values. /// Initializes a new instance of the <see cref="T:RGB.NET.Core.Color" /> class using only RGB-Values.
/// Alpha defaults to 255. /// Alpha defaults to 255.
/// </summary> /// </summary>
/// <param name="hue">The hue component value of this <see cref="Color"/>.</param> /// <param name="hue">The hue component value of this <see cref="T:RGB.NET.Core.Color" />.</param>
/// <param name="saturation">The saturation component value of this <see cref="Color"/>.</param> /// <param name="saturation">The saturation component value of this <see cref="T:RGB.NET.Core.Color" />.</param>
/// <param name="value">The value component value of this <see cref="Color"/>.</param> /// <param name="value">The value component value of this <see cref="T:RGB.NET.Core.Color" />.</param>
public Color(double hue, double saturation, double value) public Color(double hue, double saturation, double value)
: this(255, hue, saturation, value) : this(255, hue, saturation, value)
{ } { }
@ -254,10 +258,11 @@ namespace RGB.NET.Core
UpdateRGBFromHSV(); UpdateRGBFromHSV();
} }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Color"/> class by cloning a existing <see cref="Color"/>. /// Initializes a new instance of the <see cref="T:RGB.NET.Core.Color" /> class by cloning a existing <see cref="T:RGB.NET.Core.Color" />.
/// </summary> /// </summary>
/// <param name="color">The <see cref="Color"/> the values are copied from.</param> /// <param name="color">The <see cref="T:RGB.NET.Core.Color" /> the values are copied from.</param>
public Color(Color color) public Color(Color color)
: this(color.A, color.R, color.G, color.B) : this(color.A, color.R, color.G, color.B)
{ } { }

View File

@ -5,6 +5,7 @@ using System.Diagnostics;
namespace RGB.NET.Core namespace RGB.NET.Core
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a single LED of a RGB-device. /// Represents a single LED of a RGB-device.
/// </summary> /// </summary>

View File

@ -3,6 +3,7 @@ using System.Runtime.CompilerServices;
namespace RGB.NET.Core namespace RGB.NET.Core
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a basic bindable class which notifies when a property value changes. /// Represents a basic bindable class which notifies when a property value changes.
/// </summary> /// </summary>

View File

@ -5,6 +5,7 @@ using System.Diagnostics;
namespace RGB.NET.Core namespace RGB.NET.Core
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a point consisting of a X- and a Y-position. /// Represents a point consisting of a X- and a Y-position.
/// </summary> /// </summary>

View File

@ -9,6 +9,7 @@ using System.Linq;
namespace RGB.NET.Core namespace RGB.NET.Core
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a rectangle defined by it's position and it's size. /// Represents a rectangle defined by it's position and it's size.
/// </summary> /// </summary>
@ -77,6 +78,7 @@ namespace RGB.NET.Core
#endregion #endregion
#region Events #region Events
// ReSharper disable EventNeverSubscribedTo.Global
/// <summary> /// <summary>
/// Occurs when a the <see cref="Location"/> of the <see cref="Rectangle"/> changes. /// Occurs when a the <see cref="Location"/> of the <see cref="Rectangle"/> changes.
@ -93,24 +95,27 @@ namespace RGB.NET.Core
/// </summary> /// </summary>
public event EventHandler Changed; public event EventHandler Changed;
// ReSharper restore EventNeverSubscribedTo.Global
#endregion #endregion
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Rectangle"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Core.Rectangle" /> class.
/// </summary> /// </summary>
public Rectangle() public Rectangle()
: this(new Point(), new Size()) : this(new Point(), new Size())
{ } { }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Rectangle"/> class using the provided values for <see cref="Location"/> ans <see cref="Size"/>. /// Initializes a new instance of the <see cref="T:RGB.NET.Core.Rectangle" /> class using the provided values for <see cref="P:RGB.NET.Core.Rectangle.Location" /> ans <see cref="P:RGB.NET.Core.Rectangle.Size" />.
/// </summary> /// </summary>
/// <param name="x">The <see cref="Point.X"/>-position of this <see cref="Rectangle"/>.</param> /// <param name="x">The <see cref="P:RGB.NET.Core.Point.X" />-position of this <see cref="T:RGB.NET.Core.Rectangle" />.</param>
/// <param name="y">The <see cref="Point.Y"/>-position of this <see cref="Rectangle"/>.</param> /// <param name="y">The <see cref="P:RGB.NET.Core.Point.Y" />-position of this <see cref="T:RGB.NET.Core.Rectangle" />.</param>
/// <param name="width">The <see cref="Core.Size.Width"/> of this <see cref="Rectangle"/>.</param> /// <param name="width">The <see cref="P:RGB.NET.Core.Size.Width" /> of this <see cref="T:RGB.NET.Core.Rectangle" />.</param>
/// <param name="height">The <see cref="Core.Size.Height"/> of this <see cref="Rectangle"/>.</param> /// <param name="height">The <see cref="P:RGB.NET.Core.Size.Height" /> of this <see cref="T:RGB.NET.Core.Rectangle" />.</param>
public Rectangle(double x, double y, double width, double height) public Rectangle(double x, double y, double width, double height)
: this(new Point(x, y), new Size(width, height)) : this(new Point(x, y), new Size(width, height))
{ } { }
@ -126,11 +131,12 @@ namespace RGB.NET.Core
this.Size = size; this.Size = size;
} }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Rectangle"/> class using the given array of <see cref="Rectangle"/>. /// Initializes a new instance of the <see cref="T:RGB.NET.Core.Rectangle" /> class using the given array of <see cref="T:RGB.NET.Core.Rectangle" />.
/// The <see cref="Location"/> and <see cref="Size"/> is calculated to completely contain all rectangles provided as parameters. /// The <see cref="P:RGB.NET.Core.Rectangle.Location" /> and <see cref="P:RGB.NET.Core.Rectangle.Size" /> is calculated to completely contain all rectangles provided as parameters.
/// </summary> /// </summary>
/// <param name="rectangles">The array of <see cref="Rectangle"/> used to calculate the <see cref="Location"/> and <see cref="Size"/></param> /// <param name="rectangles">The array of <see cref="T:RGB.NET.Core.Rectangle" /> used to calculate the <see cref="P:RGB.NET.Core.Rectangle.Location" /> and <see cref="P:RGB.NET.Core.Rectangle.Size" /></param>
public Rectangle(params Rectangle[] rectangles) public Rectangle(params Rectangle[] rectangles)
: this(rectangles.AsEnumerable()) : this(rectangles.AsEnumerable())
{ } { }
@ -164,20 +170,22 @@ namespace RGB.NET.Core
InitializeFromPoints(new Point(0, 0), new Point(0, 0)); InitializeFromPoints(new Point(0, 0), new Point(0, 0));
} }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Rectangle"/> class using the given array of <see cref="Point"/>. /// Initializes a new instance of the <see cref="T:RGB.NET.Core.Rectangle" /> class using the given array of <see cref="T:RGB.NET.Core.Point" />.
/// The <see cref="Location"/> and <see cref="Size"/> is calculated to contain all points provided as parameters. /// The <see cref="P:RGB.NET.Core.Rectangle.Location" /> and <see cref="P:RGB.NET.Core.Rectangle.Size" /> is calculated to contain all points provided as parameters.
/// </summary> /// </summary>
/// <param name="points">The array of <see cref="Point"/> used to calculate the <see cref="Location"/> and <see cref="Size"/></param> /// <param name="points">The array of <see cref="T:RGB.NET.Core.Point" /> used to calculate the <see cref="P:RGB.NET.Core.Rectangle.Location" /> and <see cref="P:RGB.NET.Core.Rectangle.Size" /></param>
public Rectangle(params Point[] points) public Rectangle(params Point[] points)
: this(points.AsEnumerable()) : this(points.AsEnumerable())
{ } { }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Rectangle"/> class using the given list of <see cref="Point"/>. /// Initializes a new instance of the <see cref="T:RGB.NET.Core.Rectangle" /> class using the given list of <see cref="T:RGB.NET.Core.Point" />.
/// The <see cref="Location"/> and <see cref="Size"/> is calculated to contain all points provided as parameters. /// The <see cref="P:RGB.NET.Core.Rectangle.Location" /> and <see cref="P:RGB.NET.Core.Rectangle.Size" /> is calculated to contain all points provided as parameters.
/// </summary> /// </summary>
/// <param name="points">The list of <see cref="Point"/> used to calculate the <see cref="Location"/> and <see cref="Size"/></param> /// <param name="points">The list of <see cref="T:RGB.NET.Core.Point" /> used to calculate the <see cref="P:RGB.NET.Core.Rectangle.Location" /> and <see cref="P:RGB.NET.Core.Rectangle.Size" /></param>
public Rectangle(IEnumerable<Point> points) public Rectangle(IEnumerable<Point> points)
: this() : this()
{ {

View File

@ -5,6 +5,7 @@ using System.Diagnostics;
namespace RGB.NET.Core namespace RGB.NET.Core
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a size consisting of a width and a height. /// Represents a size consisting of a width and a height.
/// </summary> /// </summary>
@ -43,10 +44,11 @@ namespace RGB.NET.Core
public Size() public Size()
{ } { }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Size"/> using the provided size to define a square. /// Initializes a new instance of the <see cref="T:RGB.NET.Core.Size" /> using the provided size to define a square.
/// </summary> /// </summary>
/// <param name="size">The size used for the <see cref="Width"/> component value and the <see cref="Height"/> component value.</param> /// <param name="size">The size used for the <see cref="P:RGB.NET.Core.Size.Width" /> component value and the <see cref="P:RGB.NET.Core.Size.Height" /> component value.</param>
public Size(double size) public Size(double size)
: this(size, size) : this(size, size)
{ } { }

View File

@ -8,6 +8,7 @@ using System.Linq;
namespace RGB.NET.Core namespace RGB.NET.Core
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a RGB-surface containing multiple devices. /// Represents a RGB-surface containing multiple devices.
/// </summary> /// </summary>

View File

@ -7,6 +7,7 @@ using RGB.NET.Core;
namespace RGB.NET.Decorators.Brush namespace RGB.NET.Decorators.Brush
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a decorator which allows to flash a brush by modifying his opacity. /// Represents a decorator which allows to flash a brush by modifying his opacity.
/// </summary> /// </summary>

View File

@ -4,8 +4,9 @@ using RGB.NET.Core;
namespace RGB.NET.Decorators.Gradient namespace RGB.NET.Decorators.Gradient
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a decorator which allows to move an <see cref="IGradient"/> by modifying his offset. /// Represents a decorator which allows to move an <see cref="T:RGB.NET.Brushes.Gradients.IGradient" /> by modifying his offset.
/// </summary> /// </summary>
public class MoveGradientDecorator : AbstractUpdateAwareDecorator, IGradientDecorator public class MoveGradientDecorator : AbstractUpdateAwareDecorator, IGradientDecorator
{ {
@ -33,14 +34,15 @@ namespace RGB.NET.Decorators.Gradient
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="MoveGradientDecorator"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Decorators.Gradient.MoveGradientDecorator" /> class.
/// </summary> /// </summary>
/// <param name="speed">The speed of the movement in units per second. /// <param name="speed">The speed of the movement in units per second.
/// The meaning of units differs for the different <see cref="IGradient"/> but 360 units will always be one complete cycle: /// The meaning of units differs for the different <see cref="T:RGB.NET.Brushes.Gradients.IGradient" /> but 360 units will always be one complete cycle:
/// <see cref="LinearGradient"/>: 360 unit = 1 offset. /// <see cref="T:RGB.NET.Brushes.Gradients.LinearGradient" />: 360 unit = 1 offset.
/// <see cref="RainbowGradient"/>: 1 unit = 1 degree.</param> /// <see cref="T:RGB.NET.Brushes.Gradients.RainbowGradient" />: 1 unit = 1 degree.</param>
/// <param name="direction">The direction the <see cref="IGradient"/> is moved. /// <param name="direction">The direction the <see cref="T:RGB.NET.Brushes.Gradients.IGradient" /> is moved.
/// True leads to an offset-increment (normaly moving to the right), false to an offset-decrement (normaly moving to the left).</param> /// True leads to an offset-increment (normaly moving to the right), false to an offset-decrement (normaly moving to the left).</param>
public MoveGradientDecorator(double speed = 180.0, bool direction = true) public MoveGradientDecorator(double speed = 180.0, bool direction = true)
{ {

View File

@ -1,16 +1,15 @@
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("RGB.NET.Decorators")] [assembly: AssemblyTitle("RGB.NET.Decorators")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("Decorator-Presets of RGB.NET")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("Wyrez")]
[assembly: AssemblyProduct("RGB.NET.Decorators")] [assembly: AssemblyProduct("RGB.NET.Decorators")]
[assembly: AssemblyCopyright("Copyright © 2017")] [assembly: AssemblyCopyright("Copyright © Wyrez 2017")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]

View File

@ -3,8 +3,9 @@ using RGB.NET.Core;
namespace RGB.NET.Devices.CoolerMaster.Attributes namespace RGB.NET.Devices.CoolerMaster.Attributes
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Specifies the <see cref="RGBDeviceType"/> of a field. /// Specifies the <see cref="T:RGB.NET.Core.RGBDeviceType" /> of a field.
/// </summary> /// </summary>
[AttributeUsage(AttributeTargets.Field)] [AttributeUsage(AttributeTargets.Field)]
public class DeviceTypeAttribute : Attribute public class DeviceTypeAttribute : Attribute
@ -20,10 +21,11 @@ namespace RGB.NET.Devices.CoolerMaster.Attributes
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Internal constructor of the <see cref="DeviceTypeAttribute"/> class. /// Internal constructor of the <see cref="T:RGB.NET.Devices.CoolerMaster.Attributes.DeviceTypeAttribute" /> class.
/// </summary> /// </summary>
/// <param name="deviceType">The <see cref="RGBDeviceType"/>.</param> /// <param name="deviceType">The <see cref="T:RGB.NET.Core.RGBDeviceType" />.</param>
public DeviceTypeAttribute(RGBDeviceType deviceType) public DeviceTypeAttribute(RGBDeviceType deviceType)
{ {
this.DeviceType = deviceType; this.DeviceType = deviceType;

View File

@ -12,6 +12,7 @@ using RGB.NET.Devices.CoolerMaster.Native;
namespace RGB.NET.Devices.CoolerMaster namespace RGB.NET.Devices.CoolerMaster
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a device provider responsible for Cooler Master devices. /// Represents a device provider responsible for Cooler Master devices.
/// </summary> /// </summary>
@ -37,6 +38,7 @@ namespace RGB.NET.Devices.CoolerMaster
/// </summary> /// </summary>
public static List<string> PossibleX64NativePaths { get; } = new List<string> { "x64/CMSDK.dll" }; public static List<string> PossibleX64NativePaths { get; } = new List<string> { "x64/CMSDK.dll" };
/// <inheritdoc />
/// <summary> /// <summary>
/// Indicates if the SDK is initialized and ready to use. /// Indicates if the SDK is initialized and ready to use.
/// </summary> /// </summary>
@ -47,6 +49,7 @@ namespace RGB.NET.Devices.CoolerMaster
/// </summary> /// </summary>
public string LoadedArchitecture => _CoolerMasterSDK.LoadedArchitecture; public string LoadedArchitecture => _CoolerMasterSDK.LoadedArchitecture;
/// <inheritdoc />
/// <summary> /// <summary>
/// Gets whether the application has exclusive access to the SDK or not. /// Gets whether the application has exclusive access to the SDK or not.
/// </summary> /// </summary>
@ -58,7 +61,7 @@ namespace RGB.NET.Devices.CoolerMaster
/// <summary> /// <summary>
/// Gets or sets a function to get the culture for a specific device. /// Gets or sets a function to get the culture for a specific device.
/// </summary> /// </summary>
public Func<CultureInfo> GetCulture { get; set; } = () => CultureHelper.GetCurrentCulture(); public Func<CultureInfo> GetCulture { get; set; } = CultureHelper.GetCurrentCulture;
#endregion #endregion
@ -97,7 +100,7 @@ namespace RGB.NET.Devices.CoolerMaster
{ {
try try
{ {
CoolerMasterRGBDevice device = null; CoolerMasterRGBDevice device;
switch (index.GetDeviceType()) switch (index.GetDeviceType())
{ {
case RGBDeviceType.Keyboard: case RGBDeviceType.Keyboard:

View File

@ -3,8 +3,9 @@ using RGB.NET.Core;
namespace RGB.NET.Devices.CoolerMaster namespace RGB.NET.Devices.CoolerMaster
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a Id of a <see cref="Led"/> on a <see cref="CoolerMasterRGBDevice"/>. /// Represents a Id of a <see cref="T:RGB.NET.Core.Led" /> on a <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterRGBDevice" />.
/// </summary> /// </summary>
[DebuggerDisplay("{" + nameof(LedId) + "}")] [DebuggerDisplay("{" + nameof(LedId) + "}")]
public class CoolerMasterLedId : ILedId public class CoolerMasterLedId : ILedId

View File

@ -8,14 +8,16 @@ using RGB.NET.Devices.CoolerMaster.Native;
namespace RGB.NET.Devices.CoolerMaster namespace RGB.NET.Devices.CoolerMaster
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a generic CoolerMaster-device. (keyboard, mouse, headset, mousepad). /// Represents a generic CoolerMaster-device. (keyboard, mouse, headset, mousepad).
/// </summary> /// </summary>
public abstract class CoolerMasterRGBDevice : AbstractRGBDevice public abstract class CoolerMasterRGBDevice : AbstractRGBDevice
{ {
#region Properties & Fields #region Properties & Fields
/// <inheritdoc />
/// <summary> /// <summary>
/// Gets information about the <see cref="CoolerMasterRGBDevice"/>. /// Gets information about the <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterRGBDevice" />.
/// </summary> /// </summary>
public override IRGBDeviceInfo DeviceInfo { get; } public override IRGBDeviceInfo DeviceInfo { get; }
@ -74,11 +76,9 @@ namespace RGB.NET.Devices.CoolerMaster
if (layout.Leds != null) if (layout.Leds != null)
foreach (LedLayout layoutLed in layout.Leds) foreach (LedLayout layoutLed in layout.Leds)
{ {
CoolerMasterLedIds ledId; if (Enum.TryParse(layoutLed.Id, true, out CoolerMasterLedIds ledId))
if (Enum.TryParse(layoutLed.Id, true, out ledId))
{ {
Led led; if (LedMapping.TryGetValue(new CoolerMasterLedId(this, ledId), out Led led))
if (LedMapping.TryGetValue(new CoolerMasterLedId(this, ledId), out led))
{ {
led.LedRectangle.Location.X = layoutLed.X; led.LedRectangle.Location.X = layoutLed.X;
led.LedRectangle.Location.Y = layoutLed.Y; led.LedRectangle.Location.Y = layoutLed.Y;

View File

@ -4,8 +4,9 @@ using RGB.NET.Devices.CoolerMaster.Helper;
namespace RGB.NET.Devices.CoolerMaster namespace RGB.NET.Devices.CoolerMaster
{ {
/// <inheritdoc />
/// <summary> /// <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> /// </summary>
public class CoolerMasterRGBDeviceInfo : IRGBDeviceInfo public class CoolerMasterRGBDeviceInfo : IRGBDeviceInfo
{ {

View File

@ -4,6 +4,7 @@ using RGB.NET.Core;
namespace RGB.NET.Devices.CoolerMaster namespace RGB.NET.Devices.CoolerMaster
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a CoolerMaster keyboard. /// Represents a CoolerMaster keyboard.
/// </summary> /// </summary>
@ -20,8 +21,9 @@ namespace RGB.NET.Devices.CoolerMaster
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="CoolerMasterKeyboardRGBDevice"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterKeyboardRGBDevice" /> class.
/// </summary> /// </summary>
/// <param name="info">The specific information provided by CoolerMaster for the keyboard</param> /// <param name="info">The specific information provided by CoolerMaster for the keyboard</param>
internal CoolerMasterKeyboardRGBDevice(CoolerMasterKeyboardRGBDeviceInfo info) internal CoolerMasterKeyboardRGBDevice(CoolerMasterKeyboardRGBDeviceInfo info)
@ -46,7 +48,7 @@ namespace RGB.NET.Devices.CoolerMaster
string model = KeyboardDeviceInfo.Model.Replace(" ", string.Empty).ToUpper(); string model = KeyboardDeviceInfo.Model.Replace(" ", string.Empty).ToUpper();
ApplyLayoutFromFile(PathHelper.GetAbsolutePath( ApplyLayoutFromFile(PathHelper.GetAbsolutePath(
$@"Layouts\CoolerMaster\Keyboards\{model}\{KeyboardDeviceInfo.PhysicalLayout.ToString().ToUpper()}.xml"), $@"Layouts\CoolerMaster\Keyboards\{model}\{KeyboardDeviceInfo.PhysicalLayout.ToString().ToUpper()}.xml"),
KeyboardDeviceInfo.LogicalLayout.ToString(), PathHelper.GetAbsolutePath($@"Images\CoolerMaster\Keyboards")); KeyboardDeviceInfo.LogicalLayout.ToString(), PathHelper.GetAbsolutePath(@"Images\CoolerMaster\Keyboards"));
} }
#endregion #endregion

View File

@ -4,8 +4,9 @@ using RGB.NET.Core;
namespace RGB.NET.Devices.CoolerMaster namespace RGB.NET.Devices.CoolerMaster
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a generic information for a <see cref="CoolerMasterKeyboardRGBDevice"/>. /// Represents a generic information for a <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterKeyboardRGBDevice" />.
/// </summary> /// </summary>
public class CoolerMasterKeyboardRGBDeviceInfo : CoolerMasterRGBDeviceInfo public class CoolerMasterKeyboardRGBDeviceInfo : CoolerMasterRGBDeviceInfo
{ {
@ -25,12 +26,13 @@ namespace RGB.NET.Devices.CoolerMaster
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Internal constructor of managed <see cref="CoolerMasterKeyboardRGBDeviceInfo"/>. /// Internal constructor of managed <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterKeyboardRGBDeviceInfo" />.
/// </summary> /// </summary>
/// <param name="deviceIndex">The index of the <see cref="CoolerMasterKeyboardRGBDevice"/>.</param> /// <param name="deviceIndex">The index of the <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterKeyboardRGBDevice" />.</param>
/// <param name="physicalKeyboardLayout">The <see cref="CoolerMasterPhysicalKeyboardLayout" /> of the <see cref="CoolerMasterKeyboardRGBDevice"/>.</param> /// <param name="physicalKeyboardLayout">The <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterPhysicalKeyboardLayout" /> of the <see cref="T:RGB.NET.Devices.CoolerMaster.CoolerMasterKeyboardRGBDevice" />.</param>
/// <param name="culture">The <see cref="CultureInfo"/> of the layout this keyboard is using</param> /// <param name="culture">The <see cref="T:System.Globalization.CultureInfo" /> of the layout this keyboard is using</param>
internal CoolerMasterKeyboardRGBDeviceInfo(CoolerMasterDevicesIndexes deviceIndex, CoolerMasterPhysicalKeyboardLayout physicalKeyboardLayout, CultureInfo culture) internal CoolerMasterKeyboardRGBDeviceInfo(CoolerMasterDevicesIndexes deviceIndex, CoolerMasterPhysicalKeyboardLayout physicalKeyboardLayout, CultureInfo culture)
: base(RGBDeviceType.Keyboard, deviceIndex) : base(RGBDeviceType.Keyboard, deviceIndex)
{ {

View File

@ -12,6 +12,7 @@ using RGB.NET.Devices.Corsair.SpecialParts;
namespace RGB.NET.Devices.Corsair namespace RGB.NET.Devices.Corsair
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a device provider responsible for corsair (CUE) devices. /// Represents a device provider responsible for corsair (CUE) devices.
/// </summary> /// </summary>
@ -37,6 +38,7 @@ namespace RGB.NET.Devices.Corsair
/// </summary> /// </summary>
public static List<string> PossibleX64NativePaths { get; } = new List<string> { "x64/CUESDK.dll", "x64/CUESDK_2015.dll", "x64/CUESDK_2013.dll" }; public static List<string> PossibleX64NativePaths { get; } = new List<string> { "x64/CUESDK.dll", "x64/CUESDK_2015.dll", "x64/CUESDK_2013.dll" };
/// <inheritdoc />
/// <summary> /// <summary>
/// Indicates if the SDK is initialized and ready to use. /// Indicates if the SDK is initialized and ready to use.
/// </summary> /// </summary>
@ -52,6 +54,7 @@ namespace RGB.NET.Devices.Corsair
/// </summary> /// </summary>
public CorsairProtocolDetails ProtocolDetails { get; private set; } public CorsairProtocolDetails ProtocolDetails { get; private set; }
/// <inheritdoc />
/// <summary> /// <summary>
/// Gets whether the application has exclusive access to the SDK or not. /// Gets whether the application has exclusive access to the SDK or not.
/// </summary> /// </summary>

View File

@ -5,6 +5,7 @@ using System;
namespace RGB.NET.Devices.Corsair namespace RGB.NET.Devices.Corsair
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents an exception thrown by the CUE. /// Represents an exception thrown by the CUE.
/// </summary> /// </summary>
@ -21,10 +22,11 @@ namespace RGB.NET.Devices.Corsair
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="CUEException"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Devices.Corsair.CUEException" /> class.
/// </summary> /// </summary>
/// <param name="error">The <see cref="CorsairError" /> provided by CUE, which leads to this exception.</param> /// <param name="error">The <see cref="T:RGB.NET.Devices.Corsair.CorsairError" /> provided by CUE, which leads to this exception.</param>
public CUEException(CorsairError error) public CUEException(CorsairError error)
{ {
this.Error = error; this.Error = error;

View File

@ -3,8 +3,9 @@ using RGB.NET.Core;
namespace RGB.NET.Devices.Corsair namespace RGB.NET.Devices.Corsair
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a Id of a <see cref="Led"/> on a <see cref="CorsairRGBDevice"/>. /// Represents a Id of a <see cref="T:RGB.NET.Core.Led" /> on a <see cref="T:RGB.NET.Devices.Corsair.CorsairRGBDevice" />.
/// </summary> /// </summary>
[DebuggerDisplay("{" + nameof(LedId) + "}")] [DebuggerDisplay("{" + nameof(LedId) + "}")]
public class CorsairLedId : ILedId public class CorsairLedId : ILedId

View File

@ -9,6 +9,7 @@ using RGB.NET.Devices.Corsair.Native;
namespace RGB.NET.Devices.Corsair namespace RGB.NET.Devices.Corsair
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a generic CUE-device. (keyboard, mouse, headset, mousepad). /// Represents a generic CUE-device. (keyboard, mouse, headset, mousepad).
/// </summary> /// </summary>
@ -16,8 +17,9 @@ namespace RGB.NET.Devices.Corsair
{ {
#region Properties & Fields #region Properties & Fields
/// <inheritdoc />
/// <summary> /// <summary>
/// Gets information about the <see cref="CorsairRGBDevice"/>. /// Gets information about the <see cref="T:RGB.NET.Devices.Corsair.CorsairRGBDevice" />.
/// </summary> /// </summary>
public override IRGBDeviceInfo DeviceInfo { get; } public override IRGBDeviceInfo DeviceInfo { get; }
@ -75,11 +77,9 @@ namespace RGB.NET.Devices.Corsair
if (layout.Leds != null) if (layout.Leds != null)
foreach (LedLayout layoutLed in layout.Leds) foreach (LedLayout layoutLed in layout.Leds)
{ {
CorsairLedIds ledId; if (Enum.TryParse(layoutLed.Id, true, out CorsairLedIds ledId))
if (Enum.TryParse(layoutLed.Id, true, out ledId))
{ {
Led led; if (LedMapping.TryGetValue(new CorsairLedId(this, ledId), out Led led))
if (LedMapping.TryGetValue(new CorsairLedId(this, ledId), out led))
{ {
led.LedRectangle.Location.X = layoutLed.X; led.LedRectangle.Location.X = layoutLed.X;
led.LedRectangle.Location.Y = layoutLed.Y; led.LedRectangle.Location.Y = layoutLed.Y;

View File

@ -5,8 +5,9 @@ using RGB.NET.Devices.Corsair.Native;
namespace RGB.NET.Devices.Corsair namespace RGB.NET.Devices.Corsair
{ {
/// <inheritdoc />
/// <summary> /// <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> /// </summary>
public class CorsairRGBDeviceInfo : IRGBDeviceInfo public class CorsairRGBDeviceInfo : IRGBDeviceInfo
{ {

View File

@ -5,6 +5,7 @@ using RGB.NET.Core;
namespace RGB.NET.Devices.Corsair namespace RGB.NET.Devices.Corsair
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a corsair headset. /// Represents a corsair headset.
/// </summary> /// </summary>
@ -21,8 +22,9 @@ namespace RGB.NET.Devices.Corsair
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="CorsairHeadsetRGBDevice"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Devices.Corsair.CorsairHeadsetRGBDevice" /> class.
/// </summary> /// </summary>
/// <param name="info">The specific information provided by CUE for the headset</param> /// <param name="info">The specific information provided by CUE for the headset</param>
internal CorsairHeadsetRGBDevice(CorsairHeadsetRGBDeviceInfo info) internal CorsairHeadsetRGBDevice(CorsairHeadsetRGBDeviceInfo info)

View File

@ -4,18 +4,20 @@ using RGB.NET.Devices.Corsair.Native;
namespace RGB.NET.Devices.Corsair namespace RGB.NET.Devices.Corsair
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a generic information for a <see cref="CorsairHeadsetRGBDevice"/>. /// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairHeadsetRGBDevice" />.
/// </summary> /// </summary>
public class CorsairHeadsetRGBDeviceInfo : CorsairRGBDeviceInfo public class CorsairHeadsetRGBDeviceInfo : CorsairRGBDeviceInfo
{ {
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Internal constructor of managed <see cref="CorsairHeadsetRGBDeviceInfo"/>. /// Internal constructor of managed <see cref="T:RGB.NET.Devices.Corsair.CorsairHeadsetRGBDeviceInfo" />.
/// </summary> /// </summary>
/// <param name="deviceIndex">The index of the <see cref="CorsairHeadsetRGBDevice"/>.</param> /// <param name="deviceIndex">The index of the <see cref="T:RGB.NET.Devices.Corsair.CorsairHeadsetRGBDevice" />.</param>
/// <param name="nativeInfo">The native <see cref="_CorsairDeviceInfo" />-struct</param> /// <param name="nativeInfo">The native <see cref="T:RGB.NET.Devices.Corsair.Native._CorsairDeviceInfo" />-struct</param>
internal CorsairHeadsetRGBDeviceInfo(int deviceIndex, _CorsairDeviceInfo nativeInfo) internal CorsairHeadsetRGBDeviceInfo(int deviceIndex, _CorsairDeviceInfo nativeInfo)
: base(deviceIndex, RGBDeviceType.Headset, nativeInfo) : base(deviceIndex, RGBDeviceType.Headset, nativeInfo)
{ {

View File

@ -8,6 +8,7 @@ using RGB.NET.Devices.Corsair.Native;
namespace RGB.NET.Devices.Corsair namespace RGB.NET.Devices.Corsair
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a corsair keyboard. /// Represents a corsair keyboard.
/// </summary> /// </summary>
@ -24,8 +25,9 @@ namespace RGB.NET.Devices.Corsair
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="CorsairKeyboardRGBDevice"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Devices.Corsair.CorsairKeyboardRGBDevice" /> class.
/// </summary> /// </summary>
/// <param name="info">The specific information provided by CUE for the keyboard</param> /// <param name="info">The specific information provided by CUE for the keyboard</param>
internal CorsairKeyboardRGBDevice(CorsairKeyboardRGBDeviceInfo info) internal CorsairKeyboardRGBDevice(CorsairKeyboardRGBDeviceInfo info)
@ -59,7 +61,7 @@ namespace RGB.NET.Devices.Corsair
string model = KeyboardDeviceInfo.Model.Replace(" ", string.Empty).ToUpper(); string model = KeyboardDeviceInfo.Model.Replace(" ", string.Empty).ToUpper();
ApplyLayoutFromFile(PathHelper.GetAbsolutePath( ApplyLayoutFromFile(PathHelper.GetAbsolutePath(
$@"Layouts\Corsair\Keyboards\{model}\{KeyboardDeviceInfo.PhysicalLayout.ToString().ToUpper()}.xml"), $@"Layouts\Corsair\Keyboards\{model}\{KeyboardDeviceInfo.PhysicalLayout.ToString().ToUpper()}.xml"),
KeyboardDeviceInfo.LogicalLayout.ToString(), PathHelper.GetAbsolutePath($@"Images\Corsair\Keyboards")); KeyboardDeviceInfo.LogicalLayout.ToString(), PathHelper.GetAbsolutePath(@"Images\Corsair\Keyboards"));
} }
#endregion #endregion

View File

@ -7,8 +7,9 @@ using RGB.NET.Devices.Corsair.Native;
namespace RGB.NET.Devices.Corsair namespace RGB.NET.Devices.Corsair
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a generic information for a <see cref="CorsairKeyboardRGBDevice"/>. /// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairKeyboardRGBDevice" />.
/// </summary> /// </summary>
public class CorsairKeyboardRGBDeviceInfo : CorsairRGBDeviceInfo public class CorsairKeyboardRGBDeviceInfo : CorsairRGBDeviceInfo
{ {
@ -28,11 +29,12 @@ namespace RGB.NET.Devices.Corsair
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Internal constructor of managed <see cref="CorsairKeyboardRGBDeviceInfo"/>. /// Internal constructor of managed <see cref="T:RGB.NET.Devices.Corsair.CorsairKeyboardRGBDeviceInfo" />.
/// </summary> /// </summary>
/// <param name="deviceIndex">The index of the <see cref="CorsairKeyboardRGBDevice"/>.</param> /// <param name="deviceIndex">The index of the <see cref="T:RGB.NET.Devices.Corsair.CorsairKeyboardRGBDevice" />.</param>
/// <param name="nativeInfo">The native <see cref="_CorsairDeviceInfo" />-struct</param> /// <param name="nativeInfo">The native <see cref="T:RGB.NET.Devices.Corsair.Native._CorsairDeviceInfo" />-struct</param>
internal CorsairKeyboardRGBDeviceInfo(int deviceIndex, _CorsairDeviceInfo nativeInfo) internal CorsairKeyboardRGBDeviceInfo(int deviceIndex, _CorsairDeviceInfo nativeInfo)
: base(deviceIndex, RGBDeviceType.Keyboard, nativeInfo) : base(deviceIndex, RGBDeviceType.Keyboard, nativeInfo)
{ {

View File

@ -6,6 +6,7 @@ using RGB.NET.Core.Exceptions;
namespace RGB.NET.Devices.Corsair namespace RGB.NET.Devices.Corsair
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a corsair mouse. /// Represents a corsair mouse.
/// </summary> /// </summary>
@ -22,8 +23,9 @@ namespace RGB.NET.Devices.Corsair
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="CorsairMouseRGBDevice"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Devices.Corsair.CorsairMouseRGBDevice" /> class.
/// </summary> /// </summary>
/// <param name="info">The specific information provided by CUE for the mouse</param> /// <param name="info">The specific information provided by CUE for the mouse</param>
internal CorsairMouseRGBDevice(CorsairMouseRGBDeviceInfo info) internal CorsairMouseRGBDevice(CorsairMouseRGBDeviceInfo info)

View File

@ -4,8 +4,9 @@ using RGB.NET.Devices.Corsair.Native;
namespace RGB.NET.Devices.Corsair namespace RGB.NET.Devices.Corsair
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a generic information for a <see cref="CorsairMouseRGBDevice"/>. /// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairMouseRGBDevice" />.
/// </summary> /// </summary>
public class CorsairMouseRGBDeviceInfo : CorsairRGBDeviceInfo public class CorsairMouseRGBDeviceInfo : CorsairRGBDeviceInfo
{ {
@ -20,11 +21,12 @@ namespace RGB.NET.Devices.Corsair
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Internal constructor of managed <see cref="CorsairMouseRGBDeviceInfo"/>. /// Internal constructor of managed <see cref="T:RGB.NET.Devices.Corsair.CorsairMouseRGBDeviceInfo" />.
/// </summary> /// </summary>
/// <param name="deviceIndex">The index of the <see cref="CorsairMouseRGBDevice"/>.</param> /// <param name="deviceIndex">The index of the <see cref="T:RGB.NET.Devices.Corsair.CorsairMouseRGBDevice" />.</param>
/// <param name="nativeInfo">The native <see cref="_CorsairDeviceInfo" />-struct</param> /// <param name="nativeInfo">The native <see cref="T:RGB.NET.Devices.Corsair.Native._CorsairDeviceInfo" />-struct</param>
internal CorsairMouseRGBDeviceInfo(int deviceIndex, _CorsairDeviceInfo nativeInfo) internal CorsairMouseRGBDeviceInfo(int deviceIndex, _CorsairDeviceInfo nativeInfo)
: base(deviceIndex, RGBDeviceType.Mouse, nativeInfo) : base(deviceIndex, RGBDeviceType.Mouse, nativeInfo)
{ {

View File

@ -10,6 +10,7 @@ using RGB.NET.Devices.Corsair.Native;
namespace RGB.NET.Devices.Corsair namespace RGB.NET.Devices.Corsair
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a corsair mousepad. /// Represents a corsair mousepad.
/// </summary> /// </summary>
@ -26,8 +27,9 @@ namespace RGB.NET.Devices.Corsair
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="CorsairMousepadRGBDevice"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Devices.Corsair.CorsairMousepadRGBDevice" /> class.
/// </summary> /// </summary>
/// <param name="info">The specific information provided by CUE for the mousepad</param> /// <param name="info">The specific information provided by CUE for the mousepad</param>
internal CorsairMousepadRGBDevice(CorsairMousepadRGBDeviceInfo info) internal CorsairMousepadRGBDevice(CorsairMousepadRGBDeviceInfo info)

View File

@ -4,18 +4,20 @@ using RGB.NET.Devices.Corsair.Native;
namespace RGB.NET.Devices.Corsair namespace RGB.NET.Devices.Corsair
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a generic information for a <see cref="CorsairMousepadRGBDevice"/>. /// Represents a generic information for a <see cref="T:RGB.NET.Devices.Corsair.CorsairMousepadRGBDevice" />.
/// </summary> /// </summary>
public class CorsairMousepadRGBDeviceInfo : CorsairRGBDeviceInfo public class CorsairMousepadRGBDeviceInfo : CorsairRGBDeviceInfo
{ {
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Internal constructor of managed <see cref="CorsairMousepadRGBDeviceInfo"/>. /// Internal constructor of managed <see cref="T:RGB.NET.Devices.Corsair.CorsairMousepadRGBDeviceInfo" />.
/// </summary> /// </summary>
/// <param name="deviceIndex">The index if the <see cref="CorsairMousepadRGBDevice"/>.</param> /// <param name="deviceIndex">The index if the <see cref="T:RGB.NET.Devices.Corsair.CorsairMousepadRGBDevice" />.</param>
/// <param name="nativeInfo">The native <see cref="_CorsairDeviceInfo" />-struct</param> /// <param name="nativeInfo">The native <see cref="T:RGB.NET.Devices.Corsair.Native._CorsairDeviceInfo" />-struct</param>
internal CorsairMousepadRGBDeviceInfo(int deviceIndex, _CorsairDeviceInfo nativeInfo) internal CorsairMousepadRGBDeviceInfo(int deviceIndex, _CorsairDeviceInfo nativeInfo)
: base(deviceIndex, RGBDeviceType.Mousepad, nativeInfo) : base(deviceIndex, RGBDeviceType.Mousepad, nativeInfo)
{ {

View File

@ -9,8 +9,9 @@ using RGB.NET.Core;
namespace RGB.NET.Devices.Corsair.SpecialParts namespace RGB.NET.Devices.Corsair.SpecialParts
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a lightbar attached to a <see cref="IRGBDevice"/> /// Represents a lightbar attached to a <see cref="T:RGB.NET.Core.IRGBDevice" />
/// </summary> /// </summary>
public class LightbarSpecialPart : IRGBDeviceSpecialPart public class LightbarSpecialPart : IRGBDeviceSpecialPart
{ {
@ -59,16 +60,18 @@ namespace RGB.NET.Devices.Corsair.SpecialParts
#region Methods #region Methods
/// <inheritdoc />
/// <summary> /// <summary>
/// Returns an enumerator that iterates over all <see cref="Led"/> of the <see cref="IRGBDeviceSpecialPart"/>. /// Returns an enumerator that iterates over all <see cref="T:RGB.NET.Core.Led" /> of the <see cref="T:RGB.NET.Core.IRGBDeviceSpecialPart" />.
/// </summary> /// </summary>
/// <returns>An enumerator for all <see cref="Led"/> of the <see cref="IRGBDeviceSpecialPart"/>.</returns> /// <returns>An enumerator for all <see cref="T:RGB.NET.Core.Led" /> of the <see cref="T:RGB.NET.Core.IRGBDeviceSpecialPart" />.</returns>
public IEnumerator<Led> GetEnumerator() => _leds.GetEnumerator(); public IEnumerator<Led> GetEnumerator() => _leds.GetEnumerator();
/// <inheritdoc />
/// <summary> /// <summary>
/// Returns an enumerator that iterates over all <see cref="Led"/> of the <see cref="IRGBDeviceSpecialPart"/>. /// Returns an enumerator that iterates over all <see cref="T:RGB.NET.Core.Led" /> of the <see cref="T:RGB.NET.Core.IRGBDeviceSpecialPart" />.
/// </summary> /// </summary>
/// <returns>An enumerator for all <see cref="Led"/> of the <see cref="IRGBDeviceSpecialPart"/>.</returns> /// <returns>An enumerator for all <see cref="T:RGB.NET.Core.Led" /> of the <see cref="T:RGB.NET.Core.IRGBDeviceSpecialPart" />.</returns>
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
#endregion #endregion

View File

@ -3,8 +3,9 @@ using RGB.NET.Core;
namespace RGB.NET.Devices.Logitech namespace RGB.NET.Devices.Logitech
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a Id of a <see cref="Led"/> on a <see cref="LogitechRGBDevice"/>. /// Represents a Id of a <see cref="T:RGB.NET.Core.Led" /> on a <see cref="T:RGB.NET.Devices.Logitech.LogitechRGBDevice" />.
/// </summary> /// </summary>
[DebuggerDisplay("{" + nameof(LedId) + "}")] [DebuggerDisplay("{" + nameof(LedId) + "}")]
public class LogitechLedId : ILedId public class LogitechLedId : ILedId

View File

@ -8,6 +8,7 @@ using RGB.NET.Devices.Logitech.Native;
namespace RGB.NET.Devices.Logitech namespace RGB.NET.Devices.Logitech
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a generic Logitech-device. (keyboard, mouse, headset, mousepad). /// Represents a generic Logitech-device. (keyboard, mouse, headset, mousepad).
/// </summary> /// </summary>
@ -15,8 +16,9 @@ namespace RGB.NET.Devices.Logitech
{ {
#region Properties & Fields #region Properties & Fields
/// <inheritdoc />
/// <summary> /// <summary>
/// Gets information about the <see cref="LogitechRGBDevice"/>. /// Gets information about the <see cref="T:RGB.NET.Devices.Logitech.LogitechRGBDevice" />.
/// </summary> /// </summary>
public override IRGBDeviceInfo DeviceInfo { get; } public override IRGBDeviceInfo DeviceInfo { get; }
@ -74,12 +76,10 @@ namespace RGB.NET.Devices.Logitech
if (layout.Leds != null) if (layout.Leds != null)
foreach (LedLayout layoutLed in layout.Leds) foreach (LedLayout layoutLed in layout.Leds)
{ {
LogitechLedIds ledId; if (Enum.TryParse(layoutLed.Id, true, out LogitechLedIds ledId))
if (Enum.TryParse(layoutLed.Id, true, out ledId))
{ {
LogitechLedId id = new LogitechLedId(this, ledId); LogitechLedId id = new LogitechLedId(this, ledId);
Led led; if (!LedMapping.TryGetValue(id, out Led led))
if (!LedMapping.TryGetValue(id, out led))
led = InitializeLed(id, new Rectangle()); led = InitializeLed(id, new Rectangle());
led.LedRectangle.Location.X = layoutLed.X; led.LedRectangle.Location.X = layoutLed.X;
@ -110,8 +110,7 @@ namespace RGB.NET.Devices.Logitech
foreach (Led led in leds) foreach (Led led in leds)
{ {
//TODO DarthAffe 26.03.2017: This is only needed since update by name doesn't work as expected for all keys ... //TODO DarthAffe 26.03.2017: This is only needed since update by name doesn't work as expected for all keys ...
int bitmapOffset; if (BitmapMapping.BitmapOffset.TryGetValue(((LogitechLedId)led.Id).LedId, out int bitmapOffset))
if (BitmapMapping.BitmapOffset.TryGetValue(((LogitechLedId)led.Id).LedId, out bitmapOffset))
{ {
if (bitmap == null) if (bitmap == null)
bitmap = BitmapMapping.CreateBitmap(); bitmap = BitmapMapping.CreateBitmap();

View File

@ -3,8 +3,9 @@ using RGB.NET.Core;
namespace RGB.NET.Devices.Logitech namespace RGB.NET.Devices.Logitech
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a generic information for a Logitech-<see cref="IRGBDevice"/>. /// Represents a generic information for a Logitech-<see cref="T:RGB.NET.Core.IRGBDevice" />.
/// </summary> /// </summary>
public class LogitechRGBDeviceInfo : IRGBDeviceInfo public class LogitechRGBDeviceInfo : IRGBDeviceInfo
{ {

View File

@ -5,6 +5,7 @@ using RGB.NET.Core;
namespace RGB.NET.Devices.Logitech namespace RGB.NET.Devices.Logitech
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a logitech keyboard. /// Represents a logitech keyboard.
/// </summary> /// </summary>
@ -21,8 +22,9 @@ namespace RGB.NET.Devices.Logitech
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="LogitechKeyboardRGBDevice"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Devices.Logitech.LogitechKeyboardRGBDevice" /> class.
/// </summary> /// </summary>
/// <param name="info">The specific information provided by logitech for the keyboard</param> /// <param name="info">The specific information provided by logitech for the keyboard</param>
internal LogitechKeyboardRGBDevice(LogitechKeyboardRGBDeviceInfo info) internal LogitechKeyboardRGBDevice(LogitechKeyboardRGBDeviceInfo info)
@ -41,7 +43,7 @@ namespace RGB.NET.Devices.Logitech
string model = KeyboardDeviceInfo.Model.Replace(" ", string.Empty).ToUpper(); string model = KeyboardDeviceInfo.Model.Replace(" ", string.Empty).ToUpper();
ApplyLayoutFromFile(PathHelper.GetAbsolutePath( ApplyLayoutFromFile(PathHelper.GetAbsolutePath(
$@"Layouts\Logitech\Keyboards\{model}\{KeyboardDeviceInfo.PhysicalLayout.ToString().ToUpper()}.xml"), $@"Layouts\Logitech\Keyboards\{model}\{KeyboardDeviceInfo.PhysicalLayout.ToString().ToUpper()}.xml"),
KeyboardDeviceInfo.LogicalLayout.ToString(), PathHelper.GetAbsolutePath($@"Images\Logitech\Keyboards")); KeyboardDeviceInfo.LogicalLayout.ToString(), PathHelper.GetAbsolutePath(@"Images\Logitech\Keyboards"));
} }
#endregion #endregion

View File

@ -7,8 +7,9 @@ using RGB.NET.Core;
namespace RGB.NET.Devices.Logitech namespace RGB.NET.Devices.Logitech
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a generic information for a <see cref="LogitechKeyboardRGBDevice"/>. /// Represents a generic information for a <see cref="T:RGB.NET.Devices.Logitech.LogitechKeyboardRGBDevice" />.
/// </summary> /// </summary>
public class LogitechKeyboardRGBDeviceInfo : LogitechRGBDeviceInfo public class LogitechKeyboardRGBDeviceInfo : LogitechRGBDeviceInfo
{ {
@ -28,12 +29,13 @@ namespace RGB.NET.Devices.Logitech
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Internal constructor of managed <see cref="LogitechKeyboardRGBDeviceInfo"/>. /// Internal constructor of managed <see cref="T:RGB.NET.Devices.Logitech.LogitechKeyboardRGBDeviceInfo" />.
/// </summary> /// </summary>
/// <param name="model">The represented device model.</param> /// <param name="model">The represented device model.</param>
/// <param name="deviceCaps">The lighting-capabilities of the device.</param> /// <param name="deviceCaps">The lighting-capabilities of the device.</param>
/// <param name="culture">The <see cref="CultureInfo"/> of the layout this keyboard is using</param> /// <param name="culture">The <see cref="T:System.Globalization.CultureInfo" /> of the layout this keyboard is using</param>
internal LogitechKeyboardRGBDeviceInfo(string model, LogitechDeviceCaps deviceCaps, CultureInfo culture) internal LogitechKeyboardRGBDeviceInfo(string model, LogitechDeviceCaps deviceCaps, CultureInfo culture)
: base(RGBDeviceType.Keyboard, model, deviceCaps) : base(RGBDeviceType.Keyboard, model, deviceCaps)
{ {

View File

@ -11,6 +11,7 @@ using RGB.NET.Devices.Logitech.Native;
namespace RGB.NET.Devices.Logitech namespace RGB.NET.Devices.Logitech
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a device provider responsible for logitech devices. /// Represents a device provider responsible for logitech devices.
/// </summary> /// </summary>
@ -53,7 +54,7 @@ namespace RGB.NET.Devices.Logitech
/// <summary> /// <summary>
/// Gets or sets a function to get the culture for a specific device. /// Gets or sets a function to get the culture for a specific device.
/// </summary> /// </summary>
public Func<CultureInfo> GetCulture { get; set; } = () => CultureHelper.GetCurrentCulture(); public Func<CultureInfo> GetCulture { get; set; } = CultureHelper.GetCurrentCulture;
#endregion #endregion

View File

@ -2,6 +2,7 @@
namespace RGB.NET.Devices.Novation.Attributes namespace RGB.NET.Devices.Novation.Attributes
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Specifies the color-capability of a field. /// Specifies the color-capability of a field.
/// </summary> /// </summary>
@ -19,8 +20,9 @@ namespace RGB.NET.Devices.Novation.Attributes
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <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> /// </summary>
/// <param name="capability">The capability.</param> /// <param name="capability">The capability.</param>
public ColorCapabilityAttribute(NovationColorCapabilities capability) public ColorCapabilityAttribute(NovationColorCapabilities capability)

View File

@ -2,6 +2,7 @@
namespace RGB.NET.Devices.Novation.Attributes namespace RGB.NET.Devices.Novation.Attributes
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Specifies the device-id of a field. /// Specifies the device-id of a field.
/// </summary> /// </summary>
@ -19,8 +20,9 @@ namespace RGB.NET.Devices.Novation.Attributes
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <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> /// </summary>
/// <param name="id">The id.</param> /// <param name="id">The id.</param>
public DeviceIdAttribute(string id) public DeviceIdAttribute(string id)

View File

@ -3,8 +3,9 @@ using RGB.NET.Core;
namespace RGB.NET.Devices.Novation namespace RGB.NET.Devices.Novation
{ {
/// <inheritdoc />
/// <summary> /// <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> /// </summary>
[DebuggerDisplay("{" + nameof(LedId) + "}")] [DebuggerDisplay("{" + nameof(LedId) + "}")]
public class NovationLedId : ILedId public class NovationLedId : ILedId

View File

@ -8,6 +8,7 @@ using Sanford.Multimedia.Midi;
namespace RGB.NET.Devices.Novation namespace RGB.NET.Devices.Novation
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a generic Novation-device. (launchpad). /// Represents a generic Novation-device. (launchpad).
/// </summary> /// </summary>
@ -18,8 +19,9 @@ namespace RGB.NET.Devices.Novation
private readonly OutputDevice _outputDevice; private readonly OutputDevice _outputDevice;
private readonly NovationRGBDeviceInfo _deviceInfo; private readonly NovationRGBDeviceInfo _deviceInfo;
/// <inheritdoc />
/// <summary> /// <summary>
/// Gets information about the <see cref="NovationRGBDevice"/>. /// Gets information about the <see cref="T:RGB.NET.Devices.Novation.NovationRGBDevice" />.
/// </summary> /// </summary>
public override IRGBDeviceInfo DeviceInfo => _deviceInfo; public override IRGBDeviceInfo DeviceInfo => _deviceInfo;
@ -80,11 +82,9 @@ namespace RGB.NET.Devices.Novation
if (layout.Leds != null) if (layout.Leds != null)
foreach (LedLayout layoutLed in layout.Leds) foreach (LedLayout layoutLed in layout.Leds)
{ {
NovationLedIds ledId; if (Enum.TryParse(layoutLed.Id, true, out NovationLedIds ledId))
if (Enum.TryParse(layoutLed.Id, true, out ledId))
{ {
Led led; if (LedMapping.TryGetValue(new NovationLedId(this, ledId), out Led led))
if (LedMapping.TryGetValue(new NovationLedId(this, ledId), out led))
{ {
led.LedRectangle.Location.X = layoutLed.X; led.LedRectangle.Location.X = layoutLed.X;
led.LedRectangle.Location.Y = layoutLed.Y; led.LedRectangle.Location.Y = layoutLed.Y;

View File

@ -3,8 +3,9 @@ using RGB.NET.Core;
namespace RGB.NET.Devices.Novation namespace RGB.NET.Devices.Novation
{ {
/// <inheritdoc />
/// <summary> /// <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> /// </summary>
public class NovationRGBDeviceInfo : IRGBDeviceInfo public class NovationRGBDeviceInfo : IRGBDeviceInfo
{ {

View File

@ -3,6 +3,7 @@ using RGB.NET.Core;
namespace RGB.NET.Devices.Novation namespace RGB.NET.Devices.Novation
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a Novation launchpad. /// Represents a Novation launchpad.
/// </summary> /// </summary>
@ -19,8 +20,9 @@ namespace RGB.NET.Devices.Novation
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <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> /// </summary>
/// <param name="info">The specific information provided by Novation for the launchpad</param> /// <param name="info">The specific information provided by Novation for the launchpad</param>
internal NovationLaunchpadRGBDevice(NovationLaunchpadRGBDeviceInfo info) internal NovationLaunchpadRGBDevice(NovationLaunchpadRGBDeviceInfo info)

View File

@ -3,19 +3,21 @@ using RGB.NET.Core;
namespace RGB.NET.Devices.Novation namespace RGB.NET.Devices.Novation
{ {
/// <inheritdoc />
/// <summary> /// <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> /// </summary>
public class NovationLaunchpadRGBDeviceInfo : NovationRGBDeviceInfo public class NovationLaunchpadRGBDeviceInfo : NovationRGBDeviceInfo
{ {
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Internal constructor of managed <see cref="NovationLaunchpadRGBDeviceInfo"/>. /// Internal constructor of managed <see cref="T:RGB.NET.Devices.Novation.NovationLaunchpadRGBDeviceInfo" />.
/// </summary> /// </summary>
/// <param name="model">The represented device model.</param> /// <param name="model">The represented device model.</param>
/// <param name="deviceId"></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) internal NovationLaunchpadRGBDeviceInfo(string model, int deviceId, NovationColorCapabilities colorCapabilities)
: base(RGBDeviceType.LedMatrix, model, deviceId, colorCapabilities) : base(RGBDeviceType.LedMatrix, model, deviceId, colorCapabilities)
{ {

View File

@ -10,6 +10,7 @@ using Sanford.Multimedia.Midi;
namespace RGB.NET.Devices.Novation namespace RGB.NET.Devices.Novation
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a device provider responsible for Novation devices. /// Represents a device provider responsible for Novation devices.
/// </summary> /// </summary>
@ -23,11 +24,13 @@ namespace RGB.NET.Devices.Novation
/// </summary> /// </summary>
public static NovationDeviceProvider Instance => _instance ?? new NovationDeviceProvider(); public static NovationDeviceProvider Instance => _instance ?? new NovationDeviceProvider();
/// <inheritdoc />
/// <summary> /// <summary>
/// Indicates if the SDK is initialized and ready to use. /// Indicates if the SDK is initialized and ready to use.
/// </summary> /// </summary>
public bool IsInitialized { get; private set; } public bool IsInitialized { get; private set; }
/// <inheritdoc />
/// <summary> /// <summary>
/// Gets whether the application has exclusive access to the SDK or not. /// Gets whether the application has exclusive access to the SDK or not.
/// </summary> /// </summary>

View File

@ -17,9 +17,8 @@ namespace RGB.NET.Groups
/// <returns>The converted <see cref="ListLedGroup" />.</returns> /// <returns>The converted <see cref="ListLedGroup" />.</returns>
public static ListLedGroup ToListLedGroup(this ILedGroup ledGroup) public static ListLedGroup ToListLedGroup(this ILedGroup ledGroup)
{ {
ListLedGroup listLedGroup = ledGroup as ListLedGroup;
// ReSharper disable once InvertIf // ReSharper disable once InvertIf
if (listLedGroup == null) if (!(ledGroup is ListLedGroup listLedGroup))
{ {
bool wasAttached = ledGroup.Detach(); bool wasAttached = ledGroup.Detach();
listLedGroup = new ListLedGroup(wasAttached, ledGroup.GetLeds()) { Brush = ledGroup.Brush }; listLedGroup = new ListLedGroup(wasAttached, ledGroup.GetLeds()) { Brush = ledGroup.Brush };

View File

@ -6,8 +6,9 @@ using RGB.NET.Core;
namespace RGB.NET.Groups namespace RGB.NET.Groups
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a ledgroup containing arbitrary <see cref="Led"/>. /// Represents a ledgroup containing arbitrary <see cref="T:RGB.NET.Core.Led" />.
/// </summary> /// </summary>
public class ListLedGroup : AbstractLedGroup public class ListLedGroup : AbstractLedGroup
{ {
@ -22,84 +23,93 @@ namespace RGB.NET.Groups
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ListLedGroup"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Groups.ListLedGroup" /> class.
/// </summary> /// </summary>
/// <param name="autoAttach">Specifies whether this <see cref="ListLedGroup"/> should be automatically attached or not.</param> /// <param name="autoAttach">Specifies whether this <see cref="T:RGB.NET.Groups.ListLedGroup" /> should be automatically attached or not.</param>
public ListLedGroup(bool autoAttach = true) public ListLedGroup(bool autoAttach = true)
: base(autoAttach) : base(autoAttach)
{ } { }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ListLedGroup"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Groups.ListLedGroup" /> class.
/// </summary> /// </summary>
/// <param name="leds">The initial <see cref="Led"/> of this <see cref="ListLedGroup"/>.</param> /// <param name="leds">The initial <see cref="T:RGB.NET.Core.Led" /> of this <see cref="T:RGB.NET.Groups.ListLedGroup" />.</param>
public ListLedGroup(params Led[] leds) public ListLedGroup(params Led[] leds)
: this(true, leds) : this(true, leds)
{ } { }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ListLedGroup"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Groups.ListLedGroup" /> class.
/// </summary> /// </summary>
/// <param name="leds">The initial <see cref="Led"/> of this <see cref="ListLedGroup"/>.</param> /// <param name="leds">The initial <see cref="T:RGB.NET.Core.Led" /> of this <see cref="T:RGB.NET.Groups.ListLedGroup" />.</param>
public ListLedGroup(IEnumerable<Led> leds) public ListLedGroup(IEnumerable<Led> leds)
: this(true, leds) : this(true, leds)
{ } { }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ListLedGroup"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Groups.ListLedGroup" /> class.
/// </summary> /// </summary>
/// <param name="autoAttach">Specifies whether this <see cref="ListLedGroup"/> should be automatically attached or not.</param> /// <param name="autoAttach">Specifies whether this <see cref="T:RGB.NET.Groups.ListLedGroup" /> should be automatically attached or not.</param>
/// <param name="leds">The initial <see cref="Led"/> of this <see cref="ListLedGroup"/>.</param> /// <param name="leds">The initial <see cref="T:RGB.NET.Core.Led" /> of this <see cref="T:RGB.NET.Groups.ListLedGroup" />.</param>
public ListLedGroup(bool autoAttach, IEnumerable<Led> leds) public ListLedGroup(bool autoAttach, IEnumerable<Led> leds)
: base(autoAttach) : base(autoAttach)
{ {
AddLeds(leds); AddLeds(leds);
} }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ListLedGroup"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Groups.ListLedGroup" /> class.
/// </summary> /// </summary>
/// <param name="autoAttach">Specifies whether this <see cref="ListLedGroup"/> should be automatically attached or not.</param> /// <param name="autoAttach">Specifies whether this <see cref="T:RGB.NET.Groups.ListLedGroup" /> should be automatically attached or not.</param>
/// <param name="leds">The initial <see cref="Led"/> of this <see cref="ListLedGroup"/>.</param> /// <param name="leds">The initial <see cref="T:RGB.NET.Core.Led" /> of this <see cref="T:RGB.NET.Groups.ListLedGroup" />.</param>
public ListLedGroup(bool autoAttach, params Led[] leds) public ListLedGroup(bool autoAttach, params Led[] leds)
: base(autoAttach) : base(autoAttach)
{ {
AddLeds(leds); AddLeds(leds);
} }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ListLedGroup"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Groups.ListLedGroup" /> class.
/// </summary> /// </summary>
/// <param name="leds">The IDs of the initial <see cref="Led"/> of this <see cref="ListLedGroup"/>.</param> /// <param name="leds">The IDs of the initial <see cref="T:RGB.NET.Core.Led" /> of this <see cref="T:RGB.NET.Groups.ListLedGroup" />.</param>
public ListLedGroup(params ILedId[] leds) public ListLedGroup(params ILedId[] leds)
: this(true, leds) : this(true, leds)
{ } { }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ListLedGroup"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Groups.ListLedGroup" /> class.
/// </summary> /// </summary>
/// <param name="leds">The IDs of the initial <see cref="Led"/> of this <see cref="ListLedGroup"/>.</param> /// <param name="leds">The IDs of the initial <see cref="T:RGB.NET.Core.Led" /> of this <see cref="T:RGB.NET.Groups.ListLedGroup" />.</param>
public ListLedGroup(IEnumerable<ILedId> leds) public ListLedGroup(IEnumerable<ILedId> leds)
: this(true, leds) : this(true, leds)
{ } { }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ListLedGroup"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Groups.ListLedGroup" /> class.
/// </summary> /// </summary>
/// <param name="autoAttach">Specifies whether this <see cref="ListLedGroup"/> should be automatically attached or not.</param> /// <param name="autoAttach">Specifies whether this <see cref="T:RGB.NET.Groups.ListLedGroup" /> should be automatically attached or not.</param>
/// <param name="leds">The IDs of the initial <see cref="Led"/> of this <see cref="ListLedGroup"/>.</param> /// <param name="leds">The IDs of the initial <see cref="T:RGB.NET.Core.Led" /> of this <see cref="T:RGB.NET.Groups.ListLedGroup" />.</param>
public ListLedGroup(bool autoAttach, params ILedId[] leds) public ListLedGroup(bool autoAttach, params ILedId[] leds)
: base(autoAttach) : base(autoAttach)
{ {
AddLeds(leds); AddLeds(leds);
} }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ListLedGroup"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Groups.ListLedGroup" /> class.
/// </summary> /// </summary>
/// <param name="autoAttach">Specifies whether this <see cref="ListLedGroup"/> should be automatically attached or not.</param> /// <param name="autoAttach">Specifies whether this <see cref="T:RGB.NET.Groups.ListLedGroup" /> should be automatically attached or not.</param>
/// <param name="leds">The IDs of the initial <see cref="Led"/> of this <see cref="ListLedGroup"/>.</param> /// <param name="leds">The IDs of the initial <see cref="T:RGB.NET.Core.Led" /> of this <see cref="T:RGB.NET.Groups.ListLedGroup" />.</param>
public ListLedGroup(bool autoAttach, IEnumerable<ILedId> leds) public ListLedGroup(bool autoAttach, IEnumerable<ILedId> leds)
: base(autoAttach) : base(autoAttach)
{ {
@ -227,10 +237,11 @@ namespace RGB.NET.Groups
GroupLeds.Add(led); GroupLeds.Add(led);
} }
/// <inheritdoc />
/// <summary> /// <summary>
/// Gets a list containing the <see cref="Led"/> from this group. /// Gets a list containing the <see cref="T:RGB.NET.Core.Led" /> from this group.
/// </summary> /// </summary>
/// <returns>The list containing the <see cref="Led"/>.</returns> /// <returns>The list containing the <see cref="T:RGB.NET.Core.Led" />.</returns>
public override IEnumerable<Led> GetLeds() public override IEnumerable<Led> GetLeds()
{ {
return GroupLeds; return GroupLeds;

View File

@ -9,8 +9,9 @@ using RGB.NET.Core;
namespace RGB.NET.Groups namespace RGB.NET.Groups
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Represents a <see cref="RectangleLedGroup"/> containing <see cref="Led"/> which physically lay inside a <see cref="Core.Rectangle"/>. /// Represents a <see cref="T:RGB.NET.Groups.RectangleLedGroup" /> containing <see cref="T:RGB.NET.Core.Led" /> which physically lay inside a <see cref="T:RGB.NET.Core.Rectangle" />.
/// </summary> /// </summary>
public class RectangleLedGroup : AbstractLedGroup public class RectangleLedGroup : AbstractLedGroup
{ {
@ -59,45 +60,49 @@ namespace RGB.NET.Groups
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="RectangleLedGroup"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Groups.RectangleLedGroup" /> class.
/// </summary> /// </summary>
/// <param name="fromLed">They ID of the first <see cref="Led"/> to calculate the <see cref="Core.Rectangle"/> of this <see cref="RectangleLedGroup"/> from.</param> /// <param name="fromLed">They ID of the first <see cref="T:RGB.NET.Core.Led" /> to calculate the <see cref="T:RGB.NET.Core.Rectangle" /> of this <see cref="T:RGB.NET.Groups.RectangleLedGroup" /> from.</param>
/// <param name="toLed">They ID of the second <see cref="Led"/> to calculate the <see cref="Core.Rectangle"/> of this <see cref="RectangleLedGroup"/> from.</param> /// <param name="toLed">They ID of the second <see cref="T:RGB.NET.Core.Led" /> to calculate the <see cref="T:RGB.NET.Core.Rectangle" /> of this <see cref="T:RGB.NET.Groups.RectangleLedGroup" /> from.</param>
/// <param name="minOverlayPercentage">(optional) The minimal percentage overlay a <see cref="Led"/> must have with the <see cref="Rectangle" /> to be taken into the <see cref="RectangleLedGroup"/>. (default: 0.5)</param> /// <param name="minOverlayPercentage">(optional) The minimal percentage overlay a <see cref="T:RGB.NET.Core.Led" /> must have with the <see cref="P:RGB.NET.Groups.RectangleLedGroup.Rectangle" /> to be taken into the <see cref="T:RGB.NET.Groups.RectangleLedGroup" />. (default: 0.5)</param>
/// <param name="autoAttach">(optional) Specifies whether this <see cref="RectangleLedGroup"/> should be automatically attached or not. (default: true)</param> /// <param name="autoAttach">(optional) Specifies whether this <see cref="T:RGB.NET.Groups.RectangleLedGroup" /> should be automatically attached or not. (default: true)</param>
public RectangleLedGroup(ILedId fromLed, ILedId toLed, double minOverlayPercentage = 0.5, bool autoAttach = true) public RectangleLedGroup(ILedId fromLed, ILedId toLed, double minOverlayPercentage = 0.5, bool autoAttach = true)
: this(fromLed.Device[fromLed], toLed.Device[toLed], minOverlayPercentage, autoAttach) : this(fromLed.Device[fromLed], toLed.Device[toLed], minOverlayPercentage, autoAttach)
{ } { }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="RectangleLedGroup"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Groups.RectangleLedGroup" /> class.
/// </summary> /// </summary>
/// <param name="fromLed">They first <see cref="Led"/> to calculate the <see cref="Core.Rectangle"/> of this <see cref="RectangleLedGroup"/> from.</param> /// <param name="fromLed">They first <see cref="T:RGB.NET.Core.Led" /> to calculate the <see cref="T:RGB.NET.Core.Rectangle" /> of this <see cref="T:RGB.NET.Groups.RectangleLedGroup" /> from.</param>
/// <param name="toLed">They second <see cref="Led"/> to calculate the <see cref="Core.Rectangle"/> of this <see cref="RectangleLedGroup"/> from.</param> /// <param name="toLed">They second <see cref="T:RGB.NET.Core.Led" /> to calculate the <see cref="T:RGB.NET.Core.Rectangle" /> of this <see cref="T:RGB.NET.Groups.RectangleLedGroup" /> from.</param>
/// <param name="minOverlayPercentage">(optional) The minimal percentage overlay a <see cref="Led"/> must have with the <see cref="Rectangle" /> to be taken into the <see cref="RectangleLedGroup"/>. (default: 0.5)</param> /// <param name="minOverlayPercentage">(optional) The minimal percentage overlay a <see cref="T:RGB.NET.Core.Led" /> must have with the <see cref="P:RGB.NET.Groups.RectangleLedGroup.Rectangle" /> to be taken into the <see cref="T:RGB.NET.Groups.RectangleLedGroup" />. (default: 0.5)</param>
/// <param name="autoAttach">(optional) Specifies whether this <see cref="RectangleLedGroup"/> should be automatically attached or not. (default: true)</param> /// <param name="autoAttach">(optional) Specifies whether this <see cref="T:RGB.NET.Groups.RectangleLedGroup" /> should be automatically attached or not. (default: true)</param>
public RectangleLedGroup(Led fromLed, Led toLed, double minOverlayPercentage = 0.5, bool autoAttach = true) public RectangleLedGroup(Led fromLed, Led toLed, double minOverlayPercentage = 0.5, bool autoAttach = true)
: this(new Rectangle(fromLed.LedRectangle, toLed.LedRectangle), minOverlayPercentage, autoAttach) : this(new Rectangle(fromLed.LedRectangle, toLed.LedRectangle), minOverlayPercentage, autoAttach)
{ } { }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="RectangleLedGroup"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Groups.RectangleLedGroup" /> class.
/// </summary> /// </summary>
/// <param name="fromPoint">They first point to calculate the <see cref="Core.Rectangle"/> of this <see cref="RectangleLedGroup"/> from.</param> /// <param name="fromPoint">They first point to calculate the <see cref="T:RGB.NET.Core.Rectangle" /> of this <see cref="T:RGB.NET.Groups.RectangleLedGroup" /> from.</param>
/// <param name="toPoint">They second point to calculate the <see cref="Core.Rectangle"/> of this <see cref="RectangleLedGroup"/> from.</param> /// <param name="toPoint">They second point to calculate the <see cref="T:RGB.NET.Core.Rectangle" /> of this <see cref="T:RGB.NET.Groups.RectangleLedGroup" /> from.</param>
/// <param name="minOverlayPercentage">(optional) The minimal percentage overlay a <see cref="Led"/> must have with the <see cref="Rectangle" /> to be taken into the <see cref="RectangleLedGroup"/>. (default: 0.5)</param> /// <param name="minOverlayPercentage">(optional) The minimal percentage overlay a <see cref="T:RGB.NET.Core.Led" /> must have with the <see cref="P:RGB.NET.Groups.RectangleLedGroup.Rectangle" /> to be taken into the <see cref="T:RGB.NET.Groups.RectangleLedGroup" />. (default: 0.5)</param>
/// <param name="autoAttach">(optional) Specifies whether this <see cref="RectangleLedGroup"/> should be automatically attached or not. (default: true)</param> /// <param name="autoAttach">(optional) Specifies whether this <see cref="T:RGB.NET.Groups.RectangleLedGroup" /> should be automatically attached or not. (default: true)</param>
public RectangleLedGroup(Point fromPoint, Point toPoint, double minOverlayPercentage = 0.5, bool autoAttach = true) public RectangleLedGroup(Point fromPoint, Point toPoint, double minOverlayPercentage = 0.5, bool autoAttach = true)
: this(new Rectangle(fromPoint, toPoint), minOverlayPercentage, autoAttach) : this(new Rectangle(fromPoint, toPoint), minOverlayPercentage, autoAttach)
{ } { }
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="RectangleLedGroup"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.Groups.RectangleLedGroup" /> class.
/// </summary> /// </summary>
/// <param name="rectangle">The <see cref="Core.Rectangle"/> of this <see cref="RectangleLedGroup"/>.</param> /// <param name="rectangle">The <see cref="T:RGB.NET.Core.Rectangle" /> of this <see cref="T:RGB.NET.Groups.RectangleLedGroup" />.</param>
/// <param name="minOverlayPercentage">(optional) The minimal percentage overlay a <see cref="Led"/> must have with the <see cref="Rectangle" /> to be taken into the <see cref="RectangleLedGroup"/>. (default: 0.5)</param> /// <param name="minOverlayPercentage">(optional) The minimal percentage overlay a <see cref="T:RGB.NET.Core.Led" /> must have with the <see cref="P:RGB.NET.Groups.RectangleLedGroup.Rectangle" /> to be taken into the <see cref="T:RGB.NET.Groups.RectangleLedGroup" />. (default: 0.5)</param>
/// <param name="autoAttach">(optional) Specifies whether this <see cref="RectangleLedGroup"/> should be automatically attached or not. (default: true)</param> /// <param name="autoAttach">(optional) Specifies whether this <see cref="T:RGB.NET.Groups.RectangleLedGroup" /> should be automatically attached or not. (default: true)</param>
public RectangleLedGroup(Rectangle rectangle, double minOverlayPercentage = 0.5, bool autoAttach = true) public RectangleLedGroup(Rectangle rectangle, double minOverlayPercentage = 0.5, bool autoAttach = true)
: base(autoAttach) : base(autoAttach)
{ {
@ -119,10 +124,11 @@ namespace RGB.NET.Groups
private void RectangleChanged(object sender, EventArgs eventArgs) => InvalidateCache(); private void RectangleChanged(object sender, EventArgs eventArgs) => InvalidateCache();
/// <inheritdoc />
/// <summary> /// <summary>
/// Gets a list containing all <see cref="Led"/> of this <see cref="RectangleLedGroup"/>. /// Gets a list containing all <see cref="T:RGB.NET.Core.Led" /> of this <see cref="T:RGB.NET.Groups.RectangleLedGroup" />.
/// </summary> /// </summary>
/// <returns>The list containing all <see cref="Led"/> of this <see cref="RectangleLedGroup"/>.</returns> /// <returns>The list containing all <see cref="T:RGB.NET.Core.Led" /> of this <see cref="T:RGB.NET.Groups.RectangleLedGroup" />.</returns>
public override IEnumerable<Led> GetLeds() => _ledCache ?? (_ledCache = RGBSurface.Instance.Leds.Where(x => x.LedRectangle.CalculateIntersectPercentage(Rectangle) >= MinOverlayPercentage).ToList()); public override IEnumerable<Led> GetLeds() => _ledCache ?? (_ledCache = RGBSurface.Instance.Leds.Where(x => x.LedRectangle.CalculateIntersectPercentage(Rectangle) >= MinOverlayPercentage).ToList());
private void InvalidateCache() => _ledCache = null; private void InvalidateCache() => _ledCache = null;

View File

@ -4,8 +4,9 @@ using RGB.NET.Core;
namespace RGB.NET.WPF.Controls namespace RGB.NET.WPF.Controls
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Visualizes a <see cref="Core.Led"/> in an wpf-application. /// Visualizes a <see cref="T:RGB.NET.Core.Led" /> in an wpf-application.
/// </summary> /// </summary>
public class LedVisualizer : Control public class LedVisualizer : Control
{ {

View File

@ -4,8 +4,9 @@ using RGB.NET.Core;
namespace RGB.NET.WPF.Controls namespace RGB.NET.WPF.Controls
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Visualizes a <see cref="IRGBDevice"/> in an wpf-application. /// Visualizes a <see cref="T:RGB.NET.Core.IRGBDevice" /> in an wpf-application.
/// </summary> /// </summary>
[TemplatePart(Name = PART_CANVAS, Type = typeof(Canvas))] [TemplatePart(Name = PART_CANVAS, Type = typeof(Canvas))]
public class RGBDeviceVisualizer : Control public class RGBDeviceVisualizer : Control

View File

@ -5,8 +5,9 @@ using RGB.NET.Core;
namespace RGB.NET.WPF.Controls namespace RGB.NET.WPF.Controls
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Visualizes the <see cref="RGBSurface"/> in an wpf-application. /// Visualizes the <see cref="T:RGB.NET.Core.RGBSurface" /> in an wpf-application.
/// </summary> /// </summary>
[TemplatePart(Name = PART_CANVAS, Type = typeof(Canvas))] [TemplatePart(Name = PART_CANVAS, Type = typeof(Canvas))]
public class RGBSurfaceVisualizer : Control public class RGBSurfaceVisualizer : Control
@ -29,8 +30,9 @@ namespace RGB.NET.WPF.Controls
#region Constructors #region Constructors
/// <inheritdoc />
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="RGBSurfaceVisualizer"/> class. /// Initializes a new instance of the <see cref="T:RGB.NET.WPF.Controls.RGBSurfaceVisualizer" /> class.
/// </summary> /// </summary>
public RGBSurfaceVisualizer() public RGBSurfaceVisualizer()
{ {

View File

@ -5,8 +5,9 @@ using System.Windows.Media;
namespace RGB.NET.WPF.Converter namespace RGB.NET.WPF.Converter
{ {
/// <inheritdoc />
/// <summary> /// <summary>
/// Converts <see cref="Core.Color"/> into <see cref="SolidColorBrush"/>. /// Converts <see cref="T:RGB.NET.Core.Color" /> into <see cref="T:System.Windows.Media.SolidColorBrush" />.
/// </summary> /// </summary>
[ValueConversion(typeof(Core.Color), typeof(SolidColorBrush))] [ValueConversion(typeof(Core.Color), typeof(SolidColorBrush))]
public class ColorToSolidColorBrushConverter : IValueConverter public class ColorToSolidColorBrushConverter : IValueConverter
@ -23,8 +24,7 @@ namespace RGB.NET.WPF.Converter
/// <inheritdoc /> /// <inheritdoc />
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{ {
SolidColorBrush brush = value as SolidColorBrush; return !(value is SolidColorBrush brush)
return brush == null
? Core.Color.Transparent ? Core.Color.Transparent
: new Core.Color(brush.Color.A, brush.Color.R, brush.Color.G, brush.Color.B); : new Core.Color(brush.Color.A, brush.Color.R, brush.Color.G, brush.Color.B);
} }