- Timestamp:
- 08/18/09 18:17:04 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Charting/3.3/VisualMatrixRow.cs
r2289 r2295 7 7 8 8 namespace HeuristicLab.CEDMA.Charting { 9 public class VisualMatrixRow { 10 private MatrixRow row; 9 public class VisualMatrixRow : ItemBase { 11 10 private static Random random = new Random(); 11 private Dictionary<string, object> dict; 12 12 13 public VisualMatrixRow( MatrixRow row) {14 this. row = row;13 public VisualMatrixRow() { 14 this.dict = new Dictionary<string, object>(); 15 15 this.visible = true; 16 16 this.selected = false; 17 17 this.xJitter = random.NextDouble() * 2.0 - 1.0; 18 18 this.yJitter = random.NextDouble() * 2.0 - 1.0; 19 } 20 21 public VisualMatrixRow(MatrixRow row) 22 : this() { 23 foreach (KeyValuePair<string, object> value in row.Values) 24 dict[value.Key] = value.Value; 19 25 } 20 26 … … 42 48 43 49 public object Get(string name) { 44 return row.Get(name); 50 if (!dict.ContainsKey(name)) 51 return null; 52 return dict[name]; 53 } 54 55 public void Set(string name, object value) { 56 this.dict[name] = value; 57 } 58 59 public IEnumerable<KeyValuePair<string, object>> Values { 60 get { return dict; } 45 61 } 46 62 … … 51 67 public string GetToolTipText() { 52 68 StringBuilder b = new StringBuilder(); 53 foreach (KeyValuePair<string, object> v in row.Values) {69 foreach (KeyValuePair<string, object> v in dict) { 54 70 if (v.Value is string || v.Value is double || v.Value is int) { 55 71 string val = v.Value.ToString();
Note: See TracChangeset
for help on using the changeset viewer.