Weitere überarbeitung für Mainwindow

This commit is contained in:
NBTEMP\bib
2026-09-13 16:16:34 +02:00
parent a7bcf80935
commit 4594ae9bb5
3 changed files with 15 additions and 4 deletions
+11 -2
View File
@@ -19,12 +19,13 @@ namespace Casino
{
public static int currentUser;
ObservableCollection<User> users = new ObservableCollection<User>();
Database db = new Database();
public MainWindow()
{
InitializeComponent();
users = db.GetUser();
setup();
TxtName.Text = "User: " + users[currentUser].Name.ToString();
TxtKonto.Text = "Konto: " + users[currentUser].Geld.ToString();
}
private void Slots_Click(object sender, RoutedEventArgs e)
{
@@ -45,5 +46,13 @@ namespace Casino
Busfahrer slotsWindow = new Busfahrer();
slotsWindow.Show();
}
private void setup()
{
TxtName.Text = "User: " + users[currentUser].Name.ToString();
TxtKonto.Text = "Konto: " + users[currentUser].Geld.ToString();
}
}
}