Example #1
0
        private void textboxvon_KeyUp(object sender, KeyEventArgs e)
        {
            listBox1.Items.Clear();
            Stations resultat = transport.GetStations(textboxvon.Text);

            foreach (Station station in resultat.StationList)
            {
                listBox1.Items.Add(station.Name);
            }
        }
Example #2
0
        // Start Destination

        private void Tbxfrom_TextChanged(object sender, EventArgs e)
        {
            {
                var textBox = new TextBox();


                lbxdisplay1.Show();
                Stations = Transport.GetStations(tbxfrom.Text);
                lbxdisplay1.DataSource    = Stations.StationList;
                lbxdisplay1.DisplayMember = "Name";
            }
        }
Example #3
0
        // gets possible stations for the input
        public List <Station> getPossibleStations(string station)
        {
            List <Station> possibleStations;
            ITransport     transport = new Transport();

            possibleStations = transport.GetStations(station).StationList;
            return(possibleStations);
        }
Example #4
0
 private void txtStart_TextChanged(object sender, EventArgs e)
 {
     if (_changed == false)
     {
         if (!(txtStart.Text.Length == 0))
         {
             listStart.Visible = true;
             listStart.Items.Clear();
             string start   = txtStart.Text;
             var    station = transport.GetStations(start);
             foreach (var stat in station.StationList)
             {
                 listStart.Items.Add(stat.Name);
             }
         }
         else
         {
             listStart.Visible = false;
         }
     }
 }