diff --git a/RGB.NET.Brushes/Brushes/ConicalGradientBrush.cs b/RGB.NET.Brushes/Brushes/ConicalGradientBrush.cs index c391f3c..c106507 100644 --- a/RGB.NET.Brushes/Brushes/ConicalGradientBrush.cs +++ b/RGB.NET.Brushes/Brushes/ConicalGradientBrush.cs @@ -10,6 +10,7 @@ using RGB.NET.Core; namespace RGB.NET.Brushes { + /// /// /// Represents a brush drawing a conical gradient. /// @@ -27,6 +28,7 @@ namespace RGB.NET.Brushes /// public Point Center { get; set; } = new Point(0.5, 0.5); + /// /// /// Gets or sets the gradient drawn by the brush. If null it will default to full transparent. /// @@ -36,38 +38,42 @@ namespace RGB.NET.Brushes #region Constructors + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// public ConicalGradientBrush() { } + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// The drawn by this . + /// The drawn by this . public ConicalGradientBrush(IGradient gradient) { this.Gradient = gradient; } + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// The center (as percentage in the range [0..1]). - /// The drawn by this . + /// The center (as percentage in the range [0..1]). + /// The drawn by this . public ConicalGradientBrush(Point center, IGradient gradient) { this.Center = center; this.Gradient = gradient; } + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// The center (as percentage in the range [0..1]). - /// The origin (radian-angle) the is drawn to. - /// The drawn by this . + /// The center (as percentage in the range [0..1]). + /// The origin (radian-angle) the is drawn to. + /// The drawn by this . public ConicalGradientBrush(Point center, float origin, IGradient gradient) { this.Center = center; diff --git a/RGB.NET.Brushes/Brushes/IGradientBrush.cs b/RGB.NET.Brushes/Brushes/IGradientBrush.cs index 5e111c1..5677154 100644 --- a/RGB.NET.Brushes/Brushes/IGradientBrush.cs +++ b/RGB.NET.Brushes/Brushes/IGradientBrush.cs @@ -3,6 +3,7 @@ using RGB.NET.Core; namespace RGB.NET.Brushes { + /// /// /// Represents a basic gradient-brush. /// diff --git a/RGB.NET.Brushes/Brushes/LinearGradientBrush.cs b/RGB.NET.Brushes/Brushes/LinearGradientBrush.cs index 1b178c0..2937697 100644 --- a/RGB.NET.Brushes/Brushes/LinearGradientBrush.cs +++ b/RGB.NET.Brushes/Brushes/LinearGradientBrush.cs @@ -11,6 +11,7 @@ using RGB.NET.Core; namespace RGB.NET.Brushes { + /// /// /// Represents a brush drawing a linear gradient. /// @@ -35,26 +36,29 @@ namespace RGB.NET.Brushes #region Constructor + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// public LinearGradientBrush() { } + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// The drawn by this . + /// The drawn by this . public LinearGradientBrush(IGradient gradient) { this.Gradient = gradient; } + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// The start (as percentage in the range [0..1]). - /// The end (as percentage in the range [0..1]). - /// The drawn by this . + /// The start (as percentage in the range [0..1]). + /// The end (as percentage in the range [0..1]). + /// The drawn by this . public LinearGradientBrush(Point startPoint, Point endPoint, IGradient gradient) { this.StartPoint = startPoint; @@ -66,6 +70,7 @@ namespace RGB.NET.Brushes #region Methods + /// /// /// Gets the color at an specific point assuming the brush is drawn into the given rectangle. /// diff --git a/RGB.NET.Brushes/Brushes/RadialGradientBrush.cs b/RGB.NET.Brushes/Brushes/RadialGradientBrush.cs index 6812134..83ca74e 100644 --- a/RGB.NET.Brushes/Brushes/RadialGradientBrush.cs +++ b/RGB.NET.Brushes/Brushes/RadialGradientBrush.cs @@ -9,6 +9,7 @@ using RGB.NET.Core; namespace RGB.NET.Brushes { + /// /// /// Represents a brush drawing a radial gradient around a center point. /// @@ -28,14 +29,16 @@ namespace RGB.NET.Brushes #region Constructors + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// public RadialGradientBrush() { } + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The gradient drawn by the brush. public RadialGradientBrush(IGradient gradient) @@ -43,8 +46,9 @@ namespace RGB.NET.Brushes this.Gradient = gradient; } + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The center point (as percentage in the range [0..1]). /// The gradient drawn by the brush. diff --git a/RGB.NET.Brushes/Brushes/SolidColorBrush.cs b/RGB.NET.Brushes/Brushes/SolidColorBrush.cs index 03952d7..6373d61 100644 --- a/RGB.NET.Brushes/Brushes/SolidColorBrush.cs +++ b/RGB.NET.Brushes/Brushes/SolidColorBrush.cs @@ -5,6 +5,7 @@ using RGB.NET.Core; namespace RGB.NET.Brushes { + /// /// /// Represents a brush drawing only a single color. /// @@ -21,10 +22,11 @@ namespace RGB.NET.Brushes #region Constructors + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// The drawn by this . + /// The drawn by this . public SolidColorBrush(Color color) { this.Color = color; diff --git a/RGB.NET.Brushes/Decorators/IGradientDecorator.cs b/RGB.NET.Brushes/Decorators/IGradientDecorator.cs index e504306..86c07de 100644 --- a/RGB.NET.Brushes/Decorators/IGradientDecorator.cs +++ b/RGB.NET.Brushes/Decorators/IGradientDecorator.cs @@ -1,10 +1,10 @@ -using RGB.NET.Brushes.Gradients; -using RGB.NET.Core; +using RGB.NET.Core; namespace RGB.NET.Brushes { + /// /// - /// Represents a basic decorator decorating a . + /// Represents a basic decorator decorating a . /// public interface IGradientDecorator : IDecorator { } diff --git a/RGB.NET.Brushes/Gradients/AbstractGradient.cs b/RGB.NET.Brushes/Gradients/AbstractGradient.cs index 6cdb4e8..0437993 100644 --- a/RGB.NET.Brushes/Gradients/AbstractGradient.cs +++ b/RGB.NET.Brushes/Gradients/AbstractGradient.cs @@ -8,6 +8,7 @@ using RGB.NET.Core; namespace RGB.NET.Brushes.Gradients { + /// /// /// Represents a basic gradient. /// diff --git a/RGB.NET.Brushes/Gradients/IGradient.cs b/RGB.NET.Brushes/Gradients/IGradient.cs index 17f8e8d..7ccc77f 100644 --- a/RGB.NET.Brushes/Gradients/IGradient.cs +++ b/RGB.NET.Brushes/Gradients/IGradient.cs @@ -2,6 +2,7 @@ namespace RGB.NET.Brushes.Gradients { + /// /// /// Represents a basic gradient. /// diff --git a/RGB.NET.Brushes/Gradients/LinearGradient.cs b/RGB.NET.Brushes/Gradients/LinearGradient.cs index 0392056..0b1dc38 100644 --- a/RGB.NET.Brushes/Gradients/LinearGradient.cs +++ b/RGB.NET.Brushes/Gradients/LinearGradient.cs @@ -6,6 +6,7 @@ using RGB.NET.Core; namespace RGB.NET.Brushes.Gradients { + /// /// /// Represents a linear interpolated gradient with n stops. /// @@ -13,24 +14,27 @@ namespace RGB.NET.Brushes.Gradients { #region Constructors + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// public LinearGradient() { } + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The stops with which the gradient should be initialized. public LinearGradient(params GradientStop[] gradientStops) : base(gradientStops) { } + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// Specifies whether the gradient should wrapp or not (see for an example of what this means). + /// Specifies whether the gradient should wrapp or not (see for an example of what this means). /// The stops with which the gradient should be initialized. public LinearGradient(bool wrapGradient, params GradientStop[] gradientStops) : base(wrapGradient, gradientStops) @@ -40,11 +44,12 @@ namespace RGB.NET.Brushes.Gradients #region Methods + /// /// - /// Gets the linear interpolated at the given offset. + /// Gets the linear interpolated at the given offset. /// /// The percentage offset to take the color from. - /// The at the specific offset. + /// The at the specific offset. public override Color GetColor(double offset) { if (GradientStops.Count == 0) return Color.Transparent; diff --git a/RGB.NET.Brushes/Gradients/RainbowGradient.cs b/RGB.NET.Brushes/Gradients/RainbowGradient.cs index 8deabfd..1064318 100644 --- a/RGB.NET.Brushes/Gradients/RainbowGradient.cs +++ b/RGB.NET.Brushes/Gradients/RainbowGradient.cs @@ -5,6 +5,7 @@ using RGB.NET.Core; namespace RGB.NET.Brushes.Gradients { + /// /// /// Represents a rainbow gradient which circles through all colors of the HUE-color-space.
/// See as reference. @@ -42,6 +43,7 @@ namespace RGB.NET.Brushes.Gradients #region Methods + /// /// /// Gets the color on the rainbow at the given offset. /// diff --git a/RGB.NET.Core/Brushes/AbstractBrush.cs b/RGB.NET.Core/Brushes/AbstractBrush.cs index 25e02ec..d490e0c 100644 --- a/RGB.NET.Core/Brushes/AbstractBrush.cs +++ b/RGB.NET.Core/Brushes/AbstractBrush.cs @@ -2,12 +2,12 @@ // ReSharper disable MemberCanBePrivate.Global // ReSharper disable VirtualMemberNeverOverridden.Global -using System; using System.Collections.Generic; using System.Linq; namespace RGB.NET.Core { + /// /// /// Represents a basic brush. /// diff --git a/RGB.NET.Core/Decorators/AbstractUpdateAwareDecorator.cs b/RGB.NET.Core/Decorators/AbstractUpdateAwareDecorator.cs index 6035a0b..98e64b2 100644 --- a/RGB.NET.Core/Decorators/AbstractUpdateAwareDecorator.cs +++ b/RGB.NET.Core/Decorators/AbstractUpdateAwareDecorator.cs @@ -1,7 +1,8 @@ namespace RGB.NET.Core { + /// /// - /// Represents a basic decorator which is aware of the event. + /// Represents a basic decorator which is aware of the event. /// public abstract class AbstractUpdateAwareDecorator : AbstractDecorator { @@ -20,7 +21,7 @@ /// Initializes a new instance of the class. ///
/// Bool indicating if the should call even if the Decorator is disabled. - public AbstractUpdateAwareDecorator(bool updateIfDisabled = false) + protected AbstractUpdateAwareDecorator(bool updateIfDisabled = false) { this.UpdateIfDisabled = updateIfDisabled; } diff --git a/RGB.NET.Core/Decorators/ILedGroupDecorator.cs b/RGB.NET.Core/Decorators/ILedGroupDecorator.cs index 15b30bf..e893de7 100644 --- a/RGB.NET.Core/Decorators/ILedGroupDecorator.cs +++ b/RGB.NET.Core/Decorators/ILedGroupDecorator.cs @@ -1,7 +1,8 @@ namespace RGB.NET.Core { + /// /// - /// Represents a basic decorator decorating a . + /// Represents a basic decorator decorating a . /// public interface ILedGroupDecorator : IDecorator { } diff --git a/RGB.NET.Core/Devices/AbstractRGBDevice.cs b/RGB.NET.Core/Devices/AbstractRGBDevice.cs index c131a3a..701788f 100644 --- a/RGB.NET.Core/Devices/AbstractRGBDevice.cs +++ b/RGB.NET.Core/Devices/AbstractRGBDevice.cs @@ -8,6 +8,7 @@ using System.Linq; namespace RGB.NET.Core { + /// /// /// Represents a generic RGB-device /// @@ -57,14 +58,7 @@ namespace RGB.NET.Core #region Indexer /// - Led IRGBDevice.this[ILedId ledId] - { - get - { - Led led; - return LedMapping.TryGetValue(ledId, out led) ? led : null; - } - } + Led IRGBDevice.this[ILedId ledId] => LedMapping.TryGetValue(ledId, out Led led) ? led : null; /// Led IRGBDevice.this[Point location] => LedMapping.Values.FirstOrDefault(x => x.LedRectangle.Contains(location)); @@ -138,19 +132,21 @@ namespace RGB.NET.Core #region Enumerator + /// /// - /// Returns an enumerator that iterates over all of the . + /// Returns an enumerator that iterates over all of the . /// - /// An enumerator for all of the . + /// An enumerator for all of the . public IEnumerator GetEnumerator() { return LedMapping.Values.GetEnumerator(); } + /// /// - /// Returns an enumerator that iterates over all of the . + /// Returns an enumerator that iterates over all of the . /// - /// An enumerator for all of the . + /// An enumerator for all of the . IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); diff --git a/RGB.NET.Core/Devices/IRGBDevice.cs b/RGB.NET.Core/Devices/IRGBDevice.cs index 57dcc3b..216dc4e 100644 --- a/RGB.NET.Core/Devices/IRGBDevice.cs +++ b/RGB.NET.Core/Devices/IRGBDevice.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; namespace RGB.NET.Core { + /// /// /// Represents a generic RGB-device /// diff --git a/RGB.NET.Core/Devices/IRGBDeviceSpecialPart.cs b/RGB.NET.Core/Devices/IRGBDeviceSpecialPart.cs index 755b46a..58c4e37 100644 --- a/RGB.NET.Core/Devices/IRGBDeviceSpecialPart.cs +++ b/RGB.NET.Core/Devices/IRGBDeviceSpecialPart.cs @@ -2,8 +2,9 @@ namespace RGB.NET.Core { + /// /// - /// Represents a special part of a . + /// Represents a special part of a . /// public interface IRGBDeviceSpecialPart : IEnumerable { } diff --git a/RGB.NET.Core/Devices/Layout/LedLayout.cs b/RGB.NET.Core/Devices/Layout/LedLayout.cs index deee551..c382520 100644 --- a/RGB.NET.Core/Devices/Layout/LedLayout.cs +++ b/RGB.NET.Core/Devices/Layout/LedLayout.cs @@ -107,8 +107,7 @@ namespace RGB.NET.Core.Layout /// The previously calculated. public void CalculateValues(DeviceLayout device, LedLayout lastLed) { - Shape shape; - if (!Enum.TryParse(DescriptiveShape, true, out shape)) + if (!Enum.TryParse(DescriptiveShape, true, out Shape shape)) { shape = Shape.Custom; ShapeData = DescriptiveShape; diff --git a/RGB.NET.Core/Events/ExceptionEventArgs.cs b/RGB.NET.Core/Events/ExceptionEventArgs.cs index baa1e77..01e58ae 100644 --- a/RGB.NET.Core/Events/ExceptionEventArgs.cs +++ b/RGB.NET.Core/Events/ExceptionEventArgs.cs @@ -5,8 +5,9 @@ using System; namespace RGB.NET.Core { + /// /// - /// Represents the information supplied with an -event. + /// Represents the information supplied with an -event. /// public class ExceptionEventArgs : EventArgs { @@ -21,10 +22,11 @@ namespace RGB.NET.Core #region Constructors + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// The which is responsible for the event-call. + /// The which is responsible for the event-call. public ExceptionEventArgs(Exception exception) { this.Exception = exception; diff --git a/RGB.NET.Core/Events/SurfaceLayoutChangedEventArgs.cs b/RGB.NET.Core/Events/SurfaceLayoutChangedEventArgs.cs index 3a94aa7..5e4840a 100644 --- a/RGB.NET.Core/Events/SurfaceLayoutChangedEventArgs.cs +++ b/RGB.NET.Core/Events/SurfaceLayoutChangedEventArgs.cs @@ -6,8 +6,9 @@ using System.Collections.Generic; namespace RGB.NET.Core { + /// /// - /// Represents the information supplied with an -event. + /// Represents the information supplied with an -event. /// public class SurfaceLayoutChangedEventArgs : EventArgs { @@ -32,12 +33,13 @@ namespace RGB.NET.Core #region Constructors + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// The that caused the change. - /// A value indicating if the event is caused by the addition of a new to the . - /// A value indicating if the event is caused by a changed location of one of the devices on the . + /// The that caused the change. + /// A value indicating if the event is caused by the addition of a new to the . + /// A value indicating if the event is caused by a changed location of one of the devices on the . public SurfaceLayoutChangedEventArgs(IEnumerable devices, bool deviceAdded, bool deviceLocationChanged) { this.Devices = devices; diff --git a/RGB.NET.Core/Events/UpdatedEventArgs.cs b/RGB.NET.Core/Events/UpdatedEventArgs.cs index e8daac7..fe2c4e6 100644 --- a/RGB.NET.Core/Events/UpdatedEventArgs.cs +++ b/RGB.NET.Core/Events/UpdatedEventArgs.cs @@ -2,8 +2,9 @@ namespace RGB.NET.Core { + /// /// - /// Represents the information supplied with an -event. + /// Represents the information supplied with an -event. /// public class UpdatedEventArgs : EventArgs { } diff --git a/RGB.NET.Core/Events/UpdatingEventArgs.cs b/RGB.NET.Core/Events/UpdatingEventArgs.cs index dfc2752..e905f31 100644 --- a/RGB.NET.Core/Events/UpdatingEventArgs.cs +++ b/RGB.NET.Core/Events/UpdatingEventArgs.cs @@ -5,8 +5,9 @@ using System; namespace RGB.NET.Core { + /// /// - /// Represents the information supplied with an -event. + /// Represents the information supplied with an -event. /// public class UpdatingEventArgs : EventArgs { @@ -21,8 +22,9 @@ namespace RGB.NET.Core #region Constructors + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The elapsed time (in seconds) since the last update. public UpdatingEventArgs(double deltaTime) diff --git a/RGB.NET.Core/Exceptions/RGBDeviceException.cs b/RGB.NET.Core/Exceptions/RGBDeviceException.cs index 1e222b3..626b423 100644 --- a/RGB.NET.Core/Exceptions/RGBDeviceException.cs +++ b/RGB.NET.Core/Exceptions/RGBDeviceException.cs @@ -2,15 +2,17 @@ namespace RGB.NET.Core.Exceptions { + /// /// - /// Represents an exception thrown by an . + /// Represents an exception thrown by an . /// public class RGBDeviceException : ApplicationException { #region Constructors + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The message which describes the reason of throwing this exception. /// Optional inner exception, which lead to this exception. diff --git a/RGB.NET.Core/Groups/AbstractLedGroup.cs b/RGB.NET.Core/Groups/AbstractLedGroup.cs index 336cdfd..bb3b561 100644 --- a/RGB.NET.Core/Groups/AbstractLedGroup.cs +++ b/RGB.NET.Core/Groups/AbstractLedGroup.cs @@ -2,8 +2,9 @@ namespace RGB.NET.Core { + /// /// - /// Represents a generic . + /// Represents a generic . /// public abstract class AbstractLedGroup : AbstractDecoratable, ILedGroup { diff --git a/RGB.NET.Core/Groups/ILedGroup.cs b/RGB.NET.Core/Groups/ILedGroup.cs index 7efcfe2..6869d0e 100644 --- a/RGB.NET.Core/Groups/ILedGroup.cs +++ b/RGB.NET.Core/Groups/ILedGroup.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; namespace RGB.NET.Core { + /// /// /// Represents a generic ledgroup. /// diff --git a/RGB.NET.Core/Leds/Color.cs b/RGB.NET.Core/Leds/Color.cs index 5ca0b81..c7391ac 100644 --- a/RGB.NET.Core/Leds/Color.cs +++ b/RGB.NET.Core/Leds/Color.cs @@ -6,6 +6,7 @@ using System.Diagnostics; namespace RGB.NET.Core { + /// /// /// Represents an ARGB (alpha, red, green, blue) color. /// @@ -184,21 +185,23 @@ namespace RGB.NET.Core #region Constructors + /// /// - /// Initializes a new instance of the class. - /// The class created by this constructor equals . + /// Initializes a new instance of the class. + /// The class created by this constructor equals . /// public Color() : this(0, 0, 0, 0) { } + /// /// - /// Initializes a new instance of the class using only RGB-Values. + /// Initializes a new instance of the class using only RGB-Values. /// Alpha defaults to 255. /// - /// The red component value of this . - /// The green component value of this . - /// The blue component value of this . + /// The red component value of this . + /// The green component value of this . + /// The blue component value of this . public Color(byte r, byte g, byte b) : this(255, r, g, b) { } @@ -218,13 +221,14 @@ namespace RGB.NET.Core this.B = b; } + /// /// - /// Initializes a new instance of the class using only RGB-Values. + /// Initializes a new instance of the class using only RGB-Values. /// Alpha defaults to 255. /// - /// The hue component value of this . - /// The saturation component value of this . - /// The value component value of this . + /// The hue component value of this . + /// The saturation component value of this . + /// The value component value of this . public Color(double hue, double saturation, double value) : this(255, hue, saturation, value) { } @@ -254,10 +258,11 @@ namespace RGB.NET.Core UpdateRGBFromHSV(); } + /// /// - /// Initializes a new instance of the class by cloning a existing . + /// Initializes a new instance of the class by cloning a existing . /// - /// The the values are copied from. + /// The the values are copied from. public Color(Color color) : this(color.A, color.R, color.G, color.B) { } diff --git a/RGB.NET.Core/Leds/Led.cs b/RGB.NET.Core/Leds/Led.cs index 679f08e..5854bf6 100644 --- a/RGB.NET.Core/Leds/Led.cs +++ b/RGB.NET.Core/Leds/Led.cs @@ -5,6 +5,7 @@ using System.Diagnostics; namespace RGB.NET.Core { + /// /// /// Represents a single LED of a RGB-device. /// diff --git a/RGB.NET.Core/MVVM/AbstractBindable.cs b/RGB.NET.Core/MVVM/AbstractBindable.cs index 2efca52..ab36978 100644 --- a/RGB.NET.Core/MVVM/AbstractBindable.cs +++ b/RGB.NET.Core/MVVM/AbstractBindable.cs @@ -3,6 +3,7 @@ using System.Runtime.CompilerServices; namespace RGB.NET.Core { + /// /// /// Represents a basic bindable class which notifies when a property value changes. /// diff --git a/RGB.NET.Core/Positioning/Point.cs b/RGB.NET.Core/Positioning/Point.cs index caa2d88..0ca16a7 100644 --- a/RGB.NET.Core/Positioning/Point.cs +++ b/RGB.NET.Core/Positioning/Point.cs @@ -5,6 +5,7 @@ using System.Diagnostics; namespace RGB.NET.Core { + /// /// /// Represents a point consisting of a X- and a Y-position. /// diff --git a/RGB.NET.Core/Positioning/Rectangle.cs b/RGB.NET.Core/Positioning/Rectangle.cs index 3510422..d7bc89b 100644 --- a/RGB.NET.Core/Positioning/Rectangle.cs +++ b/RGB.NET.Core/Positioning/Rectangle.cs @@ -9,6 +9,7 @@ using System.Linq; namespace RGB.NET.Core { + /// /// /// Represents a rectangle defined by it's position and it's size. /// @@ -77,6 +78,7 @@ namespace RGB.NET.Core #endregion #region Events + // ReSharper disable EventNeverSubscribedTo.Global /// /// Occurs when a the of the changes. @@ -93,24 +95,27 @@ namespace RGB.NET.Core /// public event EventHandler Changed; + // ReSharper restore EventNeverSubscribedTo.Global #endregion #region Constructors + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// public Rectangle() : this(new Point(), new Size()) { } + /// /// - /// Initializes a new instance of the class using the provided values for ans . + /// Initializes a new instance of the class using the provided values for ans . /// - /// The -position of this . - /// The -position of this . - /// The of this . - /// The of this . + /// The -position of this . + /// The -position of this . + /// The of this . + /// The of this . public Rectangle(double x, double y, double width, double height) : this(new Point(x, y), new Size(width, height)) { } @@ -126,11 +131,12 @@ namespace RGB.NET.Core this.Size = size; } + /// /// - /// Initializes a new instance of the class using the given array of . - /// The and is calculated to completely contain all rectangles provided as parameters. + /// Initializes a new instance of the class using the given array of . + /// The and is calculated to completely contain all rectangles provided as parameters. /// - /// The array of used to calculate the and + /// The array of used to calculate the and public Rectangle(params Rectangle[] rectangles) : this(rectangles.AsEnumerable()) { } @@ -164,20 +170,22 @@ namespace RGB.NET.Core InitializeFromPoints(new Point(0, 0), new Point(0, 0)); } + /// /// - /// Initializes a new instance of the class using the given array of . - /// The and is calculated to contain all points provided as parameters. + /// Initializes a new instance of the class using the given array of . + /// The and is calculated to contain all points provided as parameters. /// - /// The array of used to calculate the and + /// The array of used to calculate the and public Rectangle(params Point[] points) : this(points.AsEnumerable()) { } + /// /// - /// Initializes a new instance of the class using the given list of . - /// The and is calculated to contain all points provided as parameters. + /// Initializes a new instance of the class using the given list of . + /// The and is calculated to contain all points provided as parameters. /// - /// The list of used to calculate the and + /// The list of used to calculate the and public Rectangle(IEnumerable points) : this() { diff --git a/RGB.NET.Core/Positioning/Size.cs b/RGB.NET.Core/Positioning/Size.cs index 4b7a33c..0e36567 100644 --- a/RGB.NET.Core/Positioning/Size.cs +++ b/RGB.NET.Core/Positioning/Size.cs @@ -5,6 +5,7 @@ using System.Diagnostics; namespace RGB.NET.Core { + /// /// /// Represents a size consisting of a width and a height. /// @@ -43,10 +44,11 @@ namespace RGB.NET.Core public Size() { } + /// /// - /// Initializes a new instance of the using the provided size to define a square. + /// Initializes a new instance of the using the provided size to define a square. /// - /// The size used for the component value and the component value. + /// The size used for the component value and the component value. public Size(double size) : this(size, size) { } diff --git a/RGB.NET.Core/RGBSurface.cs b/RGB.NET.Core/RGBSurface.cs index 8355bae..aa78480 100644 --- a/RGB.NET.Core/RGBSurface.cs +++ b/RGB.NET.Core/RGBSurface.cs @@ -8,6 +8,7 @@ using System.Linq; namespace RGB.NET.Core { + /// /// /// Represents a RGB-surface containing multiple devices. /// diff --git a/RGB.NET.Decorators/Brush/FlashDecorator.cs b/RGB.NET.Decorators/Brush/FlashDecorator.cs index 2c83bf8..526b30a 100644 --- a/RGB.NET.Decorators/Brush/FlashDecorator.cs +++ b/RGB.NET.Decorators/Brush/FlashDecorator.cs @@ -7,6 +7,7 @@ using RGB.NET.Core; namespace RGB.NET.Decorators.Brush { + /// /// /// Represents a decorator which allows to flash a brush by modifying his opacity. /// diff --git a/RGB.NET.Decorators/Gradient/MoveGradientDecorator.cs b/RGB.NET.Decorators/Gradient/MoveGradientDecorator.cs index 100a685..28df485 100644 --- a/RGB.NET.Decorators/Gradient/MoveGradientDecorator.cs +++ b/RGB.NET.Decorators/Gradient/MoveGradientDecorator.cs @@ -4,8 +4,9 @@ using RGB.NET.Core; namespace RGB.NET.Decorators.Gradient { + /// /// - /// Represents a decorator which allows to move an by modifying his offset. + /// Represents a decorator which allows to move an by modifying his offset. /// public class MoveGradientDecorator : AbstractUpdateAwareDecorator, IGradientDecorator { @@ -33,14 +34,15 @@ namespace RGB.NET.Decorators.Gradient #region Constructors + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The speed of the movement in units per second. - /// The meaning of units differs for the different but 360 units will always be one complete cycle: - /// : 360 unit = 1 offset. - /// : 1 unit = 1 degree. - /// The direction the is moved. + /// The meaning of units differs for the different but 360 units will always be one complete cycle: + /// : 360 unit = 1 offset. + /// : 1 unit = 1 degree. + /// The direction the is moved. /// True leads to an offset-increment (normaly moving to the right), false to an offset-decrement (normaly moving to the left). public MoveGradientDecorator(double speed = 180.0, bool direction = true) { diff --git a/RGB.NET.Decorators/Properties/AssemblyInfo.cs b/RGB.NET.Decorators/Properties/AssemblyInfo.cs index 78471f4..530f391 100644 --- a/RGB.NET.Decorators/Properties/AssemblyInfo.cs +++ b/RGB.NET.Decorators/Properties/AssemblyInfo.cs @@ -1,16 +1,15 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("RGB.NET.Decorators")] -[assembly: AssemblyDescription("")] +[assembly: AssemblyDescription("Decorator-Presets of RGB.NET")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] +[assembly: AssemblyCompany("Wyrez")] [assembly: AssemblyProduct("RGB.NET.Decorators")] -[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyCopyright("Copyright © Wyrez 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/RGB.NET.Devices.CoolerMaster/Attributes/DeviceTypeAttribute.cs b/RGB.NET.Devices.CoolerMaster/Attributes/DeviceTypeAttribute.cs index ae20a09..4367236 100644 --- a/RGB.NET.Devices.CoolerMaster/Attributes/DeviceTypeAttribute.cs +++ b/RGB.NET.Devices.CoolerMaster/Attributes/DeviceTypeAttribute.cs @@ -3,8 +3,9 @@ using RGB.NET.Core; namespace RGB.NET.Devices.CoolerMaster.Attributes { + /// /// - /// Specifies the of a field. + /// Specifies the of a field. /// [AttributeUsage(AttributeTargets.Field)] public class DeviceTypeAttribute : Attribute @@ -20,10 +21,11 @@ namespace RGB.NET.Devices.CoolerMaster.Attributes #region Constructors + /// /// - /// Internal constructor of the class. + /// Internal constructor of the class. /// - /// The . + /// The . public DeviceTypeAttribute(RGBDeviceType deviceType) { this.DeviceType = deviceType; diff --git a/RGB.NET.Devices.CoolerMaster/CoolerMasterDeviceProvider.cs b/RGB.NET.Devices.CoolerMaster/CoolerMasterDeviceProvider.cs index f87eede..2a8043b 100644 --- a/RGB.NET.Devices.CoolerMaster/CoolerMasterDeviceProvider.cs +++ b/RGB.NET.Devices.CoolerMaster/CoolerMasterDeviceProvider.cs @@ -12,6 +12,7 @@ using RGB.NET.Devices.CoolerMaster.Native; namespace RGB.NET.Devices.CoolerMaster { + /// /// /// Represents a device provider responsible for Cooler Master devices. /// @@ -37,6 +38,7 @@ namespace RGB.NET.Devices.CoolerMaster /// public static List PossibleX64NativePaths { get; } = new List { "x64/CMSDK.dll" }; + /// /// /// Indicates if the SDK is initialized and ready to use. /// @@ -47,6 +49,7 @@ namespace RGB.NET.Devices.CoolerMaster /// public string LoadedArchitecture => _CoolerMasterSDK.LoadedArchitecture; + /// /// /// Gets whether the application has exclusive access to the SDK or not. /// @@ -58,7 +61,7 @@ namespace RGB.NET.Devices.CoolerMaster /// /// Gets or sets a function to get the culture for a specific device. /// - public Func GetCulture { get; set; } = () => CultureHelper.GetCurrentCulture(); + public Func GetCulture { get; set; } = CultureHelper.GetCurrentCulture; #endregion @@ -97,7 +100,7 @@ namespace RGB.NET.Devices.CoolerMaster { try { - CoolerMasterRGBDevice device = null; + CoolerMasterRGBDevice device; switch (index.GetDeviceType()) { case RGBDeviceType.Keyboard: diff --git a/RGB.NET.Devices.CoolerMaster/Generic/CoolerMasterLedId.cs b/RGB.NET.Devices.CoolerMaster/Generic/CoolerMasterLedId.cs index 6de5849..f14d517 100644 --- a/RGB.NET.Devices.CoolerMaster/Generic/CoolerMasterLedId.cs +++ b/RGB.NET.Devices.CoolerMaster/Generic/CoolerMasterLedId.cs @@ -3,8 +3,9 @@ using RGB.NET.Core; namespace RGB.NET.Devices.CoolerMaster { + /// /// - /// Represents a Id of a on a . + /// Represents a Id of a on a . /// [DebuggerDisplay("{" + nameof(LedId) + "}")] public class CoolerMasterLedId : ILedId diff --git a/RGB.NET.Devices.CoolerMaster/Generic/CoolerMasterRGBDevice.cs b/RGB.NET.Devices.CoolerMaster/Generic/CoolerMasterRGBDevice.cs index 374ea48..e6ba06b 100644 --- a/RGB.NET.Devices.CoolerMaster/Generic/CoolerMasterRGBDevice.cs +++ b/RGB.NET.Devices.CoolerMaster/Generic/CoolerMasterRGBDevice.cs @@ -8,14 +8,16 @@ using RGB.NET.Devices.CoolerMaster.Native; namespace RGB.NET.Devices.CoolerMaster { + /// /// /// Represents a generic CoolerMaster-device. (keyboard, mouse, headset, mousepad). /// public abstract class CoolerMasterRGBDevice : AbstractRGBDevice { #region Properties & Fields + /// /// - /// Gets information about the . + /// Gets information about the . /// public override IRGBDeviceInfo DeviceInfo { get; } @@ -74,11 +76,9 @@ namespace RGB.NET.Devices.CoolerMaster if (layout.Leds != null) foreach (LedLayout layoutLed in layout.Leds) { - CoolerMasterLedIds ledId; - if (Enum.TryParse(layoutLed.Id, true, out ledId)) + if (Enum.TryParse(layoutLed.Id, true, out CoolerMasterLedIds ledId)) { - Led led; - if (LedMapping.TryGetValue(new CoolerMasterLedId(this, ledId), out led)) + if (LedMapping.TryGetValue(new CoolerMasterLedId(this, ledId), out Led led)) { led.LedRectangle.Location.X = layoutLed.X; led.LedRectangle.Location.Y = layoutLed.Y; diff --git a/RGB.NET.Devices.CoolerMaster/Generic/CoolerMasterRGBDeviceInfo.cs b/RGB.NET.Devices.CoolerMaster/Generic/CoolerMasterRGBDeviceInfo.cs index 54de789..38bf277 100644 --- a/RGB.NET.Devices.CoolerMaster/Generic/CoolerMasterRGBDeviceInfo.cs +++ b/RGB.NET.Devices.CoolerMaster/Generic/CoolerMasterRGBDeviceInfo.cs @@ -4,8 +4,9 @@ using RGB.NET.Devices.CoolerMaster.Helper; namespace RGB.NET.Devices.CoolerMaster { + /// /// - /// Represents a generic information for a Corsair-. + /// Represents a generic information for a Corsair-. /// public class CoolerMasterRGBDeviceInfo : IRGBDeviceInfo { diff --git a/RGB.NET.Devices.CoolerMaster/Keyboard/CoolerMasterKeyboardRGBDevice.cs b/RGB.NET.Devices.CoolerMaster/Keyboard/CoolerMasterKeyboardRGBDevice.cs index 7ad5454..6280689 100644 --- a/RGB.NET.Devices.CoolerMaster/Keyboard/CoolerMasterKeyboardRGBDevice.cs +++ b/RGB.NET.Devices.CoolerMaster/Keyboard/CoolerMasterKeyboardRGBDevice.cs @@ -4,6 +4,7 @@ using RGB.NET.Core; namespace RGB.NET.Devices.CoolerMaster { + /// /// /// Represents a CoolerMaster keyboard. /// @@ -20,8 +21,9 @@ namespace RGB.NET.Devices.CoolerMaster #region Constructors + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The specific information provided by CoolerMaster for the keyboard internal CoolerMasterKeyboardRGBDevice(CoolerMasterKeyboardRGBDeviceInfo info) @@ -46,7 +48,7 @@ namespace RGB.NET.Devices.CoolerMaster string model = KeyboardDeviceInfo.Model.Replace(" ", string.Empty).ToUpper(); ApplyLayoutFromFile(PathHelper.GetAbsolutePath( $@"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 diff --git a/RGB.NET.Devices.CoolerMaster/Keyboard/CoolerMasterKeyboardRGBDeviceInfo.cs b/RGB.NET.Devices.CoolerMaster/Keyboard/CoolerMasterKeyboardRGBDeviceInfo.cs index f11bb88..c85eaad 100644 --- a/RGB.NET.Devices.CoolerMaster/Keyboard/CoolerMasterKeyboardRGBDeviceInfo.cs +++ b/RGB.NET.Devices.CoolerMaster/Keyboard/CoolerMasterKeyboardRGBDeviceInfo.cs @@ -4,8 +4,9 @@ using RGB.NET.Core; namespace RGB.NET.Devices.CoolerMaster { + /// /// - /// Represents a generic information for a . + /// Represents a generic information for a . /// public class CoolerMasterKeyboardRGBDeviceInfo : CoolerMasterRGBDeviceInfo { @@ -25,12 +26,13 @@ namespace RGB.NET.Devices.CoolerMaster #region Constructors + /// /// - /// Internal constructor of managed . + /// Internal constructor of managed . /// - /// The index of the . - /// The of the . - /// The of the layout this keyboard is using + /// The index of the . + /// The of the . + /// The of the layout this keyboard is using internal CoolerMasterKeyboardRGBDeviceInfo(CoolerMasterDevicesIndexes deviceIndex, CoolerMasterPhysicalKeyboardLayout physicalKeyboardLayout, CultureInfo culture) : base(RGBDeviceType.Keyboard, deviceIndex) { diff --git a/RGB.NET.Devices.Corsair/CorsairDeviceProvider.cs b/RGB.NET.Devices.Corsair/CorsairDeviceProvider.cs index d6ded4e..a3968a5 100644 --- a/RGB.NET.Devices.Corsair/CorsairDeviceProvider.cs +++ b/RGB.NET.Devices.Corsair/CorsairDeviceProvider.cs @@ -12,6 +12,7 @@ using RGB.NET.Devices.Corsair.SpecialParts; namespace RGB.NET.Devices.Corsair { + /// /// /// Represents a device provider responsible for corsair (CUE) devices. /// @@ -37,6 +38,7 @@ namespace RGB.NET.Devices.Corsair /// public static List PossibleX64NativePaths { get; } = new List { "x64/CUESDK.dll", "x64/CUESDK_2015.dll", "x64/CUESDK_2013.dll" }; + /// /// /// Indicates if the SDK is initialized and ready to use. /// @@ -52,6 +54,7 @@ namespace RGB.NET.Devices.Corsair /// public CorsairProtocolDetails ProtocolDetails { get; private set; } + /// /// /// Gets whether the application has exclusive access to the SDK or not. /// diff --git a/RGB.NET.Devices.Corsair/Exceptions/CUEException.cs b/RGB.NET.Devices.Corsair/Exceptions/CUEException.cs index 4337536..055d512 100644 --- a/RGB.NET.Devices.Corsair/Exceptions/CUEException.cs +++ b/RGB.NET.Devices.Corsair/Exceptions/CUEException.cs @@ -5,6 +5,7 @@ using System; namespace RGB.NET.Devices.Corsair { + /// /// /// Represents an exception thrown by the CUE. /// @@ -21,10 +22,11 @@ namespace RGB.NET.Devices.Corsair #region Constructors + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// The provided by CUE, which leads to this exception. + /// The provided by CUE, which leads to this exception. public CUEException(CorsairError error) { this.Error = error; diff --git a/RGB.NET.Devices.Corsair/Generic/CorsairLedId.cs b/RGB.NET.Devices.Corsair/Generic/CorsairLedId.cs index 17fbe31..10bd2e3 100644 --- a/RGB.NET.Devices.Corsair/Generic/CorsairLedId.cs +++ b/RGB.NET.Devices.Corsair/Generic/CorsairLedId.cs @@ -3,8 +3,9 @@ using RGB.NET.Core; namespace RGB.NET.Devices.Corsair { + /// /// - /// Represents a Id of a on a . + /// Represents a Id of a on a . /// [DebuggerDisplay("{" + nameof(LedId) + "}")] public class CorsairLedId : ILedId diff --git a/RGB.NET.Devices.Corsair/Generic/CorsairRGBDevice.cs b/RGB.NET.Devices.Corsair/Generic/CorsairRGBDevice.cs index 7a71602..e230a61 100644 --- a/RGB.NET.Devices.Corsair/Generic/CorsairRGBDevice.cs +++ b/RGB.NET.Devices.Corsair/Generic/CorsairRGBDevice.cs @@ -9,6 +9,7 @@ using RGB.NET.Devices.Corsair.Native; namespace RGB.NET.Devices.Corsair { + /// /// /// Represents a generic CUE-device. (keyboard, mouse, headset, mousepad). /// @@ -16,8 +17,9 @@ namespace RGB.NET.Devices.Corsair { #region Properties & Fields + /// /// - /// Gets information about the . + /// Gets information about the . /// public override IRGBDeviceInfo DeviceInfo { get; } @@ -75,11 +77,9 @@ namespace RGB.NET.Devices.Corsair if (layout.Leds != null) foreach (LedLayout layoutLed in layout.Leds) { - CorsairLedIds ledId; - if (Enum.TryParse(layoutLed.Id, true, out ledId)) + if (Enum.TryParse(layoutLed.Id, true, out CorsairLedIds ledId)) { - Led led; - if (LedMapping.TryGetValue(new CorsairLedId(this, ledId), out led)) + if (LedMapping.TryGetValue(new CorsairLedId(this, ledId), out Led led)) { led.LedRectangle.Location.X = layoutLed.X; led.LedRectangle.Location.Y = layoutLed.Y; diff --git a/RGB.NET.Devices.Corsair/Generic/CorsairRGBDeviceInfo.cs b/RGB.NET.Devices.Corsair/Generic/CorsairRGBDeviceInfo.cs index ab528bf..e9aa475 100644 --- a/RGB.NET.Devices.Corsair/Generic/CorsairRGBDeviceInfo.cs +++ b/RGB.NET.Devices.Corsair/Generic/CorsairRGBDeviceInfo.cs @@ -5,8 +5,9 @@ using RGB.NET.Devices.Corsair.Native; namespace RGB.NET.Devices.Corsair { + /// /// - /// Represents a generic information for a Corsair-. + /// Represents a generic information for a Corsair-. /// public class CorsairRGBDeviceInfo : IRGBDeviceInfo { diff --git a/RGB.NET.Devices.Corsair/Headset/CorsairHeadsetRGBDevice.cs b/RGB.NET.Devices.Corsair/Headset/CorsairHeadsetRGBDevice.cs index 274ce23..7578f31 100644 --- a/RGB.NET.Devices.Corsair/Headset/CorsairHeadsetRGBDevice.cs +++ b/RGB.NET.Devices.Corsair/Headset/CorsairHeadsetRGBDevice.cs @@ -5,6 +5,7 @@ using RGB.NET.Core; namespace RGB.NET.Devices.Corsair { + /// /// /// Represents a corsair headset. /// @@ -21,8 +22,9 @@ namespace RGB.NET.Devices.Corsair #region Constructors + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The specific information provided by CUE for the headset internal CorsairHeadsetRGBDevice(CorsairHeadsetRGBDeviceInfo info) diff --git a/RGB.NET.Devices.Corsair/Headset/CorsairHeadsetRGBDeviceInfo.cs b/RGB.NET.Devices.Corsair/Headset/CorsairHeadsetRGBDeviceInfo.cs index cbcb56b..0efcf01 100644 --- a/RGB.NET.Devices.Corsair/Headset/CorsairHeadsetRGBDeviceInfo.cs +++ b/RGB.NET.Devices.Corsair/Headset/CorsairHeadsetRGBDeviceInfo.cs @@ -4,18 +4,20 @@ using RGB.NET.Devices.Corsair.Native; namespace RGB.NET.Devices.Corsair { + /// /// - /// Represents a generic information for a . + /// Represents a generic information for a . /// public class CorsairHeadsetRGBDeviceInfo : CorsairRGBDeviceInfo { #region Constructors + /// /// - /// Internal constructor of managed . + /// Internal constructor of managed . /// - /// The index of the . - /// The native -struct + /// The index of the . + /// The native -struct internal CorsairHeadsetRGBDeviceInfo(int deviceIndex, _CorsairDeviceInfo nativeInfo) : base(deviceIndex, RGBDeviceType.Headset, nativeInfo) { diff --git a/RGB.NET.Devices.Corsair/Keyboard/CorsairKeyboardRGBDevice.cs b/RGB.NET.Devices.Corsair/Keyboard/CorsairKeyboardRGBDevice.cs index 36c0f06..c7daaeb 100644 --- a/RGB.NET.Devices.Corsair/Keyboard/CorsairKeyboardRGBDevice.cs +++ b/RGB.NET.Devices.Corsair/Keyboard/CorsairKeyboardRGBDevice.cs @@ -8,6 +8,7 @@ using RGB.NET.Devices.Corsair.Native; namespace RGB.NET.Devices.Corsair { + /// /// /// Represents a corsair keyboard. /// @@ -24,8 +25,9 @@ namespace RGB.NET.Devices.Corsair #region Constructors + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The specific information provided by CUE for the keyboard internal CorsairKeyboardRGBDevice(CorsairKeyboardRGBDeviceInfo info) @@ -59,7 +61,7 @@ namespace RGB.NET.Devices.Corsair string model = KeyboardDeviceInfo.Model.Replace(" ", string.Empty).ToUpper(); ApplyLayoutFromFile(PathHelper.GetAbsolutePath( $@"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 diff --git a/RGB.NET.Devices.Corsair/Keyboard/CorsairKeyboardRGBDeviceInfo.cs b/RGB.NET.Devices.Corsair/Keyboard/CorsairKeyboardRGBDeviceInfo.cs index f5ad4a5..c8d67a1 100644 --- a/RGB.NET.Devices.Corsair/Keyboard/CorsairKeyboardRGBDeviceInfo.cs +++ b/RGB.NET.Devices.Corsair/Keyboard/CorsairKeyboardRGBDeviceInfo.cs @@ -7,8 +7,9 @@ using RGB.NET.Devices.Corsair.Native; namespace RGB.NET.Devices.Corsair { + /// /// - /// Represents a generic information for a . + /// Represents a generic information for a . /// public class CorsairKeyboardRGBDeviceInfo : CorsairRGBDeviceInfo { @@ -28,11 +29,12 @@ namespace RGB.NET.Devices.Corsair #region Constructors + /// /// - /// Internal constructor of managed . + /// Internal constructor of managed . /// - /// The index of the . - /// The native -struct + /// The index of the . + /// The native -struct internal CorsairKeyboardRGBDeviceInfo(int deviceIndex, _CorsairDeviceInfo nativeInfo) : base(deviceIndex, RGBDeviceType.Keyboard, nativeInfo) { diff --git a/RGB.NET.Devices.Corsair/Mouse/CorsairMouseRGBDevice.cs b/RGB.NET.Devices.Corsair/Mouse/CorsairMouseRGBDevice.cs index 1e3fa34..f6aedd4 100644 --- a/RGB.NET.Devices.Corsair/Mouse/CorsairMouseRGBDevice.cs +++ b/RGB.NET.Devices.Corsair/Mouse/CorsairMouseRGBDevice.cs @@ -6,6 +6,7 @@ using RGB.NET.Core.Exceptions; namespace RGB.NET.Devices.Corsair { + /// /// /// Represents a corsair mouse. /// @@ -22,8 +23,9 @@ namespace RGB.NET.Devices.Corsair #region Constructors + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The specific information provided by CUE for the mouse internal CorsairMouseRGBDevice(CorsairMouseRGBDeviceInfo info) diff --git a/RGB.NET.Devices.Corsair/Mouse/CorsairMouseRGBDeviceInfo.cs b/RGB.NET.Devices.Corsair/Mouse/CorsairMouseRGBDeviceInfo.cs index 8d614fc..290a5cc 100644 --- a/RGB.NET.Devices.Corsair/Mouse/CorsairMouseRGBDeviceInfo.cs +++ b/RGB.NET.Devices.Corsair/Mouse/CorsairMouseRGBDeviceInfo.cs @@ -4,8 +4,9 @@ using RGB.NET.Devices.Corsair.Native; namespace RGB.NET.Devices.Corsair { + /// /// - /// Represents a generic information for a . + /// Represents a generic information for a . /// public class CorsairMouseRGBDeviceInfo : CorsairRGBDeviceInfo { @@ -20,11 +21,12 @@ namespace RGB.NET.Devices.Corsair #region Constructors + /// /// - /// Internal constructor of managed . + /// Internal constructor of managed . /// - /// The index of the . - /// The native -struct + /// The index of the . + /// The native -struct internal CorsairMouseRGBDeviceInfo(int deviceIndex, _CorsairDeviceInfo nativeInfo) : base(deviceIndex, RGBDeviceType.Mouse, nativeInfo) { diff --git a/RGB.NET.Devices.Corsair/Mousepad/CorsairMousepadRGBDevice.cs b/RGB.NET.Devices.Corsair/Mousepad/CorsairMousepadRGBDevice.cs index 098e21a..6c4cf59 100644 --- a/RGB.NET.Devices.Corsair/Mousepad/CorsairMousepadRGBDevice.cs +++ b/RGB.NET.Devices.Corsair/Mousepad/CorsairMousepadRGBDevice.cs @@ -10,6 +10,7 @@ using RGB.NET.Devices.Corsair.Native; namespace RGB.NET.Devices.Corsair { + /// /// /// Represents a corsair mousepad. /// @@ -26,8 +27,9 @@ namespace RGB.NET.Devices.Corsair #region Constructors + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The specific information provided by CUE for the mousepad internal CorsairMousepadRGBDevice(CorsairMousepadRGBDeviceInfo info) diff --git a/RGB.NET.Devices.Corsair/Mousepad/CorsairMousepadRGBDeviceInfo.cs b/RGB.NET.Devices.Corsair/Mousepad/CorsairMousepadRGBDeviceInfo.cs index f7eec20..aeda0aa 100644 --- a/RGB.NET.Devices.Corsair/Mousepad/CorsairMousepadRGBDeviceInfo.cs +++ b/RGB.NET.Devices.Corsair/Mousepad/CorsairMousepadRGBDeviceInfo.cs @@ -4,18 +4,20 @@ using RGB.NET.Devices.Corsair.Native; namespace RGB.NET.Devices.Corsair { + /// /// - /// Represents a generic information for a . + /// Represents a generic information for a . /// public class CorsairMousepadRGBDeviceInfo : CorsairRGBDeviceInfo { #region Constructors + /// /// - /// Internal constructor of managed . + /// Internal constructor of managed . /// - /// The index if the . - /// The native -struct + /// The index if the . + /// The native -struct internal CorsairMousepadRGBDeviceInfo(int deviceIndex, _CorsairDeviceInfo nativeInfo) : base(deviceIndex, RGBDeviceType.Mousepad, nativeInfo) { diff --git a/RGB.NET.Devices.Corsair/SpecialParts/LightbarSpecialPart.cs b/RGB.NET.Devices.Corsair/SpecialParts/LightbarSpecialPart.cs index 57a96a9..cdc02e4 100644 --- a/RGB.NET.Devices.Corsair/SpecialParts/LightbarSpecialPart.cs +++ b/RGB.NET.Devices.Corsair/SpecialParts/LightbarSpecialPart.cs @@ -9,8 +9,9 @@ using RGB.NET.Core; namespace RGB.NET.Devices.Corsair.SpecialParts { + /// /// - /// Represents a lightbar attached to a + /// Represents a lightbar attached to a /// public class LightbarSpecialPart : IRGBDeviceSpecialPart { @@ -59,16 +60,18 @@ namespace RGB.NET.Devices.Corsair.SpecialParts #region Methods + /// /// - /// Returns an enumerator that iterates over all of the . + /// Returns an enumerator that iterates over all of the . /// - /// An enumerator for all of the . + /// An enumerator for all of the . public IEnumerator GetEnumerator() => _leds.GetEnumerator(); + /// /// - /// Returns an enumerator that iterates over all of the . + /// Returns an enumerator that iterates over all of the . /// - /// An enumerator for all of the . + /// An enumerator for all of the . IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); #endregion diff --git a/RGB.NET.Devices.Logitech/Generic/LogitechLedId.cs b/RGB.NET.Devices.Logitech/Generic/LogitechLedId.cs index 58a27ed..2144baf 100644 --- a/RGB.NET.Devices.Logitech/Generic/LogitechLedId.cs +++ b/RGB.NET.Devices.Logitech/Generic/LogitechLedId.cs @@ -3,8 +3,9 @@ using RGB.NET.Core; namespace RGB.NET.Devices.Logitech { + /// /// - /// Represents a Id of a on a . + /// Represents a Id of a on a . /// [DebuggerDisplay("{" + nameof(LedId) + "}")] public class LogitechLedId : ILedId diff --git a/RGB.NET.Devices.Logitech/Generic/LogitechRGBDevice.cs b/RGB.NET.Devices.Logitech/Generic/LogitechRGBDevice.cs index ff13901..6f51937 100644 --- a/RGB.NET.Devices.Logitech/Generic/LogitechRGBDevice.cs +++ b/RGB.NET.Devices.Logitech/Generic/LogitechRGBDevice.cs @@ -8,6 +8,7 @@ using RGB.NET.Devices.Logitech.Native; namespace RGB.NET.Devices.Logitech { + /// /// /// Represents a generic Logitech-device. (keyboard, mouse, headset, mousepad). /// @@ -15,8 +16,9 @@ namespace RGB.NET.Devices.Logitech { #region Properties & Fields + /// /// - /// Gets information about the . + /// Gets information about the . /// public override IRGBDeviceInfo DeviceInfo { get; } @@ -74,12 +76,10 @@ namespace RGB.NET.Devices.Logitech if (layout.Leds != null) foreach (LedLayout layoutLed in layout.Leds) { - LogitechLedIds ledId; - if (Enum.TryParse(layoutLed.Id, true, out ledId)) + if (Enum.TryParse(layoutLed.Id, true, out LogitechLedIds ledId)) { LogitechLedId id = new LogitechLedId(this, ledId); - Led led; - if (!LedMapping.TryGetValue(id, out led)) + if (!LedMapping.TryGetValue(id, out Led led)) led = InitializeLed(id, new Rectangle()); led.LedRectangle.Location.X = layoutLed.X; @@ -110,8 +110,7 @@ namespace RGB.NET.Devices.Logitech 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 ... - int bitmapOffset; - if (BitmapMapping.BitmapOffset.TryGetValue(((LogitechLedId)led.Id).LedId, out bitmapOffset)) + if (BitmapMapping.BitmapOffset.TryGetValue(((LogitechLedId)led.Id).LedId, out int bitmapOffset)) { if (bitmap == null) bitmap = BitmapMapping.CreateBitmap(); diff --git a/RGB.NET.Devices.Logitech/Generic/LogitechRGBDeviceInfo.cs b/RGB.NET.Devices.Logitech/Generic/LogitechRGBDeviceInfo.cs index 9876581..a9e98bc 100644 --- a/RGB.NET.Devices.Logitech/Generic/LogitechRGBDeviceInfo.cs +++ b/RGB.NET.Devices.Logitech/Generic/LogitechRGBDeviceInfo.cs @@ -3,8 +3,9 @@ using RGB.NET.Core; namespace RGB.NET.Devices.Logitech { + /// /// - /// Represents a generic information for a Logitech-. + /// Represents a generic information for a Logitech-. /// public class LogitechRGBDeviceInfo : IRGBDeviceInfo { diff --git a/RGB.NET.Devices.Logitech/Keyboard/LogitechKeyboardRGBDevice.cs b/RGB.NET.Devices.Logitech/Keyboard/LogitechKeyboardRGBDevice.cs index 2dd319b..adb8882 100644 --- a/RGB.NET.Devices.Logitech/Keyboard/LogitechKeyboardRGBDevice.cs +++ b/RGB.NET.Devices.Logitech/Keyboard/LogitechKeyboardRGBDevice.cs @@ -5,6 +5,7 @@ using RGB.NET.Core; namespace RGB.NET.Devices.Logitech { + /// /// /// Represents a logitech keyboard. /// @@ -21,8 +22,9 @@ namespace RGB.NET.Devices.Logitech #region Constructors + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The specific information provided by logitech for the keyboard internal LogitechKeyboardRGBDevice(LogitechKeyboardRGBDeviceInfo info) @@ -41,7 +43,7 @@ namespace RGB.NET.Devices.Logitech string model = KeyboardDeviceInfo.Model.Replace(" ", string.Empty).ToUpper(); ApplyLayoutFromFile(PathHelper.GetAbsolutePath( $@"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 diff --git a/RGB.NET.Devices.Logitech/Keyboard/LogitechKeyboardRGBDeviceInfo.cs b/RGB.NET.Devices.Logitech/Keyboard/LogitechKeyboardRGBDeviceInfo.cs index 58b7d32..2d312ba 100644 --- a/RGB.NET.Devices.Logitech/Keyboard/LogitechKeyboardRGBDeviceInfo.cs +++ b/RGB.NET.Devices.Logitech/Keyboard/LogitechKeyboardRGBDeviceInfo.cs @@ -7,8 +7,9 @@ using RGB.NET.Core; namespace RGB.NET.Devices.Logitech { + /// /// - /// Represents a generic information for a . + /// Represents a generic information for a . /// public class LogitechKeyboardRGBDeviceInfo : LogitechRGBDeviceInfo { @@ -28,12 +29,13 @@ namespace RGB.NET.Devices.Logitech #region Constructors + /// /// - /// Internal constructor of managed . + /// Internal constructor of managed . /// /// The represented device model. /// The lighting-capabilities of the device. - /// The of the layout this keyboard is using + /// The of the layout this keyboard is using internal LogitechKeyboardRGBDeviceInfo(string model, LogitechDeviceCaps deviceCaps, CultureInfo culture) : base(RGBDeviceType.Keyboard, model, deviceCaps) { diff --git a/RGB.NET.Devices.Logitech/LogitechDeviceProvider.cs b/RGB.NET.Devices.Logitech/LogitechDeviceProvider.cs index f3071b4..37d31f9 100644 --- a/RGB.NET.Devices.Logitech/LogitechDeviceProvider.cs +++ b/RGB.NET.Devices.Logitech/LogitechDeviceProvider.cs @@ -11,6 +11,7 @@ using RGB.NET.Devices.Logitech.Native; namespace RGB.NET.Devices.Logitech { + /// /// /// Represents a device provider responsible for logitech devices. /// @@ -53,7 +54,7 @@ namespace RGB.NET.Devices.Logitech /// /// Gets or sets a function to get the culture for a specific device. /// - public Func GetCulture { get; set; } = () => CultureHelper.GetCurrentCulture(); + public Func GetCulture { get; set; } = CultureHelper.GetCurrentCulture; #endregion diff --git a/RGB.NET.Devices.Novation/Attributes/ColorCapabilityAttribute.cs b/RGB.NET.Devices.Novation/Attributes/ColorCapabilityAttribute.cs index d02aa60..8a9a7d7 100644 --- a/RGB.NET.Devices.Novation/Attributes/ColorCapabilityAttribute.cs +++ b/RGB.NET.Devices.Novation/Attributes/ColorCapabilityAttribute.cs @@ -2,6 +2,7 @@ namespace RGB.NET.Devices.Novation.Attributes { + /// /// /// Specifies the color-capability of a field. /// @@ -19,8 +20,9 @@ namespace RGB.NET.Devices.Novation.Attributes #region Constructors + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The capability. public ColorCapabilityAttribute(NovationColorCapabilities capability) diff --git a/RGB.NET.Devices.Novation/Attributes/DeviceIdAttribute.cs b/RGB.NET.Devices.Novation/Attributes/DeviceIdAttribute.cs index 75a4066..5caaca9 100644 --- a/RGB.NET.Devices.Novation/Attributes/DeviceIdAttribute.cs +++ b/RGB.NET.Devices.Novation/Attributes/DeviceIdAttribute.cs @@ -2,6 +2,7 @@ namespace RGB.NET.Devices.Novation.Attributes { + /// /// /// Specifies the device-id of a field. /// @@ -19,8 +20,9 @@ namespace RGB.NET.Devices.Novation.Attributes #region Constructors + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The id. public DeviceIdAttribute(string id) diff --git a/RGB.NET.Devices.Novation/Generic/NovationLedId.cs b/RGB.NET.Devices.Novation/Generic/NovationLedId.cs index 45d87bb..992d7d4 100644 --- a/RGB.NET.Devices.Novation/Generic/NovationLedId.cs +++ b/RGB.NET.Devices.Novation/Generic/NovationLedId.cs @@ -3,8 +3,9 @@ using RGB.NET.Core; namespace RGB.NET.Devices.Novation { + /// /// - /// Represents a Id of a on a . + /// Represents a Id of a on a . /// [DebuggerDisplay("{" + nameof(LedId) + "}")] public class NovationLedId : ILedId diff --git a/RGB.NET.Devices.Novation/Generic/NovationRGBDevice.cs b/RGB.NET.Devices.Novation/Generic/NovationRGBDevice.cs index f3de7dd..2185923 100644 --- a/RGB.NET.Devices.Novation/Generic/NovationRGBDevice.cs +++ b/RGB.NET.Devices.Novation/Generic/NovationRGBDevice.cs @@ -8,6 +8,7 @@ using Sanford.Multimedia.Midi; namespace RGB.NET.Devices.Novation { + /// /// /// Represents a generic Novation-device. (launchpad). /// @@ -18,8 +19,9 @@ namespace RGB.NET.Devices.Novation private readonly OutputDevice _outputDevice; private readonly NovationRGBDeviceInfo _deviceInfo; + /// /// - /// Gets information about the . + /// Gets information about the . /// public override IRGBDeviceInfo DeviceInfo => _deviceInfo; @@ -80,11 +82,9 @@ namespace RGB.NET.Devices.Novation if (layout.Leds != null) foreach (LedLayout layoutLed in layout.Leds) { - NovationLedIds ledId; - if (Enum.TryParse(layoutLed.Id, true, out ledId)) + if (Enum.TryParse(layoutLed.Id, true, out NovationLedIds ledId)) { - Led led; - if (LedMapping.TryGetValue(new NovationLedId(this, ledId), out led)) + if (LedMapping.TryGetValue(new NovationLedId(this, ledId), out Led led)) { led.LedRectangle.Location.X = layoutLed.X; led.LedRectangle.Location.Y = layoutLed.Y; diff --git a/RGB.NET.Devices.Novation/Generic/NovationRGBDeviceInfo.cs b/RGB.NET.Devices.Novation/Generic/NovationRGBDeviceInfo.cs index dbc703d..6179ea4 100644 --- a/RGB.NET.Devices.Novation/Generic/NovationRGBDeviceInfo.cs +++ b/RGB.NET.Devices.Novation/Generic/NovationRGBDeviceInfo.cs @@ -3,8 +3,9 @@ using RGB.NET.Core; namespace RGB.NET.Devices.Novation { + /// /// - /// Represents a generic information for a Corsair-. + /// Represents a generic information for a Corsair-. /// public class NovationRGBDeviceInfo : IRGBDeviceInfo { diff --git a/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDevice.cs b/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDevice.cs index 7625423..fd4d576 100644 --- a/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDevice.cs +++ b/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDevice.cs @@ -3,6 +3,7 @@ using RGB.NET.Core; namespace RGB.NET.Devices.Novation { + /// /// /// Represents a Novation launchpad. /// @@ -19,8 +20,9 @@ namespace RGB.NET.Devices.Novation #region Constructors + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The specific information provided by Novation for the launchpad internal NovationLaunchpadRGBDevice(NovationLaunchpadRGBDeviceInfo info) diff --git a/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDeviceInfo.cs b/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDeviceInfo.cs index 6a47179..13cc326 100644 --- a/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDeviceInfo.cs +++ b/RGB.NET.Devices.Novation/Launchpad/NovationLaunchpadRGBDeviceInfo.cs @@ -3,19 +3,21 @@ using RGB.NET.Core; namespace RGB.NET.Devices.Novation { + /// /// - /// Represents a generic information for a . + /// Represents a generic information for a . /// public class NovationLaunchpadRGBDeviceInfo : NovationRGBDeviceInfo { #region Constructors + /// /// - /// Internal constructor of managed . + /// Internal constructor of managed . /// /// The represented device model. /// - /// The of the . + /// The of the . internal NovationLaunchpadRGBDeviceInfo(string model, int deviceId, NovationColorCapabilities colorCapabilities) : base(RGBDeviceType.LedMatrix, model, deviceId, colorCapabilities) { diff --git a/RGB.NET.Devices.Novation/NovationDeviceProvider.cs b/RGB.NET.Devices.Novation/NovationDeviceProvider.cs index 40d2de9..cde7c45 100644 --- a/RGB.NET.Devices.Novation/NovationDeviceProvider.cs +++ b/RGB.NET.Devices.Novation/NovationDeviceProvider.cs @@ -10,6 +10,7 @@ using Sanford.Multimedia.Midi; namespace RGB.NET.Devices.Novation { + /// /// /// Represents a device provider responsible for Novation devices. /// @@ -23,11 +24,13 @@ namespace RGB.NET.Devices.Novation /// public static NovationDeviceProvider Instance => _instance ?? new NovationDeviceProvider(); + /// /// /// Indicates if the SDK is initialized and ready to use. /// public bool IsInitialized { get; private set; } + /// /// /// Gets whether the application has exclusive access to the SDK or not. /// diff --git a/RGB.NET.Groups/Extensions/LedGroupExtension.cs b/RGB.NET.Groups/Extensions/LedGroupExtension.cs index 82fec5d..7a3b0c0 100644 --- a/RGB.NET.Groups/Extensions/LedGroupExtension.cs +++ b/RGB.NET.Groups/Extensions/LedGroupExtension.cs @@ -17,9 +17,8 @@ namespace RGB.NET.Groups /// The converted . public static ListLedGroup ToListLedGroup(this ILedGroup ledGroup) { - ListLedGroup listLedGroup = ledGroup as ListLedGroup; // ReSharper disable once InvertIf - if (listLedGroup == null) + if (!(ledGroup is ListLedGroup listLedGroup)) { bool wasAttached = ledGroup.Detach(); listLedGroup = new ListLedGroup(wasAttached, ledGroup.GetLeds()) { Brush = ledGroup.Brush }; diff --git a/RGB.NET.Groups/Groups/ListLedGroup.cs b/RGB.NET.Groups/Groups/ListLedGroup.cs index 6c21bff..f7c1143 100644 --- a/RGB.NET.Groups/Groups/ListLedGroup.cs +++ b/RGB.NET.Groups/Groups/ListLedGroup.cs @@ -6,8 +6,9 @@ using RGB.NET.Core; namespace RGB.NET.Groups { + /// /// - /// Represents a ledgroup containing arbitrary . + /// Represents a ledgroup containing arbitrary . /// public class ListLedGroup : AbstractLedGroup { @@ -22,84 +23,93 @@ namespace RGB.NET.Groups #region Constructors + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// Specifies whether this should be automatically attached or not. + /// Specifies whether this should be automatically attached or not. public ListLedGroup(bool autoAttach = true) : base(autoAttach) { } + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// The initial of this . + /// The initial of this . public ListLedGroup(params Led[] leds) : this(true, leds) { } + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// The initial of this . + /// The initial of this . public ListLedGroup(IEnumerable leds) : this(true, leds) { } + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// Specifies whether this should be automatically attached or not. - /// The initial of this . + /// Specifies whether this should be automatically attached or not. + /// The initial of this . public ListLedGroup(bool autoAttach, IEnumerable leds) : base(autoAttach) { AddLeds(leds); } + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// Specifies whether this should be automatically attached or not. - /// The initial of this . + /// Specifies whether this should be automatically attached or not. + /// The initial of this . public ListLedGroup(bool autoAttach, params Led[] leds) : base(autoAttach) { AddLeds(leds); } + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// The IDs of the initial of this . + /// The IDs of the initial of this . public ListLedGroup(params ILedId[] leds) : this(true, leds) { } + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// The IDs of the initial of this . + /// The IDs of the initial of this . public ListLedGroup(IEnumerable leds) : this(true, leds) { } + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// Specifies whether this should be automatically attached or not. - /// The IDs of the initial of this . + /// Specifies whether this should be automatically attached or not. + /// The IDs of the initial of this . public ListLedGroup(bool autoAttach, params ILedId[] leds) : base(autoAttach) { AddLeds(leds); } + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// Specifies whether this should be automatically attached or not. - /// The IDs of the initial of this . + /// Specifies whether this should be automatically attached or not. + /// The IDs of the initial of this . public ListLedGroup(bool autoAttach, IEnumerable leds) : base(autoAttach) { @@ -227,10 +237,11 @@ namespace RGB.NET.Groups GroupLeds.Add(led); } + /// /// - /// Gets a list containing the from this group. + /// Gets a list containing the from this group. /// - /// The list containing the . + /// The list containing the . public override IEnumerable GetLeds() { return GroupLeds; diff --git a/RGB.NET.Groups/Groups/RectangleLedGroup.cs b/RGB.NET.Groups/Groups/RectangleLedGroup.cs index 4d64940..fd6d663 100644 --- a/RGB.NET.Groups/Groups/RectangleLedGroup.cs +++ b/RGB.NET.Groups/Groups/RectangleLedGroup.cs @@ -9,8 +9,9 @@ using RGB.NET.Core; namespace RGB.NET.Groups { + /// /// - /// Represents a containing which physically lay inside a . + /// Represents a containing which physically lay inside a . /// public class RectangleLedGroup : AbstractLedGroup { @@ -59,45 +60,49 @@ namespace RGB.NET.Groups #region Constructors + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// They ID of the first to calculate the of this from. - /// They ID of the second to calculate the of this from. - /// (optional) The minimal percentage overlay a must have with the to be taken into the . (default: 0.5) - /// (optional) Specifies whether this should be automatically attached or not. (default: true) + /// They ID of the first to calculate the of this from. + /// They ID of the second to calculate the of this from. + /// (optional) The minimal percentage overlay a must have with the to be taken into the . (default: 0.5) + /// (optional) Specifies whether this should be automatically attached or not. (default: true) public RectangleLedGroup(ILedId fromLed, ILedId toLed, double minOverlayPercentage = 0.5, bool autoAttach = true) : this(fromLed.Device[fromLed], toLed.Device[toLed], minOverlayPercentage, autoAttach) { } + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// They first to calculate the of this from. - /// They second to calculate the of this from. - /// (optional) The minimal percentage overlay a must have with the to be taken into the . (default: 0.5) - /// (optional) Specifies whether this should be automatically attached or not. (default: true) + /// They first to calculate the of this from. + /// They second to calculate the of this from. + /// (optional) The minimal percentage overlay a must have with the to be taken into the . (default: 0.5) + /// (optional) Specifies whether this should be automatically attached or not. (default: true) public RectangleLedGroup(Led fromLed, Led toLed, double minOverlayPercentage = 0.5, bool autoAttach = true) : this(new Rectangle(fromLed.LedRectangle, toLed.LedRectangle), minOverlayPercentage, autoAttach) { } + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// They first point to calculate the of this from. - /// They second point to calculate the of this from. - /// (optional) The minimal percentage overlay a must have with the to be taken into the . (default: 0.5) - /// (optional) Specifies whether this should be automatically attached or not. (default: true) + /// They first point to calculate the of this from. + /// They second point to calculate the of this from. + /// (optional) The minimal percentage overlay a must have with the to be taken into the . (default: 0.5) + /// (optional) Specifies whether this should be automatically attached or not. (default: true) public RectangleLedGroup(Point fromPoint, Point toPoint, double minOverlayPercentage = 0.5, bool autoAttach = true) : this(new Rectangle(fromPoint, toPoint), minOverlayPercentage, autoAttach) { } + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// The of this . - /// (optional) The minimal percentage overlay a must have with the to be taken into the . (default: 0.5) - /// (optional) Specifies whether this should be automatically attached or not. (default: true) + /// The of this . + /// (optional) The minimal percentage overlay a must have with the to be taken into the . (default: 0.5) + /// (optional) Specifies whether this should be automatically attached or not. (default: true) public RectangleLedGroup(Rectangle rectangle, double minOverlayPercentage = 0.5, bool autoAttach = true) : base(autoAttach) { @@ -119,10 +124,11 @@ namespace RGB.NET.Groups private void RectangleChanged(object sender, EventArgs eventArgs) => InvalidateCache(); + /// /// - /// Gets a list containing all of this . + /// Gets a list containing all of this . /// - /// The list containing all of this . + /// The list containing all of this . public override IEnumerable GetLeds() => _ledCache ?? (_ledCache = RGBSurface.Instance.Leds.Where(x => x.LedRectangle.CalculateIntersectPercentage(Rectangle) >= MinOverlayPercentage).ToList()); private void InvalidateCache() => _ledCache = null; diff --git a/RGB.NET.WPF/Controls/LedVisualizer.cs b/RGB.NET.WPF/Controls/LedVisualizer.cs index 8c9a425..e681025 100644 --- a/RGB.NET.WPF/Controls/LedVisualizer.cs +++ b/RGB.NET.WPF/Controls/LedVisualizer.cs @@ -4,8 +4,9 @@ using RGB.NET.Core; namespace RGB.NET.WPF.Controls { + /// /// - /// Visualizes a in an wpf-application. + /// Visualizes a in an wpf-application. /// public class LedVisualizer : Control { diff --git a/RGB.NET.WPF/Controls/RGBDeviceVisualizer.cs b/RGB.NET.WPF/Controls/RGBDeviceVisualizer.cs index 590fb02..6c0c1cc 100644 --- a/RGB.NET.WPF/Controls/RGBDeviceVisualizer.cs +++ b/RGB.NET.WPF/Controls/RGBDeviceVisualizer.cs @@ -4,8 +4,9 @@ using RGB.NET.Core; namespace RGB.NET.WPF.Controls { + /// /// - /// Visualizes a in an wpf-application. + /// Visualizes a in an wpf-application. /// [TemplatePart(Name = PART_CANVAS, Type = typeof(Canvas))] public class RGBDeviceVisualizer : Control diff --git a/RGB.NET.WPF/Controls/RGBSurfaceVisualizer.cs b/RGB.NET.WPF/Controls/RGBSurfaceVisualizer.cs index 789c68a..fc4d8b1 100644 --- a/RGB.NET.WPF/Controls/RGBSurfaceVisualizer.cs +++ b/RGB.NET.WPF/Controls/RGBSurfaceVisualizer.cs @@ -5,8 +5,9 @@ using RGB.NET.Core; namespace RGB.NET.WPF.Controls { + /// /// - /// Visualizes the in an wpf-application. + /// Visualizes the in an wpf-application. /// [TemplatePart(Name = PART_CANVAS, Type = typeof(Canvas))] public class RGBSurfaceVisualizer : Control @@ -29,8 +30,9 @@ namespace RGB.NET.WPF.Controls #region Constructors + /// /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// public RGBSurfaceVisualizer() { diff --git a/RGB.NET.WPF/Converter/ColorToSolidColorBrushConverter.cs b/RGB.NET.WPF/Converter/ColorToSolidColorBrushConverter.cs index ef3a37f..c76b64b 100644 --- a/RGB.NET.WPF/Converter/ColorToSolidColorBrushConverter.cs +++ b/RGB.NET.WPF/Converter/ColorToSolidColorBrushConverter.cs @@ -5,8 +5,9 @@ using System.Windows.Media; namespace RGB.NET.WPF.Converter { + /// /// - /// Converts into . + /// Converts into . /// [ValueConversion(typeof(Core.Color), typeof(SolidColorBrush))] public class ColorToSolidColorBrushConverter : IValueConverter @@ -23,8 +24,7 @@ namespace RGB.NET.WPF.Converter /// public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { - SolidColorBrush brush = value as SolidColorBrush; - return brush == null + return !(value is SolidColorBrush brush) ? Core.Color.Transparent : new Core.Color(brush.Color.A, brush.Color.R, brush.Color.G, brush.Color.B); }