private int setNumThread(aJob t) { int max; max = maxNum() + 1; t.numThread = max; return(max); }
public int addJob(TimerCallback method, object param, int timerBeforeStart) { aJob t; timerBeforeStart = Math.Max(0, timerBeforeStart); t = new aJob(method, param, timerBeforeStart); t.deleted += new aJob.delegateDeleted(oneDeleted); _listThread.Add(t); return(setNumThread(t)); }
private void oneDeleted(int numThread) { aJob jobTrouve = null; foreach (aJob job in _listThread) { if (job.numThread == numThread) { _listThread.Remove(job); jobTrouve = job; break; } } if (jobTrouve != null) { jobTrouve = null; } }