private void tbtnReloadScheduleGroupData_Click(object sender, EventArgs e) { var jobber = new Jobber(); jobber.OnAddingScheduleError += Jobber_OnAddingScheduleError; jobber.OnScheduleAddedCompleted += Jobber_OnScheduleAddedCompleted; jobber.OnScheduleAdding += Jobber_OnScheduleAdding; jobber.RemoveAllSchedules(); btnClearLog_Click(null, null); Init(); }
private void btnStopAllSchedules_Click(object sender, EventArgs e) { var jobber = new Jobber(); jobber.OnAddingScheduleError += Jobber_OnAddingScheduleError; jobber.OnScheduleAddedCompleted += Jobber_OnScheduleAddedCompleted; jobber.OnScheduleAdding += Jobber_OnScheduleAdding; jobber.RemoveAllSchedules(); _scheduleGroupViewModelList.ForEach(x => ToggleStatus(x)); dgvSchedulers.Refresh(); btnStartAllSchedules.Enabled = true; btnStopAllSchedules.Enabled = false; }
/// <summary> /// 停止所有作业 /// </summary> private void StopJob() { _jobber.RemoveAllSchedules(); }