Changeset 2474 for trunk/sources/HeuristicLab.Logging/3.3/LinechartView.cs
- Timestamp:
- 11/10/09 16:50:26 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Logging/3.3/LinechartView.cs
r1530 r2474 31 31 using HeuristicLab.Charting; 32 32 using HeuristicLab.Charting.Data; 33 using HeuristicLab.Common; 33 34 34 35 namespace HeuristicLab.Logging { … … 85 86 protected override void RemoveItemEvents() { 86 87 if(Linechart != null) { 87 Linechart.Values.ItemAdded -= new EventHandler< ItemIndexEventArgs>(Values_ItemAdded);88 Linechart.Values.ItemRemoved -= new EventHandler< ItemIndexEventArgs>(Values_ItemRemoved);88 Linechart.Values.ItemAdded -= new EventHandler<EventArgs<IItem, int>>(Values_ItemAdded); 89 Linechart.Values.ItemRemoved -= new EventHandler<EventArgs<IItem, int>>(Values_ItemRemoved); 89 90 } 90 91 base.RemoveItemEvents(); … … 97 98 base.AddItemEvents(); 98 99 if(Linechart != null) { 99 Linechart.Values.ItemAdded += new EventHandler< ItemIndexEventArgs>(Values_ItemAdded);100 Linechart.Values.ItemRemoved += new EventHandler< ItemIndexEventArgs>(Values_ItemRemoved);100 Linechart.Values.ItemAdded += new EventHandler<EventArgs<IItem, int>>(Values_ItemAdded); 101 Linechart.Values.ItemRemoved += new EventHandler<EventArgs<IItem, int>>(Values_ItemRemoved); 101 102 } 102 103 } … … 144 145 145 146 #region Values Events 146 private delegate void ItemIndexDelegate(object sender, ItemIndexEventArgse);147 private void Values_ItemRemoved(object sender, ItemIndexEventArgse) {147 private delegate void ItemIndexDelegate(object sender, EventArgs<IItem, int> e); 148 private void Values_ItemRemoved(object sender, EventArgs<IItem, int> e) { 148 149 if(InvokeRequired) { 149 150 Invoke(new ItemIndexDelegate(Values_ItemRemoved), sender, e); … … 152 153 } 153 154 } 154 private void Values_ItemAdded(object sender, ItemIndexEventArgse) {155 private void Values_ItemAdded(object sender, EventArgs<IItem, int> e) { 155 156 if(InvokeRequired) { 156 157 Invoke(new ItemIndexDelegate(Values_ItemAdded), sender, e); 157 158 } else { 158 159 Datachart datachart = dataChartControl.Chart; 159 ItemList list = (ItemList)e. Item;160 ItemList list = (ItemList)e.Value; 160 161 datachart.UpdateEnabled = false; 161 162 for (int i = 0; i < list.Count; i++) { … … 163 164 if (list[i] is IntData) value = (double)((IntData)list[i]).Data; 164 165 else value = ((DoubleData)list[i]).Data; 165 datachart.AddDataPoint(i, e. Index, value);166 datachart.AddDataPoint(i, e.Value2, value); 166 167 if (value < minY) minY = value; 167 168 if (value > maxY) maxY = value;
Note: See TracChangeset
for help on using the changeset viewer.