public void addTask(System.ComponentModel.DoWorkEventHandler doWork, System.ComponentModel.RunWorkerCompletedEventHandler runCompleted, Hashtable arguments, bool prioritaire) { aTask tache = new aTask(); tache.doWorkHandler = doWork; tache.runCompletedHandler = runCompleted; tache.arguments = arguments; addTask(tache, prioritaire); }
public void addTask(aTask tache, bool prioritaire) { if (!_pileAvailable && (_liste.Count > 0)) { throw new Exception("Already busy"); } if (prioritaire && (_liste.Count > 0)) { _liste.Insert(0, tache); } else { _liste.Add(tache); } if (!IsBusy) { launchNextTask(); } }
public void addTask(aTask tache) { addTask(tache, false); }