private void chkList_ItemCheck(object sender, ItemCheckEventArgs e) { var job = (Job)chkList.Items[e.Index]; if (job == null) { return; } if (e.NewValue == CheckState.Checked) { m_task.EnableJob(job); } else { m_task.DisableJob(job); } }