コード例 #1
0
        /// <summary>
        /// Displays connections from the stationboard from the specified start location.
        /// </summary>
        private void DisplayStationBoards()
        {
            // request stationboards from the API
            List <StationBoard> stationBoards = _transportHandler.GetStationBoard(cmbStartLocation.Text, "").Entries;

            // clear the listview so it does not over populate with false and non-distinct connections
            ltvConnections.Items.Clear();

            foreach (StationBoard stationBoard in stationBoards)
            {
                // convert stationboard into connection
                Connection connection = ConvertStationBoardToConnection(stationBoard);

                // validate connection
                if (!IsDateValid(connection))
                {
                    continue;
                }

                AddConnectionToListView(connection);
            }
        }