- Timestamp:
- 07/04/19 15:33:31 (5 years ago)
- Location:
- stable
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk merged: 16501-16506
- Property svn:mergeinfo changed
-
stable/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ControlExtensions.cs
r15584 r17069 46 46 } 47 47 } 48 49 public static IEnumerable<Control> GetNestedControls(this Control control, Func<Control, bool> condition = null) {50 if (control == null) yield break;51 if (condition == null) condition = (c) => true;52 53 Queue<Control> unprocessed = new Queue<Control>();54 unprocessed.Enqueue(control);55 56 while (unprocessed.Count > 0) {57 Control c = unprocessed.Dequeue();58 if (condition(c)) yield return c;59 foreach (Control child in c.Controls)60 unprocessed.Enqueue(child);61 }62 }63 48 } 64 49 }
Note: See TracChangeset
for help on using the changeset viewer.