Money Anzeigen
This commit is contained in:
+13
-2
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user