diff --git a/Brushes/AbstractBrush.cs b/Brushes/AbstractBrush.cs
index e9c2845..ff8b34e 100644
--- a/Brushes/AbstractBrush.cs
+++ b/Brushes/AbstractBrush.cs
@@ -74,6 +74,7 @@ namespace CUE.NET.Brushes
foreach (BrushRenderTarget point in renderTargets)
RenderedTargets[point] = GetColorAtPoint(rectangle, point);
}
+
///
/// Performs the finalize pass of the brush and calculates the final colors for all previously calculated points.
///
diff --git a/Brushes/BrushRenderTarget.cs b/Brushes/BrushRenderTarget.cs
index 94b514d..b913c32 100644
--- a/Brushes/BrushRenderTarget.cs
+++ b/Brushes/BrushRenderTarget.cs
@@ -6,18 +6,32 @@ using CUE.NET.Devices.Keyboard.Enums;
namespace CUE.NET.Brushes
{
+ ///
+ /// Represents a single target of a brush render.
+ ///
public class BrushRenderTarget
{
#region Properties & Fields
+ ///
+ /// Gets the id of the target-key.
+ ///
public CorsairKeyboardKeyId Key { get; }
+ ///
+ /// Gets the point representing the position to render the target-key.
+ ///
public PointF Point { get; }
#endregion
#region Constructors
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The id of the target-key.
+ /// The point representing the position to render the target-key.
public BrushRenderTarget(CorsairKeyboardKeyId key, PointF point)
{
this.Point = point;
diff --git a/Brushes/ImageBrush.cs b/Brushes/ImageBrush.cs
index 69ae56a..b1fdd39 100644
--- a/Brushes/ImageBrush.cs
+++ b/Brushes/ImageBrush.cs
@@ -39,6 +39,9 @@ namespace CUE.NET.Brushes
#region Properties & Fields
+ ///
+ /// Gets the strongly-typed target used for the effect.
+ ///
protected override IBrush EffectTarget => this;
///
diff --git a/Brushes/LinearGradientBrush.cs b/Brushes/LinearGradientBrush.cs
index 8d5bdf7..76435a5 100644
--- a/Brushes/LinearGradientBrush.cs
+++ b/Brushes/LinearGradientBrush.cs
@@ -18,6 +18,9 @@ namespace CUE.NET.Brushes
{
#region Properties & Fields
+ ///
+ /// Gets the strongly-typed target used for the effect.
+ ///
protected override IBrush EffectTarget => this;
///
diff --git a/Brushes/ProfileBrush.cs b/Brushes/ProfileBrush.cs
index 9ba6d28..bc056f0 100644
--- a/Brushes/ProfileBrush.cs
+++ b/Brushes/ProfileBrush.cs
@@ -12,6 +12,9 @@ namespace CUE.NET.Brushes
{
#region Properties & Fields
+ ///
+ /// Gets the strongly-typed target used for the effect.
+ ///
protected override IBrush EffectTarget => this;
private Dictionary _keyLights;
diff --git a/Brushes/RadialGradientBrush.cs b/Brushes/RadialGradientBrush.cs
index 04d7f1a..846e4fc 100644
--- a/Brushes/RadialGradientBrush.cs
+++ b/Brushes/RadialGradientBrush.cs
@@ -16,6 +16,9 @@ namespace CUE.NET.Brushes
{
#region Properties & Fields
+ ///
+ /// Gets the strongly-typed target used for the effect.
+ ///
protected override IBrush EffectTarget => this;
///
diff --git a/Brushes/RandomColorBrush.cs b/Brushes/RandomColorBrush.cs
index 2e5d791..5cdff3d 100644
--- a/Brushes/RandomColorBrush.cs
+++ b/Brushes/RandomColorBrush.cs
@@ -15,6 +15,9 @@ namespace CUE.NET.Brushes
{
#region Properties & Fields
+ ///
+ /// Gets the strongly-typed target used for the effect.
+ ///
protected override IBrush EffectTarget => this;
private Random _random = new Random();
diff --git a/Brushes/SolidColorBrush.cs b/Brushes/SolidColorBrush.cs
index 87d9478..680d414 100644
--- a/Brushes/SolidColorBrush.cs
+++ b/Brushes/SolidColorBrush.cs
@@ -12,6 +12,9 @@ namespace CUE.NET.Brushes
{
#region Properties & Fields
+ ///
+ /// Gets the strongly-typed target used for the effect.
+ ///
protected override IBrush EffectTarget => this;
///
diff --git a/Devices/Generic/LedUpateRequest.cs b/Devices/Generic/LedUpateRequest.cs
index 123fa06..09c1060 100644
--- a/Devices/Generic/LedUpateRequest.cs
+++ b/Devices/Generic/LedUpateRequest.cs
@@ -5,18 +5,32 @@ using System.Drawing;
namespace CUE.NET.Devices.Generic
{
+ ///
+ /// Represents a request to update a led.
+ ///
public class LedUpateRequest
{
#region Properties & Fields
+ ///
+ /// Gets the id of the led to update.
+ ///
public int LedId { get; }
+ ///
+ /// Gets the requested color of the led.
+ ///
public Color Color { get; set; }
#endregion
#region Constructors
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The id of the led to update.
+ /// The requested color of the led.
public LedUpateRequest(int ledId, Color color)
{
this.LedId = ledId;
diff --git a/Devices/Keyboard/CorsairKeyboard.cs b/Devices/Keyboard/CorsairKeyboard.cs
index 2866375..4aa24e3 100644
--- a/Devices/Keyboard/CorsairKeyboard.cs
+++ b/Devices/Keyboard/CorsairKeyboard.cs
@@ -181,7 +181,11 @@ namespace CUE.NET.Devices.Keyboard
// ReSharper disable once CatchAllClause
catch (Exception ex) { OnException(ex); }
}
-
+
+ ///
+ /// Gets a list containing all LEDs of this group.
+ ///
+ /// The list containing all LEDs of this group.
public IEnumerable GetLeds()
{
return this.Select(x => x.Led);
@@ -242,16 +246,27 @@ namespace CUE.NET.Devices.Keyboard
#region Effects
+ ///
+ /// NOT IMPLEMENTED: Effects can't be applied directly to the keyboard. Add it to the Brush or create a keygroup instead.
+ ///
public void UpdateEffects()
{
throw new NotSupportedException("Effects can't be applied directly to the keyboard. Add it to the Brush or create a keygroup instead.");
}
+ ///
+ /// NOT IMPLEMENTED: Effects can't be applied directly to the keyboard. Add it to the Brush or create a keygroup instead.
+ ///
+ /// The effect to add.
public void AddEffect(IEffect effect)
{
throw new NotSupportedException("Effects can't be applied directly to the keyboard. Add it to the Brush or create a keygroup instead.");
}
+ ///
+ /// NOT IMPLEMENTED: Effects can't be applied directly to the keyboard. Add it to the Brush or create a keygroup instead.
+ ///
+ /// The effect to remove.
public void RemoveEffect(IEffect effect)
{
throw new NotSupportedException("Effects can't be applied directly to the keyboard. Add it to the Brush or create a keygroup instead.");
@@ -270,6 +285,10 @@ namespace CUE.NET.Devices.Keyboard
return _keys.Values.GetEnumerator();
}
+ ///
+ /// Returns an enumerator that iterates over all keys of the keyboard.
+ ///
+ /// An enumerator for all keys of the keyboard.
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
diff --git a/Effects/AbstractEffectTarget.cs b/Effects/AbstractEffectTarget.cs
index 5ba8315..9147ae3 100644
--- a/Effects/AbstractEffectTarget.cs
+++ b/Effects/AbstractEffectTarget.cs
@@ -6,19 +6,34 @@ using System.Linq;
namespace CUE.NET.Effects
{
+ ///
+ /// Represents an generic effect-target.
+ ///
+ ///
public abstract class AbstractEffectTarget : IEffectTarget
where T : IEffectTarget
{
#region Properties & Fields
-
+
private IList _effectTimes = new List();
+
+ ///
+ /// Gets all attached to this target.
+ ///
protected IList> Effects => _effectTimes.Select(x => x.Effect).Cast>().ToList();
+
+ ///
+ /// Gets the strongly-typed target used for the effect.
+ ///
protected abstract T EffectTarget { get; }
#endregion
#region Methods
+ ///
+ /// Updates all effects added to this target.
+ ///
public void UpdateEffects()
{
lock (Effects)
@@ -47,6 +62,10 @@ namespace CUE.NET.Effects
}
}
+ ///
+ /// Adds an affect.
+ ///
+ /// The effect to add.
public void AddEffect(IEffect effect)
{
if (_effectTimes.All(x => x.Effect != effect))
@@ -56,6 +75,10 @@ namespace CUE.NET.Effects
}
}
+ ///
+ /// Removes an effect
+ ///
+ /// The effect to remove.
public void RemoveEffect(IEffect effect)
{
EffectTimeContainer effectTimeToRemove = _effectTimes.FirstOrDefault(x => x.Effect == effect);
diff --git a/Effects/AbstractKeyGroupEffect.cs b/Effects/AbstractKeyGroupEffect.cs
index 71a67ba..c1526fb 100644
--- a/Effects/AbstractKeyGroupEffect.cs
+++ b/Effects/AbstractKeyGroupEffect.cs
@@ -1,4 +1,5 @@
// ReSharper disable MemberCanBePrivate.Global
+// ReSharper disable UnusedAutoPropertyAccessor.Global
using CUE.NET.Devices.Keyboard.Keys;