Compare commits
2
Commits
049960d30d
...
370616d573
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
370616d573 | ||
|
|
5986e5b584 |
@@ -90,6 +90,7 @@ namespace Casino
|
|||||||
users = db.GetUser();
|
users = db.GetUser();
|
||||||
|
|
||||||
UpdateAccountDisplay();
|
UpdateAccountDisplay();
|
||||||
|
|
||||||
StartNewGame();
|
StartNewGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,7 +112,6 @@ namespace Casino
|
|||||||
|
|
||||||
|
|
||||||
// 1. Einsatz sofort auf dem Konto abziehen & in der Datenbank speichern
|
// 1. Einsatz sofort auf dem Konto abziehen & in der Datenbank speichern
|
||||||
currentgeld -= Convert.ToInt32(currentBet);
|
|
||||||
db.UpdateGeld(users[MainWindow.currentUser].ID, currentgeld);
|
db.UpdateGeld(users[MainWindow.currentUser].ID, currentgeld);
|
||||||
UpdateAccountDisplay();
|
UpdateAccountDisplay();
|
||||||
|
|
||||||
@@ -239,6 +239,11 @@ namespace Casino
|
|||||||
bool ok = (chosenColor == CardColor.Red && targetCard.IsRed) ||
|
bool ok = (chosenColor == CardColor.Red && targetCard.IsRed) ||
|
||||||
(chosenColor == CardColor.Black && !targetCard.IsRed);
|
(chosenColor == CardColor.Black && !targetCard.IsRed);
|
||||||
ProcessGuess(ok);
|
ProcessGuess(ok);
|
||||||
|
var currentUser = users[MainWindow.currentUser];
|
||||||
|
currentBet -= Convert.ToInt32(TxtBet.Text);
|
||||||
|
db.UpdateGeld(currentUser.ID, currentUser.Geld);
|
||||||
|
UpdateAccountDisplay();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BtnHigher_Click(object sender, RoutedEventArgs e) => GuessHigherLower(true);
|
private void BtnHigher_Click(object sender, RoutedEventArgs e) => GuessHigherLower(true);
|
||||||
@@ -339,6 +344,7 @@ namespace Casino
|
|||||||
{
|
{
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TxtBet_Pasting(object sender, DataObjectPastingEventArgs e)
|
private void TxtBet_Pasting(object sender, DataObjectPastingEventArgs e)
|
||||||
@@ -352,5 +358,6 @@ namespace Casino
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user