Пример #1
0
        private TreeValue <TypeValueInfo> GetTreeValue(TreeOpe treeOpe)
        {
            TreeValue <TypeValueInfo> treeValue = new TreeValue <TypeValueInfo> {
                Index = _index, Value = _typeValueInfo, Level = _level, TreeOpe = treeOpe, Selected = false, Skip = false, Stop = false
            };

            TreeFilter treeFilter = TreeFilter.Select;

            if (_filter != null)
            {
                treeFilter = _filter(_typeValueInfo);
            }

            if ((treeFilter & TreeFilter.Stop) == TreeFilter.Stop)
            {
                treeValue.Stop = true;
            }

            else if ((treeFilter & TreeFilter.Skip) == TreeFilter.Skip)
            {
                treeValue.Skip = true;
            }

            else if ((treeFilter & TreeFilter.DontSelect) == 0)
            {
                treeValue.Selected = true;
            }
            return(treeValue);
        }
Пример #2
0
        private TreeValue<TypeValueInfo> GetTreeValue(TreeOpe treeOpe)
        {
            TreeValue<TypeValueInfo> treeValue = new TreeValue<TypeValueInfo> { Index = _index, Value = _typeValueInfo, Level = _level, TreeOpe = treeOpe, Selected = false, Skip = false, Stop = false };

            TreeFilter treeFilter = TreeFilter.Select;
            if (_filter != null)
                treeFilter = _filter(_typeValueInfo);

            if ((treeFilter & TreeFilter.Stop) == TreeFilter.Stop)
            {
                treeValue.Stop = true;
            }

            else if ((treeFilter & TreeFilter.Skip) == TreeFilter.Skip)
            {
                treeValue.Skip = true;
            }

            else if ((treeFilter & TreeFilter.DontSelect) == 0)
            {
                treeValue.Selected = true;
            }
            return treeValue;
        }