Exemplo n.º 1
0
        private bool ExecuteNextJob(out Object[] currentJob)
        {
            currentJob = null;

            lock (m_workQueue)
            {
                if (m_workQueue.Count == 0)
                {
                    Monitor.Wait(m_workQueue);
                    return(false);
                }
                currentJob = m_workQueue.Dequeue();
            }

            PivotImage image         = (PivotImage)currentJob[0];
            String     targetDziPath = (String)currentJob[1];

            image.EnsureLocal();

            DZ.ImageCreator imageCreator = new DZ.ImageCreator();
            imageCreator.Create(image.SourcePath, targetDziPath);

            return(true);
        }
        private bool ExecuteNextJob(out Object[] currentJob)
        {
            currentJob = null;

            lock (m_workQueue)
            {
                if (m_workQueue.Count == 0)
                {
                    Monitor.Wait(m_workQueue);
                    return false;
                }
                currentJob = m_workQueue.Dequeue();
            }

            PivotImage image = (PivotImage)currentJob[0];
            String targetDziPath = (String)currentJob[1];

            image.EnsureLocal();

            DZ.ImageCreator imageCreator = new DZ.ImageCreator();
            imageCreator.Create(image.SourcePath, targetDziPath);

            return true;
        }