Esempio n. 1
0
        public void Disconnect(dynPort p)
        {
            if (p.Equals(pStart))
            {
                //pStart.Owner.Outputs[pStart.Index] = null;
                pStart = null;
            }

            if (p.Equals(pEnd))
            {
                if (pEnd.PortType == PortType.INPUT)
                {
                    pEnd.Owner.InPortData[pEnd.Index].Object = null;
                }
                else if (pEnd.PortType == PortType.STATE)
                {
                    pEnd.Owner.StatePortData[pEnd.Index].Object = null;
                }
                pEnd = null;
            }

            p.Disconnect(this);

            //turn the connector back to dashed
            connector.StrokeDashArray.Add(5);
            connector.StrokeDashArray.Add(2);
        }
Esempio n. 2
0
        public void Kill()
        {
            if (pStart != null && pStart.Connectors.Contains(this))
            {
                pStart.Disconnect(this);
                //pStart.Connectors.Remove(this);
                //do not remove the owner's output element
            }
            if (pEnd != null && pEnd.Connectors.Contains(this))
            {
                pEnd.Disconnect(this);
                //remove the reference to the
                //dynElement attached to port A
                pEnd.Owner.InPortData[pEnd.Index].Object = null;
            }

            pStart = null;
            pEnd   = null;

            dynElementSettings.SharedInstance.Workbench.Children.Remove(connector);

            isDrawing = false;
        }
Esempio n. 3
0
        public void Disconnect(dynPort p)
        {
            if (p.Equals(pStart))
            {
                pStart = null;
            }

            if (p.Equals(pEnd))
            {
                pEnd = null;
            }

            p.Disconnect(this);

            //turn the connector back to dashed
            connector.StrokeDashArray.Add(5);
            connector.StrokeDashArray.Add(2);

            plineConnector.StrokeDashArray.Add(5);
            plineConnector.StrokeDashArray.Add(2);
        }
Esempio n. 4
0
        public void Disconnect(dynPort p)
        {
            if (p.Equals(pStart))
            {
                //pStart.Owner.Outputs[pStart.Index] = null;
                pStart = null;
            }

            if (p.Equals(pEnd))
            {
                if(pEnd.PortType == PortType.INPUT)
                    pEnd.Owner.InPortData[pEnd.Index].Object = null;
                else if(pEnd.PortType == PortType.STATE)
                    pEnd.Owner.StatePortData[pEnd.Index].Object = null;
                pEnd = null;
            }

            p.Disconnect(this);

            //turn the connector back to dashed
            connector.StrokeDashArray.Add(5);
            connector.StrokeDashArray.Add(2);
        }