/// <summary> /// Generated when the scheduling frequency is changed. /// </summary> /// <param name="sender">The object triggering the event.</param> /// <param name="e">Event argument.</param> private void scheduleSpan_CheckedChanged(object sender, EventArgs e) { RadioButton[] group = new RadioButton[] { scheduleDaily, scheduleWeekly, scheduleMonthly }; if (group.Contains(sender) && ((RadioButton)sender).Checked) { foreach (RadioButton button in group) { if (button != sender) { button.Checked = false; } } } scheduleDailyByDay.Enabled = scheduleDailyByDayLbl.Enabled = scheduleDailyByWeekday.Enabled = scheduleDaily.Checked && typeRecurring.Checked; scheduleWeeklyLbl.Enabled = scheduleWeeklyFreq.Enabled = scheduleWeeklyFreqLbl.Enabled = scheduleWeeklyMonday.Enabled = scheduleWeeklyTuesday.Enabled = scheduleWeeklyWednesday.Enabled = scheduleWeeklyThursday.Enabled = scheduleWeeklyFriday.Enabled = scheduleWeeklySaturday.Enabled = scheduleWeeklySunday.Enabled = scheduleWeekly.Checked && typeRecurring.Checked; scheduleMonthlyLbl.Enabled = scheduleMonthlyDayNumber.Enabled = scheduleMonthlyEveryLbl.Enabled = scheduleMonthlyFreq.Enabled = scheduleMonthlyMonthLbl.Enabled = scheduleMonthly.Checked && typeRecurring.Checked; scheduleDailySpan_CheckedChanged(sender, e); }