private void CommandListenerOnQueryCommand(QueryCommand queryCommand, TcpClient tcpClient) { if (!_acceptCommands) { return; } queryCommand.CommandTextOriginal = queryCommand.CommandText; queryCommand.CommandText = queryCommand.CommandText.Replace("\r\n", " ").Replace(" ", " "); if (queryCommand.CommandText.Length > 100) { queryCommand.CommandText = queryCommand.CommandText.Substring(0, 100); } _view.AddQueryCommand(queryCommand); }