Esempio n. 1
0
 protected override void KeyboardKeyMessage(char key, bool pressed, ref bool handled)
 {
     if (ActiveChild != null)
     {
         handled = true;
         ActiveChild.SendKeyboardKeyEvent(key, pressed);
     }
     base.KeyboardKeyMessage(key, pressed, ref handled);
 }
Esempio n. 2
0
 /// <summary>
 /// Override this message to handle key events internally.
 /// </summary>
 /// <param name="key">Integer value of the key affected</param>
 /// <param name="pressed">True if the key is currently being pressed; false if released</param>
 /// <param name="handled">true if the event is handled. Set to true if handled.</param>
 /// <remarks>
 /// Forwards the message to <see cref="Container.ActiveChild"/>
 /// </remarks>
 protected override void KeyboardKeyMessage(char key, bool pressed, ref bool handled)
 {
     //TODO: check if this code shouldn't go to Container
     if (ActiveChild != null)
     {
         ActiveChild.SendKeyboardKeyEvent(key, pressed);
     }
     base.KeyboardKeyMessage(key, pressed, ref handled);
 }