/// <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); } }
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(); } }
/// <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); } }
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); }
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(); } }
protected override void OnAfterCheck(ComboTreeNodeEventArgs e) { base.OnAfterCheck(e); NotifyDataGridViewOfValueChange(); }
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); }
/// <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); }