Money Anzeigen

This commit is contained in:
NBTEMP\bib
2026-09-09 11:14:57 +02:00
parent b2078c38b4
commit 6b2136fadf
6 changed files with 23 additions and 7 deletions
+13 -2
View File
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Text;
@@ -25,12 +26,13 @@ namespace Casino
private Random _random = new Random();
Database db = new Database();
private List<Byte[]> AlleBilder;
ObservableCollection<User> users = new ObservableCollection<User>();
public Slots()
{
InitializeComponent();
users = db.GetUser();
_bilder = new List<Image>
{
@@ -45,6 +47,8 @@ namespace Casino
db.GetCardImage(8),db.GetCardImage(9),db.GetCardImage(10),
};
Konto.Text = users[MainWindow.currentUser].Geld.ToString();
}
@@ -68,6 +72,7 @@ namespace Casino
}
private async Task Spin()
{
users[MainWindow.currentUser].Geld += 100;
for (int i = 0; i < 50; i++)
{
foreach (var image in _bilder)
@@ -85,5 +90,11 @@ namespace Casino
{
await Spin();
}
private void Hauptmenue(object sender, RoutedEventArgs e)
{
Close();
}
}
}