Пример #1
0
 public void SetUp()
 {
     parent = new ThreeStateNode("parent");
     child1 = new ThreeStateNode("child1");
     child2 = new ThreeStateNode("child2");
     parent.Nodes.Add(child1);
     parent.Nodes.Add(child2);
 }
Пример #2
0
 /// <summary>
 /// Allows inheriting classes to block cascading check state.
 /// </summary>
 /// <param name="child">The child to evaluate.</param>
 /// <param name="checkState">The proposed check state.</param>
 /// <returns>True if the check state can be cascaded, otherwise false.</returns>
 protected virtual bool ChildShouldBeChecked(ThreeStateNode child,
                                             CheckState checkState)
 {
     return(true);
 }
Пример #3
0
 /// <summary>
 /// Allows inheriting classes to block cascading check state.
 /// </summary>
 /// <param name="child">The child to evaluate.</param>
 /// <param name="checkState">The proposed check state.</param>
 /// <returns>True if the check state can be cascaded, otherwise false.</returns>
 protected virtual bool ChildShouldBeChecked(ThreeStateNode child, 
     CheckState checkState)
 {
     return true;
 }