Files
pamhagen-sysctrl/PamhagenSysCtrl/Helpers/Extensions.cs
T
lorenz.stechauner d8c2292b24
Test / Run tests (push) Successful in 43s
Move path logic into Path class
2026-10-15 23:45:32 +02:00

16 lines
526 B
C#

using System.Drawing;
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);
}
}
}