diff --git a/Client/Views/LoginScreen.xaml b/Client/Views/LoginScreen.xaml
index eea926d..49d9c65 100644
--- a/Client/Views/LoginScreen.xaml
+++ b/Client/Views/LoginScreen.xaml
@@ -24,7 +24,7 @@
-
+
diff --git a/Client/Views/LoginScreen.xaml.cs b/Client/Views/LoginScreen.xaml.cs
index ec453c4..f40641a 100644
--- a/Client/Views/LoginScreen.xaml.cs
+++ b/Client/Views/LoginScreen.xaml.cs
@@ -27,9 +27,12 @@ namespace Client.Views
private void Button_EnterUsername(object sender, RoutedEventArgs e)
{
- User user = new User(usernameTextbox.Text);
+ string name = usernameTextbox.Text;
+ if (name == string.Empty) return;
+ User user = new User(name);
+
Client client = new Client(user.Username);
- loginButton.IsEnabled = false;
+ LoginButton.IsEnabled = false;
client.OnSuccessfullConnect = () =>
{
// because we need to start the main window on a UI thread, we need to let the dispatcher handle it, which will execute the code on the ui thread