Example #1
0
 /// <summary>
 /// Raises the <see cref="AfterCheck"/> event.
 /// </summary>
 /// <param name="e"></param>
 protected internal virtual void OnAfterCheck(ComboTreeNodeEventArgs e)
 {
     if (AfterCheck != null)
     {
         AfterCheck(this, e);
     }
 }
Example #2
0
    void nodes_AfterCheck(object sender, ComboTreeNodeEventArgs e)
    {
        if (_cascadeCheckState)
        {
            _recurseDepth++;

            if (_recurseDepth == 1)
            {
                CheckNodes(e.Node);

                if (e.Node.Parent != null)
                {
                    SetCheckState(e.Node.Parent);
                }
            }

            _recurseDepth--;
        }

        if (!_isUpdating)
        {
            if (_suspendCheckEvents == 0)
            {
                OnAfterCheck(e);
            }
            Invalidate();
            _dropDown.UpdateVisibleItems();
        }
    }
Example #3
0
 /// <summary>
 /// Raises the <see cref="NodeClick"/> event.
 /// </summary>
 /// <param name="e"></param>
 protected internal virtual void OnNodeClick(ComboTreeNodeEventArgs e)
 {
     if (NodeClick != null)
     {
         NodeClick(this, e);
     }
 }
Example #4
0
    void nodes_AfterCheck(object sender, ComboTreeNodeEventArgs e)
    {
        if (_cascadeCheckState)
        {
            _recurseDepth++;

            if (_recurseDepth == 1)
            {
                IEnumerator <ComboTreeNode> enumerator = ComboTreeNodeCollection.GetNodesRecursive(e.Node.Nodes, false);
                while (enumerator.MoveNext())
                {
                    if (_threeState)
                    {
                        enumerator.Current.CheckState = e.Node.CheckState;
                    }
                    else
                    {
                        enumerator.Current.Checked = e.Node.Checked;
                    }
                }

                ComboTreeNode parent = e.Node.Parent;
                while (parent != null)
                {
                    parent.CheckState = parent.GetAggregateCheckState();
                    parent            = parent.Parent;
                }
            }

            _recurseDepth--;
        }

        Invalidate();
        OnAfterCheck(e);
    }
Example #5
0
    void nodes_AfterCheck(object sender, ComboTreeNodeEventArgs e)
    {
        if (_cascadeCheckState)
        {
            _recurseDepth++;

            if (_recurseDepth == 1)
            {
                foreach (ComboTreeNode child in e.Node.Nodes)
                {
                    if (_threeState)
                    {
                        child.CheckState = e.Node.CheckState;
                    }
                    else
                    {
                        child.Checked = e.Node.Checked;
                    }
                }

                if (e.Node.Parent != null)
                {
                    e.Node.Parent.CheckState = e.Node.Parent.GetAggregateCheckState();
                }
            }

            _recurseDepth--;
        }

        if (!_isUpdating)
        {
            if (_suspendCheckEvents == 0)
            {
                OnAfterCheck(e);
            }
            Invalidate();
            _dropDown.UpdateVisibleItems();
        }
    }
Example #6
0
 protected override void OnAfterCheck(ComboTreeNodeEventArgs e)
 {
     base.OnAfterCheck(e);
     NotifyDataGridViewOfValueChange();
 }
Example #7
0
    void nodes_AfterCheck(object sender, ComboTreeNodeEventArgs e)
    {
        if (_cascadeCheckState) {
            _recurseDepth++;

            if (_recurseDepth == 1) {
                IEnumerator<ComboTreeNode> enumerator = ComboTreeNodeCollection.GetNodesRecursive(e.Node.Nodes, false);
                while (enumerator.MoveNext()) {
                    if (_threeState)
                        enumerator.Current.CheckState = e.Node.CheckState;
                    else
                        enumerator.Current.Checked = e.Node.Checked;
                }

                ComboTreeNode parent = e.Node.Parent;
                while (parent != null) {
                    parent.CheckState = parent.GetAggregateCheckState();
                    parent = parent.Parent;
                }
            }

            _recurseDepth--;
        }

        Invalidate();
        OnAfterCheck(e);
    }
Example #8
0
 /// <summary>
 /// Raises the <see cref="AfterCheck"/> event.
 /// </summary>
 /// <param name="e"></param>
 protected internal virtual void OnAfterCheck(ComboTreeNodeEventArgs e)
 {
     if (AfterCheck != null) AfterCheck(this, e);
 }