- Timestamp:
- 11/21/10 18:19:39 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBoxPlotView.cs
r4768 r4883 39 39 private const string BoxPlotChartAreaName = "BoxPlotChartArea"; 40 40 41 private bool suppressUpdates = false; 41 42 private string xAxisValue; 42 43 private string yAxisValue; … … 46 47 public RunCollectionBoxPlotView() { 47 48 InitializeComponent(); 48 this.categoricalMapping = new Dictionary<int, Dictionary<object, double>>();49 this.seriesCache = new SortedDictionary<double, Series>();50 this.chart.ChartAreas[0].Visible = false;51 this.chart.Series.Clear();52 this.chart.ChartAreas.Add(BoxPlotChartAreaName);53 this.chart.CustomizeAllChartAreas();49 categoricalMapping = new Dictionary<int, Dictionary<object, double>>(); 50 seriesCache = new SortedDictionary<double, Series>(); 51 chart.ChartAreas[0].Visible = false; 52 chart.Series.Clear(); 53 chart.ChartAreas.Add(BoxPlotChartAreaName); 54 chart.CustomizeAllChartAreas(); 54 55 } 55 56 … … 70 71 Content.ItemsRemoved += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved); 71 72 Content.CollectionReset += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset); 73 Content.UpdateOfRunsInProgress += new EventHandler<EventArgs<bool>>(Content_UpdateOfRunsInProgress); 72 74 RegisterRunEvents(Content); 73 75 } … … 79 81 Content.ItemsRemoved -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved); 80 82 Content.CollectionReset -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset); 83 Content.UpdateOfRunsInProgress -= new EventHandler<EventArgs<bool>>(Content_UpdateOfRunsInProgress); 81 84 DeregisterRunEvents(Content); 82 85 } … … 100 103 private void Content_ItemsAdded(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) { 101 104 RegisterRunEvents(e.Items); 105 } 106 private void Content_UpdateOfRunsInProgress(object sender, EventArgs<bool> e) { 107 if (InvokeRequired) 108 Invoke(new EventHandler<EventArgs<bool>>(Content_UpdateOfRunsInProgress), sender, e); 109 else { 110 suppressUpdates = e.Value; 111 if (!suppressUpdates) UpdateDataPoints(); 112 } 102 113 } 103 114 … … 120 131 if (InvokeRequired) 121 132 this.Invoke(new EventHandler(run_Changed), sender, e); 122 else {133 else if (!suppressUpdates) { 123 134 IRun run = (IRun)sender; 124 135 UpdateDataPoints(); … … 326 337 #region GUI events 327 338 private void UpdateNoRunsVisibleLabel() { 328 if (this.chart.Series.Count > 0) 339 if (this.chart.Series.Count > 0) { 329 340 noRunsLabel.Visible = false; 330 else 341 splitContainer.Panel2Collapsed = !showStatisticsCheckBox.Checked; 342 } else { 331 343 noRunsLabel.Visible = true; 344 splitContainer.Panel2Collapsed = true; 345 } 332 346 } 333 347 -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBubbleChartView.cs
r4846 r4883 43 43 private string sizeAxisValue; 44 44 45 private Dictionary<IRun, DataPoint> runToDataPointMapping;45 private Dictionary<IRun, List<DataPoint>> runToDataPointMapping; 46 46 private Dictionary<int, Dictionary<object, double>> categoricalMapping; 47 47 private Dictionary<IRun, double> xJitter; … … 51 51 private Random random; 52 52 private bool isSelecting = false; 53 private bool suppressUpdates = false; 53 54 54 55 public RunCollectionBubbleChartView() { … … 56 57 chart.ContextMenuStrip.Items.Insert(0, openBoxPlotViewToolStripMenuItem); 57 58 58 runToDataPointMapping = new Dictionary<IRun, DataPoint>();59 runToDataPointMapping = new Dictionary<IRun, List<DataPoint>>(); 59 60 categoricalMapping = new Dictionary<int, Dictionary<object, double>>(); 60 61 xJitter = new Dictionary<IRun, double>(); … … 88 89 Content.ItemsRemoved += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved); 89 90 Content.CollectionReset += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset); 91 Content.UpdateOfRunsInProgress += new EventHandler<EventArgs<bool>>(Content_UpdateOfRunsInProgress); 90 92 RegisterRunEvents(Content); 91 93 } … … 97 99 Content.ItemsRemoved -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved); 98 100 Content.CollectionReset -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset); 101 Content.UpdateOfRunsInProgress -= new EventHandler<EventArgs<bool>>(Content_UpdateOfRunsInProgress); 99 102 DeregisterRunEvents(Content); 100 103 } … … 128 131 129 132 private void UpdateRun(IRun run) { 130 DataPoint point = runToDataPointMapping[run]; 131 if (point != null) { 132 point.Color = run.Color; 133 if (!run.Visible) { 134 this.chart.Series[0].Points.Remove(point); 135 runToDataPointMapping.Remove(run); 133 if (!suppressUpdates) { 134 if (runToDataPointMapping.ContainsKey(run)) { 135 foreach (DataPoint point in runToDataPointMapping[run]) { 136 point.Color = run.Color; 137 if (!run.Visible) { 138 this.chart.Series[0].Points.Remove(point); 139 UpdateCursorInterval(); 140 chart.ChartAreas[0].RecalculateAxesScale(); 141 } 142 } 143 if (!run.Visible) runToDataPointMapping.Remove(run); 144 } else { 145 AddDataPoint(run); 136 146 UpdateCursorInterval(); 137 147 chart.ChartAreas[0].RecalculateAxesScale(); 138 148 } 139 } else { 140 AddDataPoint(run); 141 UpdateCursorInterval(); 142 chart.ChartAreas[0].RecalculateAxesScale(); 143 } 144 145 146 if (this.chart.Series[0].Points.Count == 0) 147 noRunsLabel.Visible = true; 148 else 149 noRunsLabel.Visible = false; 149 150 if (this.chart.Series[0].Points.Count == 0) 151 noRunsLabel.Visible = true; 152 else 153 noRunsLabel.Visible = false; 154 } 150 155 } 151 156 … … 199 204 } 200 205 206 207 private void Content_UpdateOfRunsInProgress(object sender, EventArgs<bool> e) { 208 if (InvokeRequired) 209 Invoke(new EventHandler<EventArgs<bool>>(Content_UpdateOfRunsInProgress), sender, e); 210 else { 211 suppressUpdates = e.Value; 212 if (!suppressUpdates) UpdateDataPoints(); 213 } 214 } 215 201 216 private void Content_Reset(object sender, EventArgs e) { 202 217 if (InvokeRequired) … … 252 267 point.Color = run.Color; 253 268 series.Points.Add(point); 254 runToDataPointMapping[run] = point; 269 270 if (!runToDataPointMapping.ContainsKey(run)) runToDataPointMapping.Add(run, new List<DataPoint>()); 271 runToDataPointMapping[run].Add(point); 255 272 } 256 273 } … … 595 612 596 613 private void ColorRuns(string axisValue) { 614 Content.OnUpdateOfRunsInProgress(true); 597 615 var runs = Content.Select(r => new { Run = r, Value = GetValue(r, axisValue) }).Where(r => r.Value.HasValue); 598 616 double minValue = runs.Min(r => r.Value.Value); … … 605 623 r.Run.Color = ColorGradient.Colors[colorIndex]; 606 624 } 625 Content.OnUpdateOfRunsInProgress(false); 607 626 } 608 627 #endregion -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionTabularView.cs
r4819 r4883 24 24 using System.Linq; 25 25 using System.Windows.Forms; 26 using HeuristicLab.Co re;26 using HeuristicLab.Common; 27 27 using HeuristicLab.Data.Views; 28 28 using HeuristicLab.MainForm; 29 using HeuristicLab.Core; 29 30 30 31 namespace HeuristicLab.Optimization.Views { … … 33 34 public sealed partial class RunCollectionTabularView : StringConvertibleMatrixView { 34 35 private int[] runToRowMapping; 36 private bool suppressUpdates = false; 35 37 public RunCollectionTabularView() { 36 38 InitializeComponent(); … … 62 64 Content.ItemsRemoved += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved); 63 65 Content.CollectionReset += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset); 66 Content.UpdateOfRunsInProgress += new EventHandler<EventArgs<bool>>(Content_UpdateOfRunsInProgress); 64 67 RegisterRunEvents(Content); 65 68 } … … 73 76 Content.ItemsRemoved -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved); 74 77 Content.CollectionReset -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset); 78 Content.UpdateOfRunsInProgress -= new EventHandler<EventArgs<bool>>(Content_UpdateOfRunsInProgress); 75 79 DeregisterRunEvents(Content); 76 80 } … … 113 117 114 118 private void UpdateRun(IRun run) { 115 int runIndex = GetIndexOfRun(run); 116 int rowIndex = runToRowMapping[runIndex]; 117 this.dataGridView.Rows[rowIndex].Visible = run.Visible; 118 this.dataGridView.Rows[rowIndex].DefaultCellStyle.ForeColor = run.Color; 119 foreach (int runIndex in GetIndexOfRun(run)) { 120 int rowIndex = runToRowMapping[runIndex]; 121 this.dataGridView.Rows[rowIndex].Visible = run.Visible; 122 this.dataGridView.Rows[rowIndex].DefaultCellStyle.ForeColor = run.Color; 123 } 119 124 this.UpdateRowHeaders(); 120 125 } 121 126 122 private int GetIndexOfRun(IRun run) { 127 128 private void Content_UpdateOfRunsInProgress(object sender, Common.EventArgs<bool> e) { 129 if (InvokeRequired) 130 Invoke(new EventHandler<EventArgs<bool>>(Content_UpdateOfRunsInProgress), sender, e); 131 else { 132 suppressUpdates = e.Value; 133 if (!suppressUpdates) UpdateRowAttributes(); 134 } 135 } 136 137 private IEnumerable<int> GetIndexOfRun(IRun run) { 123 138 int i = 0; 124 139 foreach (IRun actualRun in Content) { 125 140 if (actualRun == run) 126 return i;141 yield return i; 127 142 i++; 128 143 } 129 throw new ArgumentException("Run " + run.Name + "could not be found in the RunCollection.");130 144 } 131 145 … … 143 157 protected override void ClearSorting() { 144 158 base.ClearSorting(); 145 runToRowMapping = new int[Content.Count]; 146 for (int i = 0; i < runToRowMapping.Length; i++) 147 runToRowMapping[i] = i; 159 runToRowMapping = Enumerable.Range(0, Content.Count).ToArray(); 148 160 UpdateRowAttributes(); 149 161 } … … 176 188 runIndex++; 177 189 } 190 UpdateRowHeaders(); 178 191 } 179 192 -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.Designer.cs
r4096 r4883 302 302 #endregion 303 303 304 pr otectedSystem.Windows.Forms.SplitContainer splitContainer;305 pr otectedSystem.Windows.Forms.ColumnHeader columnHeader1;306 pr otectedGroupBox itemsGroupBox;307 pr otectedListView itemsListView;308 pr otectedGroupBox detailsGroupBox;309 pr otectedButton removeButton;310 pr otectedToolTip toolTip;311 pr otectedImageList imageList;312 pr otectedHeuristicLab.MainForm.WindowsForms.ViewHost viewHost;313 pr otectedToolStrip toolStrip;314 pr otectedToolStripDropDownButton analyzeRunsToolStripDropDownButton;315 pr otectedTabControl tabControl;316 pr otectedTabPage runPage;317 pr otectedTabPage constraintPage;318 pr otectedRunCollectionConstraintCollectionView runCollectionConstraintCollectionView;319 pr otectedButton clearButton;320 pr otectedCheckBox showDetailsCheckBox;304 private System.Windows.Forms.SplitContainer splitContainer; 305 private System.Windows.Forms.ColumnHeader columnHeader1; 306 private GroupBox itemsGroupBox; 307 private ListView itemsListView; 308 private GroupBox detailsGroupBox; 309 private Button removeButton; 310 private ToolTip toolTip; 311 private ImageList imageList; 312 private HeuristicLab.MainForm.WindowsForms.ViewHost viewHost; 313 private ToolStrip toolStrip; 314 private ToolStripDropDownButton analyzeRunsToolStripDropDownButton; 315 private TabControl tabControl; 316 private TabPage runPage; 317 private TabPage constraintPage; 318 private RunCollectionConstraintCollectionView runCollectionConstraintCollectionView; 319 private Button clearButton; 320 private CheckBox showDetailsCheckBox; 321 321 } 322 322 } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs
r4300 r4883 35 35 [Content(typeof(RunCollection), true)] 36 36 [Content(typeof(IItemCollection<IRun>), false)] 37 public partial class RunCollectionView : ItemView { 37 public sealed partial class RunCollectionView : ItemView { 38 private Dictionary<IRun, List<ListViewItem>> runListViewItemMapping; 39 38 40 public new IItemCollection<IRun> Content { 39 41 get { return (IItemCollection<IRun>)base.Content; } … … 52 54 InitializeComponent(); 53 55 itemsGroupBox.Text = "Runs"; 56 runListViewItemMapping = new Dictionary<IRun, List<ListViewItem>>(); 54 57 } 55 58 … … 68 71 RegisterRunEvents(Content); 69 72 } 70 pr otected virtualvoid RegisterRunEvents(IEnumerable<IRun> runs) {73 private void RegisterRunEvents(IEnumerable<IRun> runs) { 71 74 foreach (IRun run in runs) 72 75 run.Changed += new EventHandler(Run_Changed); 73 76 } 74 pr otected virtualvoid DeregisterRunEvents(IEnumerable<IRun> runs) {77 private void DeregisterRunEvents(IEnumerable<IRun> runs) { 75 78 foreach (IRun run in runs) 76 79 run.Changed -= new EventHandler(Run_Changed); … … 143 146 } 144 147 145 pr otected virtualListViewItem CreateListViewItem(IRun item) {148 private ListViewItem CreateListViewItem(IRun item) { 146 149 ListViewItem listViewItem = new ListViewItem(); 147 150 listViewItem.Text = item.ToString(); … … 160 163 return listViewItem; 161 164 } 162 pr otected virtualvoid AddListViewItem(ListViewItem listViewItem) {165 private void AddListViewItem(ListViewItem listViewItem) { 163 166 itemsListView.Items.Add(listViewItem); 164 ((IRun)listViewItem.Tag).ItemImageChanged += new EventHandler(Item_ItemImageChanged); 165 ((IRun)listViewItem.Tag).ToStringChanged += new EventHandler(Item_ToStringChanged); 166 } 167 protected virtual void RemoveListViewItem(ListViewItem listViewItem) { 168 ((IRun)listViewItem.Tag).ItemImageChanged -= new EventHandler(Item_ItemImageChanged); 169 ((IRun)listViewItem.Tag).ToStringChanged -= new EventHandler(Item_ToStringChanged); 167 IRun run = listViewItem.Tag as IRun; 168 if (run != null) { 169 if (!runListViewItemMapping.ContainsKey(run)) 170 runListViewItemMapping.Add(run, new List<ListViewItem>()); 171 runListViewItemMapping[run].Add(listViewItem); 172 run.ItemImageChanged += new EventHandler(Item_ItemImageChanged); 173 run.ToStringChanged += new EventHandler(Item_ToStringChanged); 174 } 175 } 176 private void RemoveListViewItem(ListViewItem listViewItem) { 177 IRun run = listViewItem.Tag as IRun; 178 if (run != null) { 179 runListViewItemMapping[run].Remove(listViewItem); 180 if (runListViewItemMapping[run].Count == 0) { 181 runListViewItemMapping.Remove(run); 182 run.ItemImageChanged -= new EventHandler(Item_ItemImageChanged); 183 run.ToStringChanged -= new EventHandler(Item_ToStringChanged); 184 } 185 } 170 186 listViewItem.Remove(); 171 187 foreach (ListViewItem other in itemsListView.Items) … … 173 189 itemsListView.SmallImageList.Images.RemoveAt(listViewItem.ImageIndex); 174 190 } 175 pr otected virtualvoid UpdateListViewItemImage(ListViewItem listViewItem) {191 private void UpdateListViewItemImage(ListViewItem listViewItem) { 176 192 int i = listViewItem.ImageIndex; 177 193 listViewItem.ImageList.Images[i] = ((IRun)listViewItem.Tag).ItemImage; … … 179 195 listViewItem.ImageIndex = i; 180 196 } 181 pr otected virtualvoid UpdateListViewItemText(ListViewItem listViewItem) {197 private void UpdateListViewItemText(ListViewItem listViewItem) { 182 198 if (!listViewItem.Text.Equals(listViewItem.Tag.ToString())) 183 199 listViewItem.Text = listViewItem.Tag.ToString(); 184 200 } 185 protected virtual IEnumerable<ListViewItem> GetListViewItemsForItem(IRun item) { 186 foreach (ListViewItem listViewItem in itemsListView.Items) { 187 if (((IRun)listViewItem.Tag) == item) 188 yield return listViewItem; 189 } 201 private IEnumerable<ListViewItem> GetListViewItemsForItem(IRun run) { 202 return runListViewItemMapping[run]; 190 203 } 191 204 192 205 #region ListView Events 193 pr otected virtualvoid itemsListView_SelectedIndexChanged(object sender, EventArgs e) {206 private void itemsListView_SelectedIndexChanged(object sender, EventArgs e) { 194 207 removeButton.Enabled = itemsListView.SelectedItems.Count > 0 && (Content != null) && !Content.IsReadOnly && !ReadOnly; 195 208 AdjustListViewColumnSizes(); … … 205 218 } 206 219 } 207 pr otected virtualvoid itemsListView_KeyDown(object sender, KeyEventArgs e) {220 private void itemsListView_KeyDown(object sender, KeyEventArgs e) { 208 221 if (e.KeyCode == Keys.Delete) { 209 222 if ((itemsListView.SelectedItems.Count > 0) && !Content.IsReadOnly && !ReadOnly) { … … 213 226 } 214 227 } 215 pr otected virtualvoid itemsListView_DoubleClick(object sender, EventArgs e) {228 private void itemsListView_DoubleClick(object sender, EventArgs e) { 216 229 if (itemsListView.SelectedItems.Count == 1) { 217 230 IRun item = (IRun)itemsListView.SelectedItems[0].Tag; … … 223 236 } 224 237 } 225 pr otected virtualvoid itemsListView_ItemDrag(object sender, ItemDragEventArgs e) {238 private void itemsListView_ItemDrag(object sender, ItemDragEventArgs e) { 226 239 if (!Locked) { 227 240 ListViewItem listViewItem = (ListViewItem)e.Item; … … 239 252 } 240 253 } 241 pr otected virtualvoid itemsListView_DragEnterOver(object sender, DragEventArgs e) {254 private void itemsListView_DragEnterOver(object sender, DragEventArgs e) { 242 255 e.Effect = DragDropEffects.None; 243 256 Type type = e.Data.GetData("Type") as Type; … … 250 263 } 251 264 } 252 pr otected virtualvoid itemsListView_DragDrop(object sender, DragEventArgs e) {265 private void itemsListView_DragDrop(object sender, DragEventArgs e) { 253 266 if (e.Effect != DragDropEffects.None) { 254 267 IRun item = e.Data.GetData("Value") as IRun; … … 260 273 261 274 #region Button Events 262 pr otected virtualvoid menuItem_Click(object sender, EventArgs e) {275 private void menuItem_Click(object sender, EventArgs e) { 263 276 ToolStripMenuItem menuItem = (ToolStripMenuItem)sender; 264 277 Type viewType = (Type)menuItem.Tag; … … 269 282 } 270 283 } 271 pr otected virtualvoid removeButton_Click(object sender, EventArgs e) {284 private void removeButton_Click(object sender, EventArgs e) { 272 285 if (itemsListView.SelectedItems.Count > 0) { 273 286 foreach (ListViewItem item in itemsListView.SelectedItems) … … 276 289 } 277 290 } 278 pr otected virtualvoid clearButton_Click(object sender, EventArgs e) {291 private void clearButton_Click(object sender, EventArgs e) { 279 292 Content.Clear(); 280 293 } … … 282 295 283 296 #region CheckBox Events 284 pr otected virtualvoid showDetailsCheckBox_CheckedChanged(object sender, EventArgs e) {297 private void showDetailsCheckBox_CheckedChanged(object sender, EventArgs e) { 285 298 if (showDetailsCheckBox.Checked) { 286 299 splitContainer.Panel2Collapsed = false; … … 295 308 296 309 #region Content Events 297 pr otected virtualvoid Content_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IRun> e) {310 private void Content_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IRun> e) { 298 311 if (InvokeRequired) 299 312 Invoke(new CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded), sender, e); … … 309 322 } 310 323 } 311 pr otected virtualvoid Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IRun> e) {324 private void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IRun> e) { 312 325 if (InvokeRequired) 313 326 Invoke(new CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved), sender, e); … … 316 329 foreach (IRun item in e.Items) { 317 330 //remove only the first matching ListViewItem, because the IRun could be contained multiple times in the ItemCollection 318 ListViewItem listviewItem = GetListViewItemsForItem(item).FirstOrDefault(); 319 if (listviewItem != null) 320 RemoveListViewItem(listviewItem); 331 ListViewItem listViewItem = GetListViewItemsForItem(item).FirstOrDefault(); 332 if (listViewItem != null) RemoveListViewItem(listViewItem); 321 333 } 322 334 analyzeRunsToolStripDropDownButton.Enabled = itemsListView.Items.Count > 0; … … 325 337 } 326 338 } 327 pr otected virtualvoid Content_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {339 private void Content_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) { 328 340 if (InvokeRequired) 329 341 Invoke(new CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset), sender, e); … … 331 343 DeregisterRunEvents(e.OldItems); 332 344 foreach (IRun item in e.OldItems) { 333 //remove only the first matching ListViewItem, because the IRun could be contained multiple times in the ItemCollection 334 ListViewItem listviewItem = GetListViewItemsForItem(item).FirstOrDefault(); 335 if (listviewItem != null) 336 RemoveListViewItem(listviewItem); 345 ListViewItem listViewItem = GetListViewItemsForItem(item).FirstOrDefault(); 346 if (listViewItem != null) RemoveListViewItem(listViewItem); 337 347 } 338 348 RegisterRunEvents(e.Items); … … 349 359 350 360 #region Item Events 351 pr otected virtualvoid Item_ItemImageChanged(object sender, EventArgs e) {361 private void Item_ItemImageChanged(object sender, EventArgs e) { 352 362 if (InvokeRequired) 353 363 Invoke(new EventHandler(Item_ItemImageChanged), sender, e); … … 358 368 } 359 369 } 360 pr otected virtualvoid Item_ToStringChanged(object sender, EventArgs e) {370 private void Item_ToStringChanged(object sender, EventArgs e) { 361 371 if (InvokeRequired) 362 372 Invoke(new EventHandler(Item_ToStringChanged), sender, e); … … 368 378 } 369 379 } 370 pr otected virtualvoid Run_Changed(object sender, EventArgs e) {380 private void Run_Changed(object sender, EventArgs e) { 371 381 if (InvokeRequired) 372 382 this.Invoke(new EventHandler(Run_Changed), sender, e); … … 377 387 } 378 388 379 pr otected virtualvoid UpdateRun(IRun run) {389 private void UpdateRun(IRun run) { 380 390 foreach (ListViewItem listViewItem in GetListViewItemsForItem(run)) { 381 391 if (run.Visible) { … … 391 401 392 402 #region Helpers 393 pr otected virtualvoid AdjustListViewColumnSizes() {403 private void AdjustListViewColumnSizes() { 394 404 if (itemsListView.Items.Count > 0) { 395 405 for (int i = 0; i < itemsListView.Columns.Count; i++) { -
trunk/sources/HeuristicLab.Optimization/3.3/RunCollection.cs
r4722 r4883 285 285 #endregion 286 286 287 #region 288 public event EventHandler<EventArgs<bool>> UpdateOfRunsInProgress; 289 public void OnUpdateOfRunsInProgress(bool inProgress) { 290 var handler = UpdateOfRunsInProgress; 291 if (handler != null) handler(this, new EventArgs<bool>(inProgress)); 292 } 293 #endregion 294 287 295 #region filtering 288 296 private void UpdateFiltering(bool reset) { 297 OnUpdateOfRunsInProgress(true); 289 298 if (reset) 290 299 list.ForEach(r => r.Visible = true); 291 300 foreach (IRunCollectionConstraint constraint in this.constraints) 292 301 constraint.Check(); 302 OnUpdateOfRunsInProgress(false); 293 303 } 294 304
Note: See TracChangeset
for help on using the changeset viewer.