示例#1
0
        private void InternalStop()
        {
            if (_retrieveThreadPool != null)
            {
                _retrieveThreadPool.Stop(false);
                _retrieveThreadPool = null;
            }

            if (_imageBoxEnumerator != null)
            {
                _imageBoxEnumerator.Dispose();
                _imageBoxEnumerator = null;
            }
        }
示例#2
0
        private void InternalStart()
        {
            int retrieveConcurrency = Prefetch.Default.RetrieveConcurrency;

            if (retrieveConcurrency == 0)
            {
                return;
            }

            _imageBoxEnumerator = new ViewerFrameEnumerator(ImageViewer,
                                                            Math.Max(Prefetch.Default.SelectedWeighting, 1),
                                                            Math.Max(Prefetch.Default.UnselectedWeighting, 0),
                                                            Prefetch.Default.ImageWindow);

            _retrieveThreadPool = new BlockingThreadPool <Frame>(_imageBoxEnumerator, RetrieveFrame);
            _retrieveThreadPool.ThreadPoolName = "Retrieve";
            _retrieveThreadPool.Concurrency    = retrieveConcurrency;
            _retrieveThreadPool.ThreadPriority = ThreadPriority.BelowNormal;
            _retrieveThreadPool.Start();
        }