16 lines
532 B
C#
16 lines
532 B
C#
using System.Windows.Media;
|
|
|
|
namespace PamhagenSysCtrl.Helpers {
|
|
public static class Extensions {
|
|
|
|
public static void SetBacklight(this Xbe24Keyboard k, PamhagenPlant.ShortcutKey key, Color color, bool flashing = false) {
|
|
if (App.Config.MapKey(key) is int n)
|
|
k.SetBacklight(n, color, flashing);
|
|
}
|
|
|
|
public static bool IsKeyPressed(this Xbe24Keyboard k, PamhagenPlant.ShortcutKey key) {
|
|
return App.Config.MapKey(key) is int n && k.IsKeyPressed(n);
|
|
}
|
|
}
|
|
}
|