private void radioButtonOneTime_CheckedChanged(object sender, EventArgs e) { ModifyScheduleObject(); if (radioButtonOneTime.Checked) { labelTakeScreenshotsOnce.Enabled = true; dateTimePickerCaptureAt.Enabled = true; labelTakeScreenshotsPeriod.Enabled = false; dateTimePickerStartAt.Enabled = false; labelAnd.Enabled = false; dateTimePickerStopAt.Enabled = false; labelLogic.Enabled = false; comboBoxLogic.Enabled = false; groupBoxInterval.Enabled = false; numericUpDownHoursInterval.Enabled = false; numericUpDownMinutesInterval.Enabled = false; numericUpDownSecondsInterval.Enabled = false; StopSchedule.Invoke(sender, e); buttonOK.Enabled = true; buttonStartSchedule.Enabled = false; buttonStopSchedule.Enabled = false; } CheckTimerEnabled(); }
private void buttonStopSchedule_Click(object sender, EventArgs e) { buttonOK.Enabled = true; groupBoxInterval.Enabled = true; buttonStartSchedule.Enabled = true; buttonStopSchedule.Enabled = false; if (comboBoxLogic.SelectedIndex == 0) { ScheduleObject.Timer.Tag = null; } else if (comboBoxLogic.SelectedIndex == 1) { ScheduleObject.Timer.Tag = ScheduleObject; } StopSchedule.Invoke(sender, e); }