Changeset 10838 for branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4
- Timestamp:
- 05/11/14 21:17:30 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Tracking/FragmentGraphView.cs
r10833 r10838 96 96 var aPos = aTile.Position; 97 97 98 if (node.Content.Index1 > 0) { 99 var subtree = node.Content.Root.NodeAt(node.Content.Index1); 98 var fragment = node.Content; 99 if (fragment.Index1 > 0) { 100 var subtree = fragment.Root.NodeAt(fragment.Index1); 100 101 foreach (var s in subtree.IterateNodesPrefix()) { 101 102 var primitive = aTile.GetPrimitive(s); … … 103 104 var rpb = primitive as RectangularPrimitiveBase; 104 105 if (rpb != null) { 105 rpb.Pen = Pens.RoyalBlue;106 rpb.Pen = new Pen(Color.Black); 106 107 } 107 108 } 108 109 } 110 } 111 if (fragment.Index2 > 0) { 112 var subtree = fragment.Root.NodeAt(fragment.Index2); 113 foreach (var s in subtree.IterateNodesPrefix()) { 114 var primitive = aTile.GetPrimitive(s); 115 if (primitive != null) { 116 var rpb = primitive as RectangularPrimitiveBase; 117 if (rpb != null) { 118 rpb.Brush = new SolidBrush(Color.LightGray); 119 } 120 } 121 } 122 } 123 124 if (node.Parents.Any() && node == node.Parents.First().Children.First()) { 125 var parent = node.Parents.First(); 126 var index = fragment.Index1 + (parent.Content.Index2 - parent.Content.Index1); 127 var subtree = fragment.Root.NodeAt(index); 128 var primitive = aTile.GetPrimitive(subtree); 129 primitive.Brush = new SolidBrush(Color.LightCoral); 109 130 } 110 131 … … 114 135 var bPos = bTile.Position; 115 136 116 var line = new Line(chart, new PointD(aPos.X + aSize.Width / 2.0, aPos.Y + aSize.Height), new PointD(bPos.X + bSize.Width / 2.0, bPos.Y)); 137 var line = new Line(chart, new PointD(aPos.X + aSize.Width / 2.0, aPos.Y + aSize.Height), new PointD(bPos.X + bSize.Width / 2.0, bPos.Y)) { 138 Pen = Pens.DimGray 139 }; 117 140 symbolicExpressionChartControl.Add(line); 118 141 119 if (child == node.Children.First()) { 120 if (node.Content.Index1 > 0) { 121 var subtree = child.Content.Root.NodeAt(node.Content.Index1); 122 foreach (var s in subtree.IterateNodesPrefix()) { 123 var primitive = bTile.GetPrimitive(s); 124 if (primitive != null) { 125 var rpb = primitive as RectangularPrimitiveBase; 126 if (rpb != null) { 127 rpb.Pen = Pens.DarkOrange; 128 } 129 } 130 } 131 } 132 } 142 // if (child == node.Children.First()) { 143 // var subtree = child.Content.Root.NodeAt(fragment.Index2); 144 // var primitive = bTile.GetPrimitive(subtree); 145 // if (primitive != null) { 146 // var rpb = primitive as RectangularPrimitiveBase; 147 // if (rpb != null) { 148 // rpb.Pen = new Pen(Color.RoyalBlue); 149 // } 150 // } 151 // } 133 152 } 134 153 }
Note: See TracChangeset
for help on using the changeset viewer.