/// <summary> /// Displays connections from a given start and destination location. /// </summary> private void DisplayConnections() { // request connections from the API Connections connections = _transportHandler.GetConnections(cmbStartLocation.Text, cmbDestinationLocation.Text, 16); // clear the listview so it does not over populate with false and non-distinct connections ltvConnections.Items.Clear(); foreach (Connection connection in connections.ConnectionList) { // validate connection if (!IsDateValid(connection)) { continue; } AddConnectionToListView(connection); } }