void BoxMoved(BaseLineComponent lineCmp)
 {
     if (lineCmp.ConnectionStart == box || lineCmp.ConnectionEnd == box)
     {
         lineCmp.OnParentMoved(box, recompute);
     }            
 }
        void LinePointMovedTo(BaseLineComponent lineCmp, FlowChartPoint point)
        {
            if (lineCmp.StartPoint == point)
            {
                lineCmp.ConnectionStart = null;
            }
            else if (lineCmp.EndPoint == point)
            {
                lineCmp.ConnectionEnd = null;
            }

            foreach (BaseComponent drawableCmp in model.Items)
            {
                drawableCmp.Accept(new LinePointMovedVisitor(lineCmp, point));                
            }
        }
 private void HookToParentBox(BaseLineComponent c)
 {
     FlowChartReference fRef1 = component.ConnectionIds.Find(y => y.Name == "Start");
     if (fRef1 != null)
     {
         c.ConnectionStart = (BaseBoxComponent)this.model.Items.Find(y => y.ID == fRef1.ID);
     }
     FlowChartReference fRef2 = component.ConnectionIds.Find(y => y.Name == "End");
     if (fRef2 != null)
     {
         c.ConnectionEnd = (BaseBoxComponent)this.model.Items.Find(y => y.ID == fRef2.ID);
     }
     
     c.ConnectionStartPointIndex = fRef1.Key1;
     c.ConnectionEndPointIndex = fRef2.Key1;            
 }
 public void VisitComponent(BaseLineComponent cmp)
 {
     cmp.LinePointMovedTo += new Action<BaseLineComponent, FlowChartPoint>(LinePointMovedTo);
 }
 public LinePointMovedVisitor(BaseLineComponent lineCmp, FlowChartPoint linePoint)
 {
     this.lineCmp = lineCmp;
     this.linePoint = linePoint;
 }