- Timestamp:
- 06/23/17 15:20:31 (8 years ago)
- Location:
- trunk/sources/HeuristicLab.Analysis/3.3/DataVisualization
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Analysis/3.3/DataVisualization/IndexedDataRow.cs
r14185 r15048 30 30 31 31 namespace HeuristicLab.Analysis { 32 [Item("IndexedDataRow", "A data row that contains time series.")]32 [Item("IndexedDataRow", "A data row that contains a series of points.")] 33 33 [StorableClass] 34 34 public class IndexedDataRow<T> : NamedItem { … … 105 105 OnVisualPropertiesChanged(); 106 106 } 107 protected override void OnNameChanged() { 108 base.OnNameChanged(); 109 VisualProperties.DisplayName = Name; 110 } 107 111 } 108 112 } -
trunk/sources/HeuristicLab.Analysis/3.3/DataVisualization/IndexedDataTable.cs
r14185 r15048 107 107 public event EventHandler VisualPropertiesChanged; 108 108 protected virtual void OnVisualPropertiesChanged() { 109 EventHandler handler = VisualPropertiesChanged;109 var handler = VisualPropertiesChanged; 110 110 if (handler != null) handler(this, EventArgs.Empty); 111 111 } … … 115 115 } 116 116 117 protected virtual void RegisterRowsEvents() { 118 rows.ItemsAdded += new CollectionItemsChangedEventHandler<IndexedDataRow<T>>(rows_ItemsAdded); 119 rows.ItemsRemoved += new CollectionItemsChangedEventHandler<IndexedDataRow<T>>(rows_ItemsRemoved); 120 rows.ItemsReplaced += new CollectionItemsChangedEventHandler<IndexedDataRow<T>>(rows_ItemsReplaced); 121 rows.CollectionReset += new CollectionItemsChangedEventHandler<IndexedDataRow<T>>(rows_CollectionReset); 122 } 123 private void rows_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedDataRow<T>> e) { 117 private void RegisterRowsEvents() { 118 rows.ItemsAdded += new CollectionItemsChangedEventHandler<IndexedDataRow<T>>(RowsOnItemsAdded); 119 rows.ItemsRemoved += new CollectionItemsChangedEventHandler<IndexedDataRow<T>>(RowsOnItemsRemoved); 120 rows.ItemsReplaced += new CollectionItemsChangedEventHandler<IndexedDataRow<T>>(RowsOnItemsReplaced); 121 rows.CollectionReset += new CollectionItemsChangedEventHandler<IndexedDataRow<T>>(RowsOnCollectionReset); 122 foreach (var row in Rows) RegisterRowEvents(row); 123 } 124 protected virtual void RowsOnItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedDataRow<T>> e) { 124 125 foreach (var row in e.Items) 125 126 this.RegisterRowEvents(row); … … 129 130 this.OnReset(); 130 131 } 131 pr ivate void rows_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedDataRow<T>> e) {132 protected virtual void RowsOnItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedDataRow<T>> e) { 132 133 foreach (var row in e.Items) 133 134 this.DeregisterRowEvents(row); … … 137 138 this.OnReset(); 138 139 } 139 pr ivate void rows_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedDataRow<T>> e) {140 protected virtual void RowsOnItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedDataRow<T>> e) { 140 141 foreach (var row in e.OldItems) 141 142 this.DeregisterRowEvents(row); … … 147 148 this.OnReset(); 148 149 } 149 pr ivate void rows_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedDataRow<T>> e) {150 protected virtual void RowsOnCollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedDataRow<T>> e) { 150 151 foreach (var row in e.OldItems) 151 152 this.DeregisterRowEvents(row); … … 159 160 } 160 161 161 pr otected virtualvoid RegisterRowEvents(IndexedDataRow<T> row) {162 row.Values.ItemsAdded += new CollectionItemsChangedEventHandler<IndexedItem<Tuple<T, double>>>(Values _ItemsAdded);163 row.Values.ItemsMoved += new CollectionItemsChangedEventHandler<IndexedItem<Tuple<T, double>>>(Values _ItemsMoved);164 row.Values.ItemsRemoved += new CollectionItemsChangedEventHandler<IndexedItem<Tuple<T, double>>>(Values _ItemsRemoved);165 row.Values.ItemsReplaced += new CollectionItemsChangedEventHandler<IndexedItem<Tuple<T, double>>>(Values _ItemsReplaced);166 row.Values.CollectionReset += new CollectionItemsChangedEventHandler<IndexedItem<Tuple<T, double>>>(Values _CollectionReset);167 } 168 pr otected virtualvoid DeregisterRowEvents(IndexedDataRow<T> row) {169 row.Values.ItemsAdded -= new CollectionItemsChangedEventHandler<IndexedItem<Tuple<T, double>>>(Values _ItemsAdded);170 row.Values.ItemsMoved -= new CollectionItemsChangedEventHandler<IndexedItem<Tuple<T, double>>>(Values _ItemsMoved);171 row.Values.ItemsRemoved -= new CollectionItemsChangedEventHandler<IndexedItem<Tuple<T, double>>>(Values _ItemsRemoved);172 row.Values.ItemsReplaced -= new CollectionItemsChangedEventHandler<IndexedItem<Tuple<T, double>>>(Values _ItemsReplaced);173 row.Values.CollectionReset -= new CollectionItemsChangedEventHandler<IndexedItem<Tuple<T, double>>>(Values _CollectionReset);174 } 175 176 pr ivate void Values_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<Tuple<T, double>>> e) {177 this.OnReset(); 178 } 179 pr ivate void Values_ItemsMoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<Tuple<T, double>>> e) {180 this.OnReset(); 181 } 182 pr ivate void Values_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<Tuple<T, double>>> e) {183 this.OnReset(); 184 } 185 pr ivate void Values_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<Tuple<T, double>>> e) {186 this.OnReset(); 187 } 188 pr ivate void Values_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<Tuple<T, double>>> e) {162 private void RegisterRowEvents(IndexedDataRow<T> row) { 163 row.Values.ItemsAdded += new CollectionItemsChangedEventHandler<IndexedItem<Tuple<T, double>>>(ValuesOnItemsAdded); 164 row.Values.ItemsMoved += new CollectionItemsChangedEventHandler<IndexedItem<Tuple<T, double>>>(ValuesOnItemsMoved); 165 row.Values.ItemsRemoved += new CollectionItemsChangedEventHandler<IndexedItem<Tuple<T, double>>>(ValuesOnItemsRemoved); 166 row.Values.ItemsReplaced += new CollectionItemsChangedEventHandler<IndexedItem<Tuple<T, double>>>(ValuesOnItemsReplaced); 167 row.Values.CollectionReset += new CollectionItemsChangedEventHandler<IndexedItem<Tuple<T, double>>>(ValuesOnCollectionReset); 168 } 169 private void DeregisterRowEvents(IndexedDataRow<T> row) { 170 row.Values.ItemsAdded -= new CollectionItemsChangedEventHandler<IndexedItem<Tuple<T, double>>>(ValuesOnItemsAdded); 171 row.Values.ItemsMoved -= new CollectionItemsChangedEventHandler<IndexedItem<Tuple<T, double>>>(ValuesOnItemsMoved); 172 row.Values.ItemsRemoved -= new CollectionItemsChangedEventHandler<IndexedItem<Tuple<T, double>>>(ValuesOnItemsRemoved); 173 row.Values.ItemsReplaced -= new CollectionItemsChangedEventHandler<IndexedItem<Tuple<T, double>>>(ValuesOnItemsReplaced); 174 row.Values.CollectionReset -= new CollectionItemsChangedEventHandler<IndexedItem<Tuple<T, double>>>(ValuesOnCollectionReset); 175 } 176 177 protected virtual void ValuesOnItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<Tuple<T, double>>> e) { 178 this.OnReset(); 179 } 180 protected virtual void ValuesOnItemsMoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<Tuple<T, double>>> e) { 181 this.OnReset(); 182 } 183 protected virtual void ValuesOnItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<Tuple<T, double>>> e) { 184 this.OnReset(); 185 } 186 protected virtual void ValuesOnItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<Tuple<T, double>>> e) { 187 this.OnReset(); 188 } 189 protected virtual void ValuesOnCollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<Tuple<T, double>>> e) { 189 190 this.OnReset(); 190 191 }
Note: See TracChangeset
for help on using the changeset viewer.