Changeset 16501 for trunk/HeuristicLab.MainForm.WindowsForms/3.3/Controls
- Timestamp:
- 01/05/19 10:07:02 (6 years ago)
- Location:
- trunk/HeuristicLab.MainForm.WindowsForms/3.3/Controls
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ControlExtensions.cs
r15583 r16501 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 } -
trunk/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ProgressView.cs
r16430 r16501 114 114 UpdateButtonsState(); 115 115 116 Control.SuspendRepaint(); 116 117 Control.Enabled = false; 117 118 Parent = Control.Parent; 118 119 BringToFront(); 120 Control.ResumeRepaint(true); 119 121 Visible = true; 120 122 } … … 128 130 129 131 Visible = false; 132 Control.SuspendRepaint(); 130 133 Control.Enabled = true; 134 Control.ResumeRepaint(true); 131 135 Parent = null; 132 136 }
Note: See TracChangeset
for help on using the changeset viewer.