//Puntos Key Down rule for when pressing Enter on the Puntos text box private void PuntosInput_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter && string.IsNullOrEmpty(JugadaInput.Text)) { e.Handled = true; JugadaInput.Focus(); } else if (e.Key == Key.Enter && !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(); }