mirror of
https://github.com/DarthAffe/CUE.NET.git
synced 2026-11-11 04:56:44 +00:00
Added even more xml-comments
This commit is contained in:
1 parent
6de1087c1f
commit
5fc7abc9db
30 files changed
+639
-17
No files matched your search
@@ -6,8 +6,16 @@ using CUE.NET.Devices.Keyboard.Keys;
|
||||
|
||||
namespace CUE.NET.Devices.Keyboard.Extensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Offers some extensions and helper-methods for keygroup related things.
|
||||
/// </summary>
|
||||
public static class KeyGroupExtension
|
||||
{
|
||||
/// <summary>
|
||||
/// Converts the given <see cref="BaseKeyGroup" /> to a <see cref="ListKeyGroup" />.
|
||||
/// </summary>
|
||||
/// <param name="keyGroup">The <see cref="BaseKeyGroup" /> to convert.</param>
|
||||
/// <returns>The converted <see cref="ListKeyGroup" />.</returns>
|
||||
public static ListKeyGroup ToSimpleKeyGroup(this BaseKeyGroup keyGroup)
|
||||
{
|
||||
ListKeyGroup simpleKeyGroup = keyGroup as ListKeyGroup;
|
||||
@@ -19,6 +27,12 @@ namespace CUE.NET.Devices.Keyboard.Extensions
|
||||
return simpleKeyGroup;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a new <see cref="ListKeyGroup" /> which contains all keys from the given keygroup excluding the specified ones.
|
||||
/// </summary>
|
||||
/// <param name="keyGroup">The base keygroup.</param>
|
||||
/// <param name="keyIds">The ids of the keys to exclude.</param>
|
||||
/// <returns>The new <see cref="ListKeyGroup" />.</returns>
|
||||
public static ListKeyGroup Exclude(this BaseKeyGroup keyGroup, params CorsairKeyboardKeyId[] keyIds)
|
||||
{
|
||||
ListKeyGroup simpleKeyGroup = keyGroup.ToSimpleKeyGroup();
|
||||
@@ -27,6 +41,12 @@ namespace CUE.NET.Devices.Keyboard.Extensions
|
||||
return simpleKeyGroup;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a new <see cref="ListKeyGroup" /> which contains all keys from the given keygroup excluding the specified ones.
|
||||
/// </summary>
|
||||
/// <param name="keyGroup">The base keygroup.</param>
|
||||
/// <param name="keyIds">The keys to exclude.</param>
|
||||
/// <returns>The new <see cref="ListKeyGroup" />.</returns>
|
||||
public static ListKeyGroup Exclude(this BaseKeyGroup keyGroup, params CorsairKey[] keyIds)
|
||||
{
|
||||
ListKeyGroup simpleKeyGroup = keyGroup.ToSimpleKeyGroup();
|
||||
@@ -36,11 +56,21 @@ namespace CUE.NET.Devices.Keyboard.Extensions
|
||||
}
|
||||
|
||||
// ReSharper disable once UnusedMethodReturnValue.Global
|
||||
/// <summary>
|
||||
/// Attaches the given keygroup to the keyboard.
|
||||
/// </summary>
|
||||
/// <param name="keyGroup">The keygroup to attach.</param>
|
||||
/// <returns><c>true</c> if the keygroup could be attached; otherwise, <c>false</c>.</returns>
|
||||
public static bool Attach(this BaseKeyGroup keyGroup)
|
||||
{
|
||||
return keyGroup.Keyboard?.AttachKeyGroup(keyGroup) ?? false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Detaches the given keygroup from the keyboard.
|
||||
/// </summary>
|
||||
/// <param name="keyGroup">The keygroup to attach.</param>
|
||||
/// <returns><c>true</c> if the keygroup could be detached; otherwise, <c>false</c>.</returns>
|
||||
public static bool Detach(this BaseKeyGroup keyGroup)
|
||||
{
|
||||
return keyGroup.Keyboard?.DetachKeyGroup(keyGroup) ?? false;
|
||||
|
||||
Reference in new issue
Block a user