public CommandShortcut(KeyShortcut shortcut, CommandInfo cmd) { KeyShortcut = shortcut; CommandInfo = cmd; }
public ProviderAndCommand(ICommandInfoProvider provider, CommandInfo cmd) { if (provider == null) throw new ArgumentNullException(nameof(provider)); Provider = provider; Command = cmd; }
public static CommandShortcut Create(KeyInput key1, KeyInput key2, CommandInfo cmd) => new CommandShortcut(new KeyShortcut(key1, key2), cmd);
public static CommandShortcut CtrlShiftAlt(Key key, CommandInfo cmd) => new CommandShortcut(new KeyShortcut(key, ModifierKeys.Control | ModifierKeys.Shift | ModifierKeys.Alt), cmd);
public static CommandShortcut Alt(Key key, CommandInfo cmd) => new CommandShortcut(new KeyShortcut(key, ModifierKeys.Alt), cmd);
public static CommandShortcut Control(Key key, CommandInfo cmd) => new CommandShortcut(new KeyShortcut(key, ModifierKeys.Control), cmd);
public static CommandShortcut Create(Key key, CommandInfo cmd) => new CommandShortcut(new KeyShortcut(key, ModifierKeys.None), cmd);