Busfahrer hintergrundmusik

This commit is contained in:
2026-09-13 15:40:50 +02:00
parent 471aadf272
commit cf90775bad
2 changed files with 30 additions and 3 deletions
+6 -2
View File
@@ -78,14 +78,13 @@ namespace Casino
private List<Card> deck = new List<Card>();
private List<Card> handCards = new List<Card>();
private ImageSource cardBackImage = null!;
Audioplayer music = new Audioplayer();
private int currentPhase = 0;
private decimal currentBet = 0;
private decimal currentProfit = 0;
private bool roundRunning = false;
private static readonly Regex NumberRegex = new Regex("^[0-9]+$");
public Busfahrer()
{
InitializeComponent();
@@ -94,6 +93,7 @@ namespace Casino
UpdateAccountDisplay();
ShowWaitingState();
music.PlayLoopingSound_2(db.GetSound(20));
}
private User CurrentUser => users[MainWindow.currentUser];
@@ -553,6 +553,7 @@ namespace Casino
private void Hauptmenue(object sender, RoutedEventArgs e)
{
music.Stop();
Close();
}
@@ -580,6 +581,9 @@ namespace Casino
// EINSATZ VALIDIERUNG
// =========================
private static readonly Regex NumberRegex = new Regex("^[0-9]+$");
private void TxtBet_PreviewTextInput(object sender, TextCompositionEventArgs e)
{
e.Handled = !NumberRegex.IsMatch(e.Text);