/// <summary> /// Safely reset the bindings on this Command to the provided KeyBinding value /// </summary> public static void SafeSetBindings(this DteCommand command, KeyBinding binding) { SafeSetBindings(command, new[] { binding.CommandString }); }
public CommandKeyBinding(CommandId commandId, string name, KeyBinding binding) { Id = commandId; Name = name; KeyBinding = binding; }
/// <summary> /// Does the Command have the provided KeyBinding as a valid binding /// </summary> public static bool HasKeyBinding(this DteCommand command, KeyBinding binding) { return(GetCommandKeyBindings(command).Any(x => x.KeyBinding == binding)); }