Exemplo n.º 1
0
 /// <summary>
 /// aborts the currently active job
 /// </summary>
 public void Abort()
 {
     Debug.Assert(IsEncoding);
     if (currentProcessor == null || currentJob.Status == JobStatus.ABORTING)
     {
         return;
     }
     try
     {
         currentJob.Status = JobStatus.ABORTING;
         refreshAll();
         currentProcessor.stop();
     }
     catch (JobRunException er)
     {
         mainForm.Log.LogValue("Error attempting to stop processing", er, ImageType.Error);
     }
     markJobAborted();
     if (status == JobWorkerStatus.Stopping)
     {
         status = JobWorkerStatus.Stopped;
     }
     else
     {
         status = JobWorkerStatus.Idle;
     }
     refreshAll();
 }
Exemplo n.º 2
0
        /// <summary>
        /// aborts the currently active job
        /// </summary>
        public void Abort()
        {
            Debug.Assert(IsRunning);

            if (currentProcessor != null)
            {
                if (currentJob.Status == JobStatus.ABORTING)
                {
                    return;
                }
                try
                {
                    if (currentJob.Status == JobStatus.PAUSED)
                    {
                        currentProcessor.resume();
                    }
                    currentJob.Status = JobStatus.ABORTING;
                    RefreshAll();
                    currentProcessor.stop();
                }
                catch (JobRunException er)
                {
                    mainForm.Log.LogValue("Error attempting to stop processing", er, ImageType.Error);
                }
                MarkJobAborted();
            }
            status = JobWorkerStatus.Stopped;
            RefreshAll();
        }
Exemplo n.º 3
0
 /// <summary>
 /// aborts the currently active job
 /// </summary>
 public void Abort()
 {
     Debug.Assert(IsEncoding);
     if (currentProcessor == null)
     {
         return;
     }
     try
     {
         currentProcessor.stop();
     }
     catch (JobRunException er)
     {
         mainForm.addToLog("Error when trying to stop processing: " + er.Message + "\r\n");
     }
     markJobAborted();
     status = JobWorkerStatus.Idle;
     refreshAll();
 }
Exemplo n.º 4
0
 public virtual bool stop(out string error)
 {
     error = null;
     return(encoder.stop(out error));
 }