- Timestamp:
- 01/10/19 15:40:44 (6 years ago)
- Location:
- branches/2520_PersistenceReintegration
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2520_PersistenceReintegration
- Property svn:mergeinfo changed
-
branches/2520_PersistenceReintegration/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ControlExtensions.cs
r16453 r16529 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 } -
branches/2520_PersistenceReintegration/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ProgressView.cs
r16453 r16529 38 38 : base() { 39 39 if (control == null) throw new ArgumentNullException("control"); 40 if (control.Parent == null) throw new InvalidOperationException("A Progress can only be shown on controls that have a Parent-control. Therefore, Dialogs and Forms cannot have an associated ProgressView."); 40 41 if (content == null) throw new ArgumentNullException("content"); 41 42 InitializeComponent(); … … 114 115 UpdateButtonsState(); 115 116 117 Control.SuspendRepaint(); 116 118 Control.Enabled = false; 117 119 Parent = Control.Parent; 118 120 BringToFront(); 121 Control.ResumeRepaint(true); 119 122 Visible = true; 120 123 } … … 128 131 129 132 Visible = false; 133 Control.SuspendRepaint(); 130 134 Control.Enabled = true; 135 Control.ResumeRepaint(true); 131 136 Parent = null; 132 137 }
Note: See TracChangeset
for help on using the changeset viewer.