示例#1
0
 private void RecursiveAdd(M11Branch b, ObservableCollection <M11Branch> subnet)
 {
     foreach (var u in b.UpstreamBranches)
     {
         u.SubNetWorkEndpoint = b.SubNetWorkEndpoint;
         u.ChainageOffset     = u.DownStreamConnection.StartChainage - u.ChainageEnd + b.ChainageOffset;
         subnet.Add(u);
         RecursiveAdd(u, subnet);
     }
 }
示例#2
0
 /// <summary>
 /// Adds the cross section to the correct branch
 /// </summary>
 /// <param name="MyCs"></param>
 private void CombineNetworkAndCrossSections(CrossSection MyCs)
 {
     if (network != null)
     {
         //Finds the branch with the correct name, topoid, and chainage interval
         M11Branch mb = network.Branches.FirstOrDefault(var => var.Name.ToUpper() == MyCs.BranchName.ToUpper() & var.TopoID.ToUpper() == MyCs.TopoID.ToUpper() & var.ChainageStart <= MyCs.Chainage & var.ChainageEnd >= MyCs.Chainage);
         if (mb != null)
         {
             mb.AddCrossection(MyCs);
         }
     }
 }
示例#3
0
        public override bool Equals(object obj)
        {
            M11Branch other = obj as M11Branch;

            if (other == null)
            {
                return(false);
            }
            else
            {
                return(other.Name == Name & other.ChainageStart == ChainageStart & other.ChainageEnd == ChainageEnd);
            }
        }
示例#4
0
 private void RecursiveAdd(M11Branch b, ObservableCollection<M11Branch> subnet)
 {
   foreach (var u in b.UpstreamBranches)
   {
     u.SubNetWorkEndpoint = b.SubNetWorkEndpoint;
     u.ChainageOffset = u.DownStreamConnection.StartChainage - u.ChainageEnd + b.ChainageOffset;
     subnet.Add(u);
     RecursiveAdd(u, subnet);
   }
 }
示例#5
0
    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);

      }
    }