Пример #1
0
 /// <summary>
 /// Tests if the given <see cref="NovationLedIds"/> is custom-button.
 /// </summary>
 /// <param name="ledId">the <see cref="NovationLedIds"/> to test.</param>
 /// <returns><c>true</c> if <paramref name="ledId" /> is a custom-button; otherwise, <c>false</c>.</returns>
 public static bool IsCustom(this NovationLedIds ledId) => (ledId.GetStatus() == 0xB0) && ((ledId.GetId() / 0x10) == 0x06) && ((ledId.GetId() % 0x10) > 0x07);
Пример #2
0
 /// <summary>
 /// Tests if the given <see cref="NovationLedIds"/> is a scene-button.
 /// </summary>
 /// <param name="ledId">the <see cref="NovationLedIds"/> to test.</param>
 /// <returns><c>true</c> if <paramref name="ledId" /> is a scene-button; otherwise, <c>false</c>.</returns>
 public static bool IsScene(this NovationLedIds ledId) => (ledId.GetStatus() == 0x90) && ((ledId.GetId() / 0x10) < 0x08) && ((ledId.GetId() % 0x10) == 0x09);