1
0
mirror of https://github.com/DarthAffe/CUE.NET.git synced 2025-12-12 16:58:29 +00:00

Fixed some more code issues

This commit is contained in:
Darth Affe 2017-01-05 16:50:57 +01:00
parent d741318462
commit 619b389f7d
5 changed files with 16 additions and 6 deletions

View File

@ -16,7 +16,10 @@ namespace CUE.NET.Effects
{ {
#region Properties & Fields #region Properties & Fields
protected IList<EffectTimeContainer> EffectTimes = new List<EffectTimeContainer>(); /// <summary>
/// Gets a list of <see cref="EffectTimeContainer"/> storing the attached effects.
/// </summary>
protected IList<EffectTimeContainer> EffectTimes { get; } = new List<EffectTimeContainer>();
/// <summary> /// <summary>
/// Gets all <see cref="IEffect{T}" /> attached to this target. /// Gets all <see cref="IEffect{T}" /> attached to this target.

View File

@ -16,26 +16,26 @@ namespace CUE.NET.Effects
/// <summary> /// <summary>
/// Gets or sets the attack-time (in seconds) of the effect. (default: 0.2f)<br /> /// Gets or sets the attack-time (in seconds) of the effect. (default: 0.2f)<br />
/// This is close to a synthesizer envelope. (See <see cref="http://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope" /> as reference) /// This is close to a synthesizer envelope. (See <see href="http://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope" /> as reference)
/// </summary> /// </summary>
public float Attack { get; set; } = 0.2f; public float Attack { get; set; } = 0.2f;
/// <summary> /// <summary>
/// Gets or sets the decay-time (in seconds) of the effect. (default: 0f)<br /> /// Gets or sets the decay-time (in seconds) of the effect. (default: 0f)<br />
/// This is close to a synthesizer envelope. (See <see cref="http://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope" /> as reference) /// This is close to a synthesizer envelope. (See <see href="http://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope" /> as reference)
/// </summary> /// </summary>
public float Decay { get; set; } = 0f; public float Decay { get; set; } = 0f;
/// <summary> /// <summary>
/// Gets or sets the sustain-time (in seconds) of the effect. (default: 0.3f)<br /> /// Gets or sets the sustain-time (in seconds) of the effect. (default: 0.3f)<br />
/// This is close to a synthesizer envelope. (See <see cref="http://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope" /> as reference)<br /> /// This is close to a synthesizer envelope. (See <see href="http://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope" /> as reference)<br />
/// Note that this value for naming reasons represents the time NOT the level. /// Note that this value for naming reasons represents the time NOT the level.
/// </summary> /// </summary>
public float Sustain { get; set; } = 0.3f; public float Sustain { get; set; } = 0.3f;
/// <summary> /// <summary>
/// Gets or sets the release-time (in seconds) of the effect. (default: 0.2f)<br /> /// Gets or sets the release-time (in seconds) of the effect. (default: 0.2f)<br />
/// This is close to a synthesizer envelope. (See <see cref="http://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope" /> as reference) /// This is close to a synthesizer envelope. (See <see href="http://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope" /> as reference)
/// </summary> /// </summary>
public float Release { get; set; } = 0.2f; public float Release { get; set; } = 0.2f;

View File

@ -8,7 +8,7 @@ namespace CUE.NET.Gradients
{ {
/// <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 cref="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.
/// </summary> /// </summary>
public class RainbowGradient : IGradient public class RainbowGradient : IGradient
{ {

View File

@ -15,6 +15,9 @@ namespace CUE.NET.Groups
{ {
#region Properties & Fields #region Properties & Fields
/// <summary>
/// Gets the strongly-typed target used for the effect.
/// </summary>
protected override ILedGroup EffectTarget => this; protected override ILedGroup EffectTarget => this;
/// <summary> /// <summary>

View File

@ -98,6 +98,10 @@ namespace CUE.NET.Groups
#region Methods #region Methods
/// <summary>
/// Gets a list containing all LEDs of this group.
/// </summary>
/// <returns>The list containing all LEDs of this group.</returns>
public override IEnumerable<CorsairLed> GetLeds() public override IEnumerable<CorsairLed> GetLeds()
{ {
return _ledCache ?? (_ledCache = Device.Where(x => RectangleHelper.CalculateIntersectPercentage(x.LedRectangle, Rectangle) >= MinOverlayPercentage).ToList()); return _ledCache ?? (_ledCache = Device.Where(x => RectangleHelper.CalculateIntersectPercentage(x.LedRectangle, Rectangle) >= MinOverlayPercentage).ToList());