- Timestamp:
- 11/21/10 18:19:39 (13 years ago)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.