private void ConnectButton_Click(object sender, EventArgs e) { connectionForm = new ClientConnectionForm(); connectionForm.ShowDialog(); if (client.AttemptToConnect(connectionForm.GetIPEndPoint(), connectionForm.GetNickname())) { isConnected = true; ConnectButton.Visibility = Visibility.Hidden; DisconnectButton.Visibility = Visibility.Visible; InputField.IsReadOnly = false; NicknameChangeBox.IsEnabled = true; PictionaryButton.IsEnabled = true; ChangeNicknameButton.IsEnabled = true; } }