- Timestamp:
- 07/06/15 13:52:12 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Analysis.Statistics.Views/3.3/CorrelationView.cs
r12152 r12599 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Collections; 25 26 using HeuristicLab.Core.Views; 26 27 using HeuristicLab.Data; … … 81 82 Content.ColumnsChanged += Content_ColumnsChanged; 82 83 Content.RowsChanged += Content_RowsChanged; 83 Content.CollectionReset += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);84 Content.CollectionReset += new CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset); 84 85 Content.UpdateOfRunsInProgressChanged += Content_UpdateOfRunsInProgressChanged; 85 86 } … … 89 90 Content.ColumnsChanged -= Content_ColumnsChanged; 90 91 Content.RowsChanged -= Content_RowsChanged; 91 Content.CollectionReset -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);92 Content.CollectionReset -= new CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset); 92 93 Content.UpdateOfRunsInProgressChanged -= Content_UpdateOfRunsInProgressChanged; 93 94 } 94 95 95 96 void Content_RowsChanged(object sender, EventArgs e) { 96 UpdateUI(); 97 if (suppressUpdates) return; 98 if (InvokeRequired) Invoke((Action<object, EventArgs>)Content_RowsChanged, sender, e); 99 else { 100 UpdateUI(); 101 } 97 102 } 98 103 99 104 void Content_ColumnsChanged(object sender, EventArgs e) { 100 if (!suppressUpdates) { 101 UpdateUI(); 102 } 103 } 104 105 private void Content_CollectionReset(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) { 106 UpdateUI(); 105 if (suppressUpdates) return; 106 if (InvokeRequired) Invoke((Action<object, EventArgs>)Content_ColumnsChanged, sender, e); 107 else { 108 UpdateUI(); 109 } 110 } 111 112 private void Content_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) { 113 if (suppressUpdates) return; 114 if (InvokeRequired) Invoke((Action<object, CollectionItemsChangedEventArgs<IRun>>)Content_CollectionReset, sender, e); 115 else { 116 UpdateUI(); 117 } 107 118 } 108 119 109 120 private void Content_UpdateOfRunsInProgressChanged(object sender, EventArgs e) { 110 suppressUpdates = Content.UpdateOfRunsInProgress; 111 UpdateUI(); 121 if (InvokeRequired) Invoke((Action<object, EventArgs>)Content_UpdateOfRunsInProgressChanged, sender, e); 122 else { 123 suppressUpdates = Content.UpdateOfRunsInProgress; 124 UpdateUI(); 125 } 112 126 } 113 127 #endregion 114 128 115 129 private void UpdateUI() { 116 if (!suppressUpdates) { 117 RebuildCorrelationTable(); 118 } 130 RebuildCorrelationTable(); 119 131 } 120 132
Note: See TracChangeset
for help on using the changeset viewer.