Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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();
            }
        }
Exemplo n.º 3
0
 public void addTask(aTask tache)
 {
     addTask(tache, false);
 }