private void scheduleInterval_Leave(object sender, EventArgs e)
{
int selectedInt;
if (confScheduleInterval.SelectedItem == null) {
if (int.TryParse(confScheduleInterval.Text, out selectedInt)) {
for (int x = 0; x < confScheduleInterval.Items.Count; x++) {
if ((int)confScheduleInterval.Items[x] == selectedInt) {
confScheduleInterval.SelectedIndex = x;
return;
}
}
}
confScheduleInterval.SelectedIndex = confScheduleInterval.Items.Count - 3;
}
}