First attempt to rewrite Effects

This commit is contained in:
DarthAffe committed 2016-08-21 13:11:07 +02:00
1 parent 5a296dd048
commit ba80ef9848
32 files changed
+353 -325

No files matched your search

@@ -4,13 +4,14 @@ using System.Linq;
using CUE.NET.Brushes;
using CUE.NET.Devices.Generic;
using CUE.NET.Devices.Keyboard.Extensions;
using CUE.NET.Effects;
namespace CUE.NET.Devices.Keyboard.Keys
{
/// <summary>
/// Represents a basic keygroup.
/// </summary>
public abstract class BaseKeyGroup : IKeyGroup
public abstract class AbstractKeyGroup : AbstractEffectTarget<IKeyGroup>, IKeyGroup
{
#region Properties & Fields
@@ -39,11 +40,11 @@ namespace CUE.NET.Devices.Keyboard.Keys
#region Constructors
/// <summary>
/// Initializes a new instance of the <see cref="BaseKeyGroup"/> class.
/// Initializes a new instance of the <see cref="AbstractKeyGroup"/> class.
/// </summary>
/// <param name="keyboard">The keyboard this keygroup belongs to.</param>
/// <param name="autoAttach">Specifies whether this group should be automatically attached or not.</param>
protected BaseKeyGroup(CorsairKeyboard keyboard, bool autoAttach = true)
protected AbstractKeyGroup(CorsairKeyboard keyboard, bool autoAttach = true)
{
this.Keyboard = keyboard;
+2 -1
View File
@@ -4,10 +4,11 @@
using System.Collections.Generic;
using CUE.NET.Brushes;
using CUE.NET.Devices.Generic;
using CUE.NET.Effects;
namespace CUE.NET.Devices.Keyboard.Keys
{
public interface IKeyGroup
public interface IKeyGroup : IEffectTarget<IKeyGroup>
{
/// <summary>
/// Gets a read-only collection containing the keys from this group.
+3 -1
View File
@@ -9,10 +9,12 @@ namespace CUE.NET.Devices.Keyboard.Keys
/// <summary>
/// Represents a keygroup containing arbitrary keys.
/// </summary>
public class ListKeyGroup : BaseKeyGroup
public class ListKeyGroup : AbstractKeyGroup
{
#region Properties & Fields
protected override IKeyGroup EffectTarget => this;
/// <summary>
/// Gets the list containing the keys of this keygroup.
/// </summary>
+3 -1
View File
@@ -13,10 +13,12 @@ namespace CUE.NET.Devices.Keyboard.Keys
/// <summary>
/// Represents a keygroup containing keys which physically lay inside a rectangle.
/// </summary>
public class RectangleKeyGroup : BaseKeyGroup
public class RectangleKeyGroup : AbstractKeyGroup
{
#region Properties & Fields
protected override IKeyGroup EffectTarget => this;
private IList<CorsairKey> _keyCache;
private RectangleF _rectangle;