private void SendButton_Click(object sender, RoutedEventArgs e) { var messageToSend = ToSendTextBox.Text; ToSendTextBox.Text = string.Empty; ToSendTextBox.Focus(); if (messageToSend.StartsWith("?")) { _commandService.ExecuteCommand(messageToSend); return; } PrintUserLine(Nickname, messageToSend); var convertedMessage = InformationConverter.Serialize(new Information(Nickname, messageToSend)); _client.SendMessage(convertedMessage); }
private void ChangeTitle() { Title += $" - {Nickname}"; ToSendTextBox.Focus(); }