Geld wird geändert
This commit is contained in:
@@ -27,6 +27,7 @@ namespace Casino
|
||||
Database db = new Database();
|
||||
private List<Byte[]> AlleBilder;
|
||||
ObservableCollection<User> users = new ObservableCollection<User>();
|
||||
private int[,] currentSlot = new int[3, 6];
|
||||
|
||||
public Slots()
|
||||
{
|
||||
@@ -49,6 +50,7 @@ namespace Casino
|
||||
};
|
||||
Konto.Text = users[MainWindow.currentUser].Geld.ToString();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -72,8 +74,6 @@ namespace Casino
|
||||
}
|
||||
private async Task Spin()
|
||||
{
|
||||
int[,] currentSlot = new int[3, 6];
|
||||
users[MainWindow.currentUser].Geld += 100;
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
|
||||
@@ -114,8 +114,14 @@ namespace Casino
|
||||
|
||||
private async void Spin(object sender, RoutedEventArgs e)
|
||||
{
|
||||
await Spin();
|
||||
users[MainWindow.currentUser].Geld++;
|
||||
Konto.Text = users[MainWindow.currentUser].Geld.ToString();
|
||||
await Spin();
|
||||
|
||||
|
||||
db.UpdateGeld(
|
||||
users[MainWindow.currentUser].ID,
|
||||
users[MainWindow.currentUser].Geld);
|
||||
}
|
||||
|
||||
private void Hauptmenue(object sender, RoutedEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user