//--------------
        //PRIVATE fields

        public void Delete()
        {
            if (worker != null)
            {
                workerThread.Abort();
            }

            DeadlineRenderer.DeleteJob(this);
        }
 public void CleanUp(bool reset)
 {
     if (reset == false)
     {
         job.Status = JobStatus.JS_DONE;
         FireSuccessEvent();
     }
     else
     {
         DeadlineRenderer.DeleteJob(job);
         job.ErrorStatus = JobErrorStatus.JES_NONE;
         job.Status      = JobStatus.JS_IDLE;
     }
 }
        public void Reset()
        {
            foreach (Motif motif in MotifList)
            {
                motif.Reset();
            }

            Progress           = 0;
            ProductionProgress = 0;
            Status             = JobStatus.JS_IDLE;
            ErrorStatus        = JobErrorStatus.JES_NONE;

            if (worker != null)
            {
                worker.CleanUp(reset: true);

                if (workerThread != null)
                {
                    workerThread.Abort();
                }
            }

            DeadlineRenderer.DeleteJob(this);
        }