Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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;
        }