private async void Connect_button_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(nickname_text.Text)) { connection_status_label.Text = "Please enter nickname"; return; } Uri serverUri = new Uri(url_textbox.Text); string status = await _gameFacade.ConnectToServer(serverUri); connection_status_label.Text = status; if (status.ToLower().Equals("open")) { send_button.Enabled = true; nickname_text.ReadOnly = true; _gameFacade.SetPlayerName(nickname_text.Text); await _gameFacade.SendMessageToServer(nickname_text.Text); } }