Exemple #1
0
        /// <summary>
        /// Raises the KeyPress event.
        /// </summary>
        /// <param name="e">A KeyPressEventArgs that contains the event data.</param>
        protected override void OnKeyPress(KeyPressEventArgs e)
        {
            // Cannot process a message for a disposed control
            if (!IsDisposed && !Disposing)
            {
                // Do we have a manager for processing key messages?
                if (ViewManager != null)
                {
                    ViewManager.KeyPress(e);
                }
            }

            // Let base class fire events
            base.OnKeyPress(e);
        }