Zahlenbox repariert
This commit is contained in:
@@ -69,17 +69,17 @@ namespace Casino
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static readonly Regex _regex = new Regex("[^0-9]+€"); // Regex to match non-numeric input
|
||||
//Numberfield
|
||||
private static readonly Regex _regex = new Regex("^[0-9]"); // Regex to match non-numeric input
|
||||
|
||||
//nur nummern
|
||||
private void TextBox_OnPreviewTextInput(object sender, TextCompositionEventArgs e)
|
||||
private void TextBox_PreviewTextInput(object sender, TextCompositionEventArgs e)
|
||||
{
|
||||
e.Handled = !_regex.IsMatch(e.Text);
|
||||
e.Handled = !_regex.IsMatch(e.Text);
|
||||
}
|
||||
|
||||
// Keine Spaces
|
||||
private void TextBox_OnPreviewKeyDown(object sender, KeyEventArgs e)
|
||||
private void TextBox_PreviewKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.Key == Key.Space)
|
||||
{
|
||||
@@ -99,5 +99,6 @@ namespace Casino
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user