public InputBinding AddBinding(string name, MouseButtons buttons, EventHandler beginHandler, EventHandler endHandler) { InputBinding binding = new InputBinding(name, false, false, false); binding.BeginExecution = beginHandler; binding.EndExecution = endHandler; _mouseBindings.Add(buttons, binding); return binding; }
public InputBinding AddBinding(string name, bool shift, bool control, bool alt, Keys key, EventHandler beginHandler, EventHandler endHandler) { InputBinding binding = new InputBinding(name, shift, control, alt); binding.BeginExecution = beginHandler; binding.EndExecution = endHandler; key |= shift ? Keys.Shift : Keys.None; key |= control ? Keys.Control : Keys.None; key |= alt ? Keys.Alt : Keys.None; _keyBindings.Add(key, binding); return binding; }