//相应新增运行任务事件 private void OnAddRunTask(object sender, cAddRunTaskEventArgs e) { //任务增加后,会自动运行 m_rTask.AddTask(e.RunTask); //判断此计划是否过期,如果过期,则修改计划的状态 cPlans cp = new cPlans(); cp.IfEnabled(Int64.Parse(e.RunTask.PlanID), false); cp = null; }
private void AutoState() { cPlans cp = new cPlans(); for (int i = 0; i < m_runTasks.Count; i++) { if (m_runTasks[i].IsDisabled == true) { cp.IfEnabled(m_runTasks[i].PlanID, true); } } cp = null; }