Changeset 4888 for trunk/sources/HeuristicLab.Optimization.Views/3.3
- Timestamp:
- 11/22/10 01:26:55 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Optimization.Views/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBoxPlotView.cs
r4883 r4888 71 71 Content.ItemsRemoved += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved); 72 72 Content.CollectionReset += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset); 73 Content.UpdateOfRunsInProgress += new EventHandler<EventArgs<bool>>(Content_UpdateOfRunsInProgress);73 Content.UpdateOfRunsInProgressChanged += new EventHandler(Content_UpdateOfRunsInProgressChanged); 74 74 RegisterRunEvents(Content); 75 75 } … … 81 81 Content.ItemsRemoved -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved); 82 82 Content.CollectionReset -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset); 83 Content.UpdateOfRunsInProgress -= new EventHandler<EventArgs<bool>>(Content_UpdateOfRunsInProgress);83 Content.UpdateOfRunsInProgressChanged -= new EventHandler(Content_UpdateOfRunsInProgressChanged); 84 84 DeregisterRunEvents(Content); 85 85 } … … 104 104 RegisterRunEvents(e.Items); 105 105 } 106 private void Content_UpdateOfRunsInProgress (object sender, EventArgs<bool>e) {106 private void Content_UpdateOfRunsInProgressChanged(object sender, EventArgs e) { 107 107 if (InvokeRequired) 108 Invoke(new EventHandler <EventArgs<bool>>(Content_UpdateOfRunsInProgress), sender, e);108 Invoke(new EventHandler(Content_UpdateOfRunsInProgressChanged), sender, e); 109 109 else { 110 suppressUpdates = e.Value;110 suppressUpdates = Content.UpdateOfRunsInProgress; 111 111 if (!suppressUpdates) UpdateDataPoints(); 112 112 } … … 339 339 if (this.chart.Series.Count > 0) { 340 340 noRunsLabel.Visible = false; 341 showStatisticsCheckBox.Enabled = true; 341 342 splitContainer.Panel2Collapsed = !showStatisticsCheckBox.Checked; 342 343 } else { 343 344 noRunsLabel.Visible = true; 345 showStatisticsCheckBox.Enabled = false; 344 346 splitContainer.Panel2Collapsed = true; 345 347 } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBubbleChartView.cs
r4883 r4888 89 89 Content.ItemsRemoved += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved); 90 90 Content.CollectionReset += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset); 91 Content.UpdateOfRunsInProgress += new EventHandler<EventArgs<bool>>(Content_UpdateOfRunsInProgress);91 Content.UpdateOfRunsInProgressChanged += new EventHandler(Content_UpdateOfRunsInProgressChanged); 92 92 RegisterRunEvents(Content); 93 93 } … … 99 99 Content.ItemsRemoved -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved); 100 100 Content.CollectionReset -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset); 101 Content.UpdateOfRunsInProgress -= new EventHandler<EventArgs<bool>>(Content_UpdateOfRunsInProgress);101 Content.UpdateOfRunsInProgressChanged -= new EventHandler(Content_UpdateOfRunsInProgressChanged); 102 102 DeregisterRunEvents(Content); 103 103 } … … 205 205 206 206 207 private void Content_UpdateOfRunsInProgress (object sender, EventArgs<bool>e) {207 private void Content_UpdateOfRunsInProgressChanged(object sender, EventArgs e) { 208 208 if (InvokeRequired) 209 Invoke(new EventHandler <EventArgs<bool>>(Content_UpdateOfRunsInProgress), sender, e);209 Invoke(new EventHandler(Content_UpdateOfRunsInProgressChanged), sender, e); 210 210 else { 211 suppressUpdates = e.Value;211 suppressUpdates = Content.UpdateOfRunsInProgress; 212 212 if (!suppressUpdates) UpdateDataPoints(); 213 213 } … … 377 377 } 378 378 379 #region drag anddrop and tooltip379 #region Drag & drop and tooltip 380 380 private IRun draggedRun; 381 381 private void chart_MouseDown(object sender, MouseEventArgs e) { … … 398 398 private void chart_MouseUp(object sender, MouseEventArgs e) { 399 399 if (isSelecting) { 400 Content.UpdateOfRunsInProgress = true; 400 401 System.Windows.Forms.DataVisualization.Charting.Cursor xCursor = chart.ChartAreas[0].CursorX; 401 402 System.Windows.Forms.DataVisualization.Charting.Cursor yCursor = chart.ChartAreas[0].CursorY; … … 429 430 this.chart.ChartAreas[0].CursorX.SelectionStart = this.chart.ChartAreas[0].CursorX.SelectionEnd; 430 431 this.chart.ChartAreas[0].CursorY.SelectionStart = this.chart.ChartAreas[0].CursorY.SelectionEnd; 432 Content.UpdateOfRunsInProgress = false; 431 433 } 432 434 } … … 602 604 #endregion 603 605 604 #region automatic coloring606 #region Automatic coloring 605 607 private void colorXAxisButton_Click(object sender, EventArgs e) { 606 608 ColorRuns(xAxisValue); … … 612 614 613 615 private void ColorRuns(string axisValue) { 614 Content. OnUpdateOfRunsInProgress(true);616 Content.UpdateOfRunsInProgress = true; 615 617 var runs = Content.Select(r => new { Run = r, Value = GetValue(r, axisValue) }).Where(r => r.Value.HasValue); 616 618 double minValue = runs.Min(r => r.Value.Value); … … 623 625 r.Run.Color = ColorGradient.Colors[colorIndex]; 624 626 } 625 Content. OnUpdateOfRunsInProgress(false);627 Content.UpdateOfRunsInProgress = false; 626 628 } 627 629 #endregion -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionTabularView.cs
r4883 r4888 24 24 using System.Linq; 25 25 using System.Windows.Forms; 26 using HeuristicLab.Co mmon;26 using HeuristicLab.Core; 27 27 using HeuristicLab.Data.Views; 28 28 using HeuristicLab.MainForm; 29 using HeuristicLab.Core;30 29 31 30 namespace HeuristicLab.Optimization.Views { … … 64 63 Content.ItemsRemoved += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved); 65 64 Content.CollectionReset += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset); 66 Content.UpdateOfRunsInProgress += new EventHandler<EventArgs<bool>>(Content_UpdateOfRunsInProgress);65 Content.UpdateOfRunsInProgressChanged += new EventHandler(Content_UpdateOfRunsInProgressChanged); 67 66 RegisterRunEvents(Content); 68 67 } … … 76 75 Content.ItemsRemoved -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved); 77 76 Content.CollectionReset -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset); 78 Content.UpdateOfRunsInProgress -= new EventHandler<EventArgs<bool>>(Content_UpdateOfRunsInProgress);77 Content.UpdateOfRunsInProgressChanged -= new EventHandler(Content_UpdateOfRunsInProgressChanged); 79 78 DeregisterRunEvents(Content); 80 79 } … … 126 125 127 126 128 private void Content_UpdateOfRunsInProgress (object sender, Common.EventArgs<bool>e) {127 private void Content_UpdateOfRunsInProgressChanged(object sender, EventArgs e) { 129 128 if (InvokeRequired) 130 Invoke(new EventHandler <EventArgs<bool>>(Content_UpdateOfRunsInProgress), sender, e);129 Invoke(new EventHandler(Content_UpdateOfRunsInProgressChanged), sender, e); 131 130 else { 132 suppressUpdates = e.Value;131 suppressUpdates = Content.UpdateOfRunsInProgress; 133 132 if (!suppressUpdates) UpdateRowAttributes(); 134 133 }
Note: See TracChangeset
for help on using the changeset viewer.