Esempio n. 1
0
        bool ITopWindowEventRoot.RootProcessDialogKey(int keyData)
        {
            UI.UIKeys k = (UIKeys)keyData;

            if (_currentKbFocusElem == null)
            {
                //set
                _lastKeydownWithShift   = ((k & UIKeys.Shift) == UIKeys.Shift);
                _lastKeydownWithAlt     = ((k & UIKeys.Alt) == UIKeys.Alt);
                _lastKeydownWithControl = ((k & UIKeys.Control) == UIKeys.Control);

                return(false);
            }


            StopCaretBlink();

            UIKeyEventArgs e = GetFreeKeyEvent();

            e.KeyData = (int)keyData;
            e.SetEventInfo(
                (int)keyData,
                _lastKeydownWithShift   = ((k & UIKeys.Shift) == UIKeys.Shift),
                _lastKeydownWithAlt     = ((k & UIKeys.Alt) == UIKeys.Alt),
                _lastKeydownWithControl = ((k & UIKeys.Control) == UIKeys.Control));
            bool result = false;

            e.ExactHitObject = e.SourceHitElement = _currentKbFocusElem;
            result           = _currentKbFocusElem.ListenProcessDialogKey(e);
            ReleaseKeyEvent(e);
            return(result);
        }
Esempio n. 2
0
 void SetKeyData(UIKeyEventArgs keyEventArgs, int keydata)
 {
     keyEventArgs.SetEventInfo(keydata, _lastKeydownWithShift, _lastKeydownWithAlt, _lastKeydownWithControl);
 }