src/Misc/EFTools/DesignXmlCore/Base/Shell/TreeGridDesignerTreeControl.cs
/// <summary>
///     Overriden to preprocess key messages.
/// </summary>
Overriden to preprocess key messages.
Overriden to preprocess key messages .
protected override bool ProcessDialogKey(Keys keyData)
        {
            try
            {
                var retVal = ProcessKeyDown(new KeyEventArgs(keyData));
                if (retVal != ProcessKeyReturn.KeyHandledActionOccurred)
                {
                    var baseRetVal = base.ProcessDialogKey(keyData);
                    return baseRetVal || retVal == ProcessKeyReturn.KeyHandledNoAction;
                }
                return true;
            }
            catch (Exception e)
            {
                if (CriticalException.IsCriticalException(e))
                {
                    throw;
                }
                DisplayException(e);
                return false;
            }
        }
protected override bool ProcessDialogKey ( Keys keyData ) { try { var retVal = ProcessKeyDown ( new KeyEventArgs ( keyData ) ) ; if ( retVal != ProcessKeyReturn . KeyHandledActionOccurred ) { var baseRetVal = base . ProcessDialogKey ( keyData ) ; return baseRetVal || retVal == ProcessKeyReturn . KeyHandledNoAction ; } return true ; } catch ( Exception e ) { if ( CriticalException . IsCriticalException ( e ) ) { throw ; } DisplayException ( e ) ; return false ; } }
Overriden to preprocess key messages.
Overriden to preprocess key messages .
// This requires some explanation.  WinForms uses this method to pre-process key messages, performing actions // such as moving focus around a dialog when Tab is pressed.  Returning true here causes message processing/translation to halt. // There are three possible results of our keyboard processing: // 1.  Branch doesn't handle the key // 2.  Branch indicates it handles the key, but due to tree structure, no handling occurs. //     A common example is pressing Tab on the last column of the last row. // 3.  Branch indicates it handles the key, and handling occurs. // For (1), we want base WinForms processing to continue as usual.  For (2), base preprocessing should // continue, but we don't want any further translation/processing of the message after that.  This allows // things like dialog focus movement to work correctly, but prevents the keystroke from showing up in in-place edit controls. // For (3), we just return true, as we've fully handled the key.
keyData
Keys