Search Results for

    Show / Hide Table of Contents

    Class ExtendedCustomKeyboardEffect

    Describes a custom grid effect for extended keyboards.

    Inheritance
    Object
    ExtendedCustomKeyboardEffect
    Implements
    IEquatable<ExtendedCustomKeyboardEffect>
    Namespace: Colore.Effects.Keyboard
    Assembly: Colore.dll
    Syntax
    public sealed class ExtendedCustomKeyboardEffect : ValueType

    Constructors

    ExtendedCustomKeyboardEffect(Color)

    Initializes a new instance of the ExtendedCustomKeyboardEffect struct with every position set to a specific color.

    Declaration
    public ExtendedCustomKeyboardEffect(Color color)
    Parameters
    Type Name Description
    Color color

    The Color to set each position to.

    ExtendedCustomKeyboardEffect(ExtendedCustomKeyboardEffect)

    Initializes a new instance of the ExtendedCustomKeyboardEffect struct with the colors copied from another struct of the same type.

    Declaration
    public ExtendedCustomKeyboardEffect(ExtendedCustomKeyboardEffect other)
    Parameters
    Type Name Description
    ExtendedCustomKeyboardEffect other

    The ExtendedCustomKeyboardEffect struct to copy data from.

    Properties

    Item[Key]

    Gets or sets the color for a specific key in the custom grid. The SDK will handle translation of location data to access the correct key depending on user configuration.

    Declaration
    public Color this[Key key] { get; set; }
    Parameters
    Type Name Description
    Key key

    The Key to access.

    Property Value
    Type Description
    Color

    The Color for the specified key.

    Remarks

    Please note that the position of a key accessed in this way is not guaranteed to be correct, as different layouts on different keyboards can place these keys in other locations.

    Item[Int32]

    Gets or sets a position in the custom grid.

    Declaration
    public Color this[int index] { get; set; }
    Parameters
    Type Name Description
    Int32 index

    The index to access, zero indexed.

    Property Value
    Type Description
    Color

    The Color at the specified position.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown if index is out of range.

    Item[Int32, Int32]

    Gets or sets cells in the custom grid.

    Declaration
    public Color this[int row, int column] { get; set; }
    Parameters
    Type Name Description
    Int32 row

    Row to access, zero indexed.

    Int32 column

    Column to access, zero indexed.

    Property Value
    Type Description
    Color

    The Color at the specified position.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown if row and/or column are out of range.

    Methods

    Clear()

    Clears the colors from the grid, setting them to Black.

    Declaration
    public void Clear()

    Clone()

    Returns a copy of this struct.

    Declaration
    public ExtendedCustomKeyboardEffect Clone()
    Returns
    Type Description
    ExtendedCustomKeyboardEffect

    A copy of this struct.

    Create()

    Creates a new empty ExtendedCustomKeyboardEffect struct.

    Declaration
    public static ExtendedCustomKeyboardEffect Create()
    Returns
    Type Description
    ExtendedCustomKeyboardEffect

    An instance of ExtendedCustomKeyboardEffect filled with the color black.

    Equals(ExtendedCustomKeyboardEffect)

    Indicates whether the current object is equal to another object of the same type.

    Declaration
    public bool Equals(ExtendedCustomKeyboardEffect other)
    Parameters
    Type Name Description
    ExtendedCustomKeyboardEffect other

    A ExtendedCustomKeyboardEffect to compare with this object.

    Returns
    Type Description
    Boolean

    true if the current object is equal to the other parameter; otherwise, false.

    Equals(Object)

    Indicates whether this instance and a specified object are equal.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    Another object to compare to.

    Returns
    Type Description
    Boolean

    true if obj and this instance are of compatible types and represent the same value; otherwise, false.

    GetHashCode()

    Returns the hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    A 32-bit signed integer that is the hash code for this instance.

    Set(Color)

    Sets the entire grid to a specific Color.

    Declaration
    public void Set(Color color)
    Parameters
    Type Name Description
    Color color

    The Color to apply.

    Operators

    Equality(ExtendedCustomKeyboardEffect, Object)

    Compares an instance of ExtendedCustomKeyboardEffect with another object for equality.

    Declaration
    public static bool operator ==(ExtendedCustomKeyboardEffect left, object right)
    Parameters
    Type Name Description
    ExtendedCustomKeyboardEffect left

    The left operand, an instance of ExtendedCustomKeyboardEffect.

    Object right

    The right operand, any type of object.

    Returns
    Type Description
    Boolean

    true if the two objects are equal, otherwise false.

    Inequality(ExtendedCustomKeyboardEffect, Object)

    Compares an instance of ExtendedCustomKeyboardEffect with another object for inequality.

    Declaration
    public static bool operator !=(ExtendedCustomKeyboardEffect left, object right)
    Parameters
    Type Name Description
    ExtendedCustomKeyboardEffect left

    The left operand, an instance of ExtendedCustomKeyboardEffect.

    Object right

    The right operand, any type of object.

    Returns
    Type Description
    Boolean

    true if the two objects are not equal, otherwise false.

    Implements

    System.IEquatable<T>
    In This Article
    Back to top Copyright © 2015-2022 by Adam Hellberg and Brandon Scott
    Generated by DocFX