Esempio n. 1
0
 /// <summary>
 /// Keys the pressed.
 /// </summary>
 /// <param name="key">The key.</param>
 private void KeyPressed(KeyboardKey key)
 {
     this.strings.AppendLine(String.Format("Keyboard Pressed: {0}", key.Key));
 }
Esempio n. 2
0
 /// <summary>
 /// Called when a keyboard button is released.
 /// </summary>
 /// <param name="key">The key.</param>
 internal void OnInputKeyboardRelease(KeyboardKey key)
 {
     if (this.HasFocus)
     {
         this.KeyUp(this, new KeyboardEventArgs(key));
     }
     else
     {
         foreach (var control in this.Controls)
         {
             if (control.Enabled)
             {
                 control.OnInputKeyboardRelease(key);
             }
         }
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="KeyboardEventArgs" /> class.
 /// </summary>
 /// <param name="key">The key.</param>
 public KeyboardEventArgs(KeyboardKey key)
     : base()
 {
     this.Key = key;
 }
Esempio n. 4
0
 /// <summary>
 /// Listens for keyboard button release.
 /// </summary>
 /// <param name="key">The key.</param>
 private void OnInputKeyboardReleased(KeyboardKey key)
 {
     if (!this.Transitioning)
     {
         if (this.focus != null)
         {
             this.focus.OnInputKeyboardRelease(key);
         }
     }
 }
Esempio n. 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="KeyboardEventArgs" /> class.
 /// </summary>
 /// <param name="time">The time.</param>
 /// <param name="key">The key.</param>
 public KeyboardEventArgs(double time, KeyboardKey key)
     : base(time)
 {
     this.Key = key;
 }