Changeset 5174 for trunk/sources/HeuristicLab.DebugEngine
- Timestamp:
- 12/24/10 08:54:31 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.DebugEngine/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.DebugEngine/3.3/OperatorTrace.cs
r5121 r5174 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 23 24 using System.Linq; … … 39 40 [Storable] 40 41 protected bool isEnabled; 42 #endregion 43 44 #region events 45 public event EventHandler IsEnabledChanged; 46 protected virtual void OnIsEnabledChanged() { 47 EventHandler handler = IsEnabledChanged; 48 if (handler != null) 49 handler(this, EventArgs.Empty); 50 } 41 51 #endregion 42 52 … … 134 144 if (!isEnabled) 135 145 Reset(); 146 OnIsEnabledChanged(); 136 147 } 137 148 } -
trunk/sources/HeuristicLab.DebugEngine/3.3/OperatorTraceView.cs
r5146 r5174 51 51 Content.ItemsRemoved -= Content_CollectionChanged; 52 52 Content.ItemsReplaced -= Content_CollectionChanged; 53 Content.IsEnabledChanged -= Content_IsEnabledChanged; 53 54 base.DeregisterContentEvents(); 54 55 } … … 61 62 Content.ItemsRemoved += Content_CollectionChanged; 62 63 Content.ItemsReplaced += Content_CollectionChanged; 64 Content.IsEnabledChanged += Content_IsEnabledChanged; 63 65 } 64 66 … … 69 71 else 70 72 UpdateOperatorTrace(); 73 } 74 void Content_IsEnabledChanged(object sender, EventArgs e) { 75 if (InvokeRequired) 76 Invoke(new EventHandler(Content_IsEnabledChanged), sender, e); 77 else 78 isEnabledCheckbox.Checked = Content.IsEnabled; 71 79 } 72 80 #endregion … … 103 111 if (Content == null) { 104 112 listView.Items.Clear(); 113 isEnabledCheckbox.Checked = false; 105 114 } else { 106 115 UpdateOperatorTrace(); 116 isEnabledCheckbox.Checked = Content.IsEnabled; 107 117 } 108 118 } … … 122 132 } 123 133 } 134 private void isEnabledCheckbox_CheckedChanged(object sender, EventArgs e) { 135 if (Content != null) 136 Content.IsEnabled = isEnabledCheckbox.Checked; 137 } 124 138 #endregion 125 139 126 private void isEnabledCheckbox_CheckedChanged(object sender, EventArgs e) { 127 Content.IsEnabled = isEnabledCheckbox.Checked; 128 } 140 129 141 } 130 142
Note: See TracChangeset
for help on using the changeset viewer.