예제 #1
0
        private void comboBox1_SelectedValueChanged(object sender, EventArgs e)
        {
            if (cmboRoute.SelectedItem == null)
            {
                return;
            }

            List <Stop> stops        = _backend.RequestListOfStopsForRoute(SelectedRoute);
            Stop        selectedStop = null;

            if (SelectedRoute.RouteNo == ConfigSettings.Default.RouteNumber)
            {
                selectedStop = stops.Where(z => z.StopNo == ConfigSettings.Default.StopNumber).FirstOrDefault();
            }

            cmboStop.DataSource   = stops;
            cmboStop.SelectedItem = selectedStop;
        }