Exemple #1
0
        //public virtual void ConnectInputTo(Connector other) {
        //    if (other == null)
        //    {
        //        return;
        //    }

        //    OutputConnection otherOutput = other.Output;
        //    Point contactPoint = otherOutput.Center;

        //    StartPoint.AddConnection(contactPoint, other);
        //    //otherOutput.AddConnection(StartPoint.Branches);
        //    otherOutput.AddConnection(this);
        //}

        //public virtual void DisconnectInput()
        //{
        //    if (StartPoint == null)
        //    {
        //        return;
        //    }

        //    Connector other = StartPoint.Branches;
        //    if (other != null)
        //    {
        //        other.Output.RemoveConnection();
        //    }

        //    StartPoint.RemoveConnection();
        //}

        public virtual void ConnectTo(Connector other)
        {
            if (other == null)
            {
                return;
            }

            //OutputConnection otherInput = other.StartPoint;
            Point contactPoint = Output.Center;

            Output.AddConnection(other);
            //otherInput.AddConnection(contactPoint, this);
        }