/// <summary>
 /// Initializes a new instance of the <see cref="RoutePoint"/> class.
 /// Cloning constructor.
 /// </summary>
 /// <param name="p">The point.</param>
 public RoutePoint(RoutePoint p)
 {
     m_x = p.X;
     m_y = p.Y;
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RoutePoint"/> class.
 /// Cloning constructor.
 /// </summary>
 /// <param name="p">The point.</param>
 public RoutePoint(RoutePoint p)
 {
     m_x = p.X;
     m_y = p.Y;
 }
        /// <summary>
        /// Creates the route point on edge.
        /// </summary>
        /// <param name="e">The <see cref="System.Windows.Input.MouseButtonEventArgs"/> instance containing the event data.</param>
        /// <param name="hitEdge">The hit edge.</param>
        private void CreateRoutePointOnEdge(MouseButtonEventArgs e, GraphSharp.Controls.EdgeControl hitEdge)
        {
            ExperimentNodeConnection connection = (ExperimentNodeConnection)hitEdge.Edge;
            
            Point canvasPoint = e.GetPosition(GraphLayout);
            RoutePoint finalPoint = new RoutePoint(canvasPoint.X, canvasPoint.Y);

            connection.RoutePoints.Add(finalPoint);
        }