예제 #1
0
        private void ConfigurationDialog_Load(object sender, EventArgs e)
        {
            List <Route> routes        = _backend.RequestListOfRoutes();
            Route        selectedRoute = routes.Where(z => z.UniqueIdentifier == ConfigSettings.Default.RouteUniqueIdentifier).FirstOrDefault();

            cmboRoute.DataSource    = routes;
            cmboRoute.SelectedItem  = selectedRoute;
            chkEnableAlerts.Checked = ConfigSettings.Default.EnableAlerts;
            nmAlertWhen.Value       = ConfigSettings.Default.AlertWhenETA;

            TimeSpan start = TimeSpan.FromSeconds(ConfigSettings.Default.AlertStart);
            TimeSpan end   = TimeSpan.FromSeconds(ConfigSettings.Default.AlertEnd);

            tmStart.Value = DateTime.Today.Add(start);
            tmEnd.Value   = DateTime.Today.Add(end);
        }