This commit is contained in:
CortexCore
2025-08-05 23:34:10 +08:00
parent c3f0a8e840
commit 2554487fa4
23 changed files with 652 additions and 67 deletions

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace BITKit.UX.Hotkey
{
@@ -37,6 +38,14 @@ namespace BITKit.UX.Hotkey
public class HotkeyCollection:IHotkeyCollection
{
public HotkeyCollection()
{
}
public HotkeyCollection(params IHotkeyProvider[] hotkeyProviders)
{
_hotkeys = hotkeyProviders.ToHashSet();
}
private readonly HashSet<IHotkeyProvider> _hotkeys = new();
public IEnumerable<IHotkeyProvider> Hotkeys => _hotkeys;
public void Register(IHotkeyProvider hotkey)