Exemplo n.º 1
0
        public void Convert(TaskSetup setup)
        {
            var task = new MagickTask(setup);

            task.TaskFinishedCallback += () => TaskFinished(setup);
            task.ConvertFinishedEvent += ConvertFinished;
            task.ConvertProgressEvent += ConvertProgress;
            _queue.EnqueueTask(task);
        }
Exemplo n.º 2
0
 public void EnqueueTask(MagickTask task)
 {
     lock (_lockObj)
     {
         task.TaskFinishedCallback += new Action(NextTask);
         task.TaskFinishedCallback += new Action(OnTaskCompleted);
         _tasks.Enqueue(task);
         ++_queuedTasksCount;
     }
     if (!_isEnabled || CurrrentStatus != QueueStatus.NoTasks)
     {
         return;
     }
     NextTask();
 }