protected override void OnKeyPress(KeyPressEventArgs e)
        {
            base.OnKeyPress(e);

            if (controlManager != null)
            {
                KeyPressEvent keyEvent = new KeyPressEvent(e.KeyChar);
                if (controlManager.DoKeyPress(keyEvent))
                {
                    e.Handled = true;
                }
            }
        }
        protected override void OnTextInput(TextCompositionEventArgs e)
        {
            base.OnTextInput(e);

            if (controlManager != null)
            {
                if (e.Text.Length > 0)
                {
                    char keyChar = e.Text[0];

                    KeyPressEvent keyEvent = new KeyPressEvent(keyChar);

                    controlManager.DoKeyPress(keyEvent);

                    //if (controlManager.DoKeyPress(keyEvent))
                    //    e.Handled = true;
                }
            }
        }
Beispiel #3
0
        protected override bool OnKeyPress(KeyPressEvent e)
        {
            if (EngineConsole.Instance != null)
            {
                if (EngineConsole.Instance.DoKeyPress(e))
                {
                    return(true);
                }
            }
            if (controlManager != null)
            {
                if (controlManager.DoKeyPress(e))
                {
                    return(true);
                }
            }

            return(base.OnKeyPress(e));
        }