Пример #1
0
 /// <summary>
 /// Process a key down by finding the correct month and calling the associated key controller.
 /// </summary>
 /// <param name="c">Owning control.</param>
 /// <param name="e">A KeyEventArgs that contains the event data.</param>
 /// <returns>True if the key was processed; otherwise false.</returns>
 public bool ProcessKeyDown(Control c, KeyEventArgs e)
 {
     // We must have a focused day
     if (FocusDay != null)
     {
         KeyController.KeyDown(c, e);
         return(true);
     }
     else
     {
         return(false);
     }
 }
Пример #2
0
 /// <summary>
 /// Key has been pressed down.
 /// </summary>
 /// <param name="e">A KeyEventArgs that contains the event data.</param>
 public virtual void KeyDown(KeyEventArgs e)
 {
     // Use key controller as first preference
     if (KeyController != null)
     {
         KeyController.KeyDown(OwningControl, e);
     }
     else
     {
         // Bubble event up to the parent
         Parent?.KeyDown(e);
     }
 }