Example #1
0
        /// <summary>
        /// Starts a display operation
        /// </summary>
        /// <param name="taskQueue">Queue with request headers that should be added to the list</param>
        private void Display(FilterTaskQueue taskQueue)
        {
            TVRequestInfo currentTask;

            _list.Invoke((MethodInvoker) delegate
            {
                _list.SuspendLayout();
                while (taskQueue.Count > 0 && !_stopRequested)
                {
                    currentTask = taskQueue.Dequeue();
                    _list.AddRow(currentTask, false);
                }
                _list.ResumeLayout();
                if (!_stopRequested)
                {
                    Thread.Sleep(DISPLAY_DELAY);                     //sleep a bit to allow user interaction with the list
                }
            });
        }