示例#1
0
        private void AnimatedThreadWorkerDoFilteringWork(object sender, DoWorkEventArgs e)
        {
            _resultDirectiveArray.Clear();

            #region Фильтрация директив
            AnimatedThreadWorker.ReportProgress(50, "filter directives");

            AdditionalFilterItems(_preResultDirectiveArray, _resultDirectiveArray);

            var component = new List <Component>();

            if (_resultDirectiveArray.All(c => c is ComponentDirective))
            {
                foreach (ComponentDirective cd in _resultDirectiveArray)
                {
                    component.Add(cd.ParentComponent);
                }
            }

            _resultDirectiveArray.AddRange(component.ToArray());

            if (AnimatedThreadWorker.CancellationPending)
            {
                e.Cancel = true;
                return;
            }
            #endregion

            AnimatedThreadWorker.ReportProgress(100, "Complete");
        }