This commit is contained in:
2026-09-13 15:59:13 +02:00
parent cf90775bad
commit 51f22f4155
2 changed files with 50 additions and 25 deletions
+13
View File
@@ -156,6 +156,8 @@ namespace Casino
}
private void StartRound()
{
try
{
if (currentBet <= 0 || currentBet > CurrentUser.Geld)
{
@@ -177,6 +179,17 @@ namespace Casino
UpdateWinDisplay();
SetPhaseUI();
}
catch (NullReferenceException)
{
MessageBox.Show(
"Bitte ein Betrag eingeben",
"Fehlermeldung 101",
MessageBoxButton.OK,
MessageBoxImage.Information);
}
}
private void LoadCards()
{
+12
View File
@@ -131,6 +131,8 @@ namespace Casino
private async void Spin(object sender, RoutedEventArgs e)
{
int einsatz = Convert.ToInt32(einsatzFeld.Text);
users[MainWindow.currentUser].Geld -= einsatz;
Konto.Text = users[MainWindow.currentUser].Geld.ToString();
@@ -140,6 +142,16 @@ namespace Casino
db.UpdateGeld(
users[MainWindow.currentUser].ID,
users[MainWindow.currentUser].Geld);
/* catch (NullReferenceException)
{
MessageBox.Show(
"Bitte ein Betrag eingeben",
"Fehlermeldung 101",
MessageBoxButton.OK,
MessageBoxImage.Information);
}*/
}
private void Hauptmenue(object sender, RoutedEventArgs e)