コード例 #1
0
        public void Convert(TaskSetup setup)
        {
            var task = new OfficeTask(setup);

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