//Jugada Key Down rule for when pressing Enter on the Jugada text box private void JugadaInput_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter && string.IsNullOrEmpty(PuntosInput.Text)) { e.Handled = true; PuntosInput.Focus(); } else if (e.Key == Key.Enter && !string.IsNullOrEmpty(JugadaInput.Text) && !string.IsNullOrEmpty(PuntosInput.Text.Trim('0'))) { AddValuesToDictionary(); } }
//Clean the text boxes of jugada and puntos after the items have been added to the dictionary public void ProximaJugada() { PuntosInput.Clear(); JugadaInput.Clear(); PuntosInput.Focus(); }