private void RecursiveAdd(M11Branch b) { foreach (var c in b.UpstreamBranches) { //Microsoft.Research.DynamicDataDisplay.Charts.Shapes.PolylineEditor P = new Microsoft.Research.DynamicDataDisplay.Charts.Shapes.PolylineEditor(); // var Polyline = new Microsoft.Research.DynamicDataDisplay.Charts.Shapes.ViewportPolyline(); //PointCollection pc = new PointCollection(c.ProfileOffset.GetPoints()); //var f = Polyline.Points.IsFrozen; //Polyline.Points = pc; //P.Polyline = Polyline; //ObsGraph.Children.Add(P); //graphs.Add(P); // c.ChainageOffset = b.ChainageOffset - b.Branch.ChainageEnd + c.Branch.DownStreamConnection.StartChainage; // var g = ObsGraph.AddLineGraph(c.ProfileOffset, new Pen(Brushes.Gray, 2), new CircleElementPointMarker // { // Size = 5, // Brush = Brushes.Red, // Fill = Brushes.Orange, // } //, null); // var bl = ObsGraph.AddLineGraph(c.BottomProfileOffset, Colors.Black, 2); //graphs.Add(g.LineGraph); //graphs.Add(g.MarkerGraph); //graphs.Add(bl); RecursiveAdd(c); } }
public void SetEndpointTest() { M11Branch hygum = target.network.Branches.First(var => var.EndPointElevation != 0); hygum.EndPointElevation = 0; Assert.AreEqual(0, hygum.EndPointElevation); }
public void ReadCrossSectionsTest() { M11Branch hygum = target.network.Branches.First(var => var.Name == "HYGUM_NOR_KANAL"); CrossSection cs = hygum.CrossSections.First(var => var.Chainage == 1926); Assert.AreEqual(4.8, cs.MaxHeightMrk1and3, 0.000001); double d = cs.MaxHeightMrk1and3; cs.MaxHeightMrk1and3 = d + 1; Assert.AreEqual(d + 1, cs.MaxHeightMrk1and3); }