public Stationenindernaehe(System.Device.Location.GeoCoordinate coord, SwissTransport.ITransport _transport)
        {
            InitializeComponent();

            Stations stations = _transport.GetCloseStations(coord.Latitude.ToString(), coord.Longitude.ToString());

            foreach (Station station in stations.StationList)
            {
                CloseStationGrid.Rows.Add(station.Name, station.Distance + " m");
            }
        }
        private void On_Text_Changed_Nach(object sender, EventArgs e)
        {
            string ankunft = txtAnkunft.Text;

            transport = new SwissTransport.Transport();

            libVorschlagNach.Items.Clear();

            var stationNach = transport.GetStations(ankunft).StationList;

            for (int i = 0; i < stationNach.Count - 1; i++)
            {
                string ausgabeNach = stationNach[i].Name;
                try
                {
                    libVorschlagNach.Items.Add(ausgabeNach);
                }catch (System.ArgumentNullException)
                {
                    txtAnkunft.Text = txtAnkunft.Text.Substring(0, txtAnkunft.Text.Length - 1);
                    txtAnkunft.Select(txtAnkunft.Text.Length, 0);
                }
            }
        }
        private void On_Text_Changed_Station(object sender, EventArgs e)
        {
            string station = txtStation.Text;

            transport = new SwissTransport.Transport();

            libVorschlagStation.Items.Clear();

            var stationFahrplan = transport.GetStations(station).StationList;

            for (int i = 0; i < stationFahrplan.Count - 1; i++)
            {
                string ausgabeStation = stationFahrplan[i].Name;
                try
                {
                    libVorschlagStation.Items.Add(ausgabeStation);
                }
                catch (System.ArgumentNullException)
                {
                    txtStation.Text = txtStation.Text.Substring(0, txtStation.Text.Length - 1);
                    txtStation.Select(txtStation.Text.Length, 0);
                }
            }
        }
 public ConnectionsView()
 {
     InitializeComponent();
     transport = new SwissTransport.Transport();
     txtTimeConnections.Text = DateTime.Now.ToString("HH:mm");
 }