示例#1
0
        private void SetIsExpanded(ExpandArgs eargs)
        {
            bool update = !eargs.IgnoreChildren && !AsyncExpanding;

            if (update)
            {
                BeginUpdate();
            }
            try
            {
                if (IsMyNode(eargs.Node) && eargs.Node.IsExpanded != eargs.Value)
                {
                    SetIsExpanded(eargs.Node, eargs.Value);
                }

                if (!eargs.IgnoreChildren)
                {
                    SetIsExpandedRecursive(eargs.Node, eargs.Value);
                }
            }
            finally
            {
                if (update)
                {
                    EndUpdate();
                }
            }
        }
示例#2
0
        internal void SetIsExpanded(TreeNodeAdv node, bool value, bool ignoreChildren)
        {
            ExpandArgs eargs = new ExpandArgs {
                Node = node, Value = value, IgnoreChildren = ignoreChildren
            };

            SetIsExpanded(eargs);
        }
示例#3
0
        internal void SetIsExpanded(TreeNodeAdv node, bool value, bool ignoreChildren)
        {
            ExpandArgs eargs = new ExpandArgs();

            eargs.Node           = node;
            eargs.Value          = value;
            eargs.IgnoreChildren = ignoreChildren;

            if (AsyncExpanding && LoadOnDemand && !_threadPool.IsMyThread(Thread.CurrentThread))
            {
                WaitCallback wc = delegate(object argument) { SetIsExpanded((ExpandArgs)argument); };
                _threadPool.QueueUserWorkItem(wc, eargs);
            }
            else
            {
                SetIsExpanded(eargs);
            }
        }
示例#4
0
        internal void SetIsExpanded(TreeNodeAdv node, bool value, bool ignoreChildren)
        {
            ExpandArgs eargs = new ExpandArgs();
               eargs.Node = node;
               eargs.Value = value;
               eargs.IgnoreChildren = ignoreChildren;

               if (AsyncExpanding && LoadOnDemand && !_threadPool.IsMyThread(Thread.CurrentThread))
               {
            WaitCallback wc = delegate(object argument) { SetIsExpanded((ExpandArgs)argument); };
            _threadPool.QueueUserWorkItem(wc, eargs);
               }
               else
            SetIsExpanded(eargs);
        }
示例#5
0
        private void SetIsExpanded(ExpandArgs eargs)
        {
            bool update = !eargs.IgnoreChildren && !AsyncExpanding;
               if (update)
            BeginUpdate();
               try
               {
            if (IsMyNode(eargs.Node) && eargs.Node.IsExpanded != eargs.Value)
             SetIsExpanded(eargs.Node, eargs.Value);

            if (!eargs.IgnoreChildren)
             SetIsExpandedRecursive(eargs.Node, eargs.Value);
               }
               finally
               {
            if (update)
             EndUpdate();
               }
        }
        internal void SetIsExpanded(TreeNodeAdv node, bool value, bool ignoreChildren)
        {
            ExpandArgs eargs = new ExpandArgs {Node = node, Value = value, IgnoreChildren = ignoreChildren};

            SetIsExpanded(eargs);
        }