public string Handle(List <Key> keysDown)
 {
     if (first != null)
     {
         return(first.Handle(keysDown));
     }
     else
     {
         return(null);
     }
 }
Exemple #2
0
 public string Handle(List <Key> keysDown)
 {
     if (TryHandle(keysDown))
     {
         return(associatedCode);                // We can handle this, our command key goes to the top.
     }
     else if (nextElement != null)
     {
         return(nextElement.Handle(keysDown));                // Not the end of the line and we can't handle this, delegate to next element.
     }
     else
     {
         return(null);                // End of the line and we can't handle this, null goes to the top.
     }
 }