Changeset 860
- Timestamp:
- 11/29/08 11:06:32 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Visualization/DataRow.cs
r761 r860 1 1 using System; 2 2 using System.Drawing; 3 using System.Collections.Generic; 3 4 4 5 namespace HeuristicLab.Visualization { … … 12 13 private int thickness = 2; 13 14 private DrawingStyle style = DrawingStyle.Solid; 15 private List<double> dataRow = new List<double>(); 14 16 15 17 /// <summary> … … 73 75 74 76 public void AddValue(double value) { 75 throw new NotImplementedException();76 // TODO ValueChangedEvent auslösen77 dataRow.Add(value); 78 OnValueChanged(value, dataRow.Count - 1); 77 79 } 78 80 79 81 public void AddValue(double value, int index) { 80 throw new NotImplementedException();81 // TODO ValueChangedEvent auslösen82 dataRow.Add(value); 83 OnValueChanged(value, index); 82 84 } 83 85 84 86 public void AddValues(double[] values) { 85 throw new NotImplementedException(); 86 // TODO ValuesChangedEvent auslösen 87 int startInd = dataRow.Count; 88 89 foreach (double d in values) { 90 dataRow.Add(d); 91 } 92 93 OnValuesChanged(values, startInd); 87 94 } 88 95 89 96 public void AddValues(double[] values, int index) { 90 throw new NotImplementedException(); 91 // TODO ValuesChangedEvent auslösen 97 //check if index to start changes is valid 98 if (index + values.Length < dataRow.Count) { 99 foreach (double d in values) { 100 dataRow.Add(d); 101 } 102 OnValuesChanged(values, index); 103 } else { 104 throw new System.IndexOutOfRangeException(); 105 } 92 106 } 93 107 … … 113 127 114 128 public int Count { 115 get { throw new NotImplementedException(); }129 get { return dataRow.Count; } 116 130 } 117 131 118 132 public double this[int index] { 119 get { throw new NotImplementedException(); }133 get { return dataRow[index]; } 120 134 set { 121 throw new NotImplementedException();122 // TODO ValueChangedEvent auslösen135 dataRow[index] = value; 136 OnValueChanged(value, index); 123 137 } 124 138 }
Note: See TracChangeset
for help on using the changeset viewer.