Пример #1
0
 protected virtual void OnKeyUp(KeyboardEventArgs e)
 {
     if (KeyUp != null) KeyUp(this, e);
 }
Пример #2
0
        public static void _OnSpecialUp(int key, int x, int y)
        {
            Window w = null;
            if (mvarLastFullscreenWindow != null)
            {
                w = mvarLastFullscreenWindow;
                            }
            else
            {
                int handle = Internal.FreeGLUT.Methods.glutGetWindow();
                w = handleWindows[handle];
            }

            int modifiers = Internal.FreeGLUT.Methods.glutGetModifiers();

            KeyboardKey keys = GetSpecialKeyboardKey(key);
            KeyboardModifierKey modifierKeys = KeyboardModifierKey.None;

            KeyboardEventArgs e = new KeyboardEventArgs(keys, modifierKeys);
            w.OnKeyUp(e);
        }
Пример #3
0
 protected virtual void OnKeyDown(KeyboardEventArgs e)
 {
     if (KeyDown != null) KeyDown(this, e);
 }
Пример #4
0
        public static void _OnSpecial(int key, int x, int y)
        {
            Window w = null;
            if (mvarLastFullscreenWindow != null)
            {
                w = mvarLastFullscreenWindow;
                            }
            else
            {
                int handle = Internal.FreeGLUT.Methods.glutGetWindow();
                w = handleWindows[handle];
            }

            int modifiers = Internal.FreeGLUT.Methods.glutGetModifiers();

            KeyboardKey keys = GetSpecialKeyboardKey(key);
            KeyboardModifierKey modifierKeys = (KeyboardModifierKey)modifiers;

            KeyboardEventArgs e = new KeyboardEventArgs(keys, modifierKeys);
            w.OnKeyDown(e);

            foreach (Control ctl in w.Controls)
            {
                ctl.OnKeyDown(e);
            }
        }