public void RedirectEdge(FlNwNodeVisualization _to_node, bool _rerout_start, FlowNetwork _owner)
        {
            if (_to_node == null || _owner == null)
            {
                return;
            }

            // perform redirection in the data
            FlNetEdge edge_data = this.FN_Edge;
            FlNetNode node_data = _to_node.FN_Node;
            bool      success   = false;

            if (edge_data != null && node_data != null)
            {
                success = _owner.RedirectEdge(edge_data, _rerout_start, node_data);
            }

            // perform redirection in the visualizations
            if (success)
            {
                if (_rerout_start)
                {
                    this.StartVis = _to_node;
                }
                else
                {
                    this.EndVis = _to_node;
                }
            }
        }
 public void RedirectAfterConversion(FlNwNodeVisualization _to_node, bool _rerout_start)
 {
     // old node was deleted !
     if (_rerout_start)
     {
         this.StartVis = _to_node;
     }
     else
     {
         this.EndVis = _to_node;
     }
 }
        public FlNwEdgeVisualization(FlowNwGraph _parent, FlNetEdge _fn_edge, FlNwNodeVisualization _start_vis, FlNwNodeVisualization _end_vis)
            : base(_parent, FlNwElementVisualization.NODE_WIDTH_DEFAULT, FlNwElementVisualization.NODE_HEIGHT_DEFAULT,
                   _fn_edge.Start.Position.X + FlNwElementVisualization.NODE_WIDTH_DEFAULT * 0.5,
                   _fn_edge.Start.Position.Y + FlNwElementVisualization.NODE_HEIGHT_DEFAULT * 0.5)
        {
            this.fn_edge = _fn_edge;
            this.fn_edge.PropertyChanged += fn_edge_PropertyChanged;

            this.UpdateGeometry();

            this.StartVis = _start_vis;
            this.EndVis   = _end_vis;
        }
        private void node_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            FlNwNodeVisualization node = sender as FlNwNodeVisualization;

            if (node == null || e == null)
            {
                return;
            }

            if (e.PropertyName == "Position")
            {
                this.UpdateGeometry();
                this.UpdateContent();
            }
        }