Beispiel #1
0
 public void EachControl(ControlWalker Do)
 {
     foreach(ControlSubcategory Subcat in Subcategories)
     {
         Subcat.EachControl(Do);
     }
 }
Beispiel #2
0
 public void EachControl(ControlWalker Do)
 {
     foreach(ControlCategory Cat in Categories)
     {
         Cat.EachControl(Do);
     }
 }
 public void EachControl(ControlWalker Do)
 {
     for(int i = 0; i < Controls.Length; i++)
     {
         Do(ref Controls[i]);
     }
 }
Beispiel #4
0
 /// <summary>
 /// Walks a tree of controls, executing the provided delegate on
 /// each control it encounters.
 /// </summary>
 /// <param name="walker">Delegate to be executed on each.</param>
 /// <param name="control">Root control to start at.</param>
 /// <param name="state">Optional state for use by the walker delegate.</param>
 public static void Walk(ControlWalker walker, Control control, object state)
 {
     walker(control, state);
     foreach (Control c in control.Controls)
     {
         Walk(walker, c, state);
     }
 }
 /// <summary>
 /// Walks a tree of controls, executing the provided delegate on
 /// each control it encounters.
 /// </summary>
 /// <param name="walker">Delegate to be executed on each.</param>
 /// <param name="control">Root control to start at.</param>
 /// <param name="state">Optional state for use by the walker delegate.</param>
 public static void Walk(ControlWalker walker, Control control, object state)
 {
     walker(control, state);
     foreach (Control c in control.Controls)
     {
         Walk(walker, c, state);
     }
 }