public Rib <T> GetMaxRib() { var explorer = TreeExplorer <T> .Get(this); var maxRibLength = 0d; Rib <T> maxRib = null; explorer.ExploreRibs(rib => { if (rib.Distance > maxRibLength) { maxRib = rib; maxRibLength = rib.Distance; } }); return(maxRib); }
private void addSeries(Rib <T> rib) { var series = new LineSeries { Color = OxyColors.Red, MarkerSize = 10, MarkerStroke = OxyColors.Tomato, MarkerType = MarkerType.Plus, MarkerFill = OxyColors.Tomato }; series.Points.Add(new DataPoint(rib.FirstNode.Data.FirstMeasurement, rib.FirstNode.Data.SecondMeasurement)); series.Points.Add(new DataPoint(rib.SecondNode.Data.FirstMeasurement, rib.SecondNode.Data.SecondMeasurement)); _model.Annotations.Add(new TextAnnotation { TextPosition = new DataPoint(rib.SecondNode.Data.FirstMeasurement, rib.SecondNode.Data.SecondMeasurement), Text = rib.SecondNode.Data.Name, Stroke = OxyColors.Transparent }); _series.Add(series); }