From 2091f5e903f1f813c05a4d676d91df8a709aed83 Mon Sep 17 00:00:00 2001 From: "NBTEMP\\bib" Date: Thu, 20 Aug 2026 16:03:46 +0200 Subject: [PATCH] =?UTF-8?q?Login=20fenster=20=C3=B6ffnen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Casino/MainWindow.xaml.cs | 17 ++++++++++++++--- Casino/User.cs | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Casino/MainWindow.xaml.cs b/Casino/MainWindow.xaml.cs index 06a3f77..b0f7ee3 100644 --- a/Casino/MainWindow.xaml.cs +++ b/Casino/MainWindow.xaml.cs @@ -20,12 +20,23 @@ namespace Casino { InitializeComponent(); - var window = new Login(); - window.Owner = this; - window.ShowDialog(); + //copilot hilfe + Loaded += (_, _) => + { + var window = new Login(); + window.Owner = this; + window.ShowDialog(); + if(window.DialogResult == false) + { + Close(); + } + }; + } + + } } \ No newline at end of file diff --git a/Casino/User.cs b/Casino/User.cs index 7b23680..5d94c34 100644 --- a/Casino/User.cs +++ b/Casino/User.cs @@ -8,7 +8,7 @@ namespace Casino { public class User { - public string ID { get; } + public string ID { get; set; } public string Name { get; set; } public int Alter { get; set; } public string Passwort { get; set; }