コード例 #1
0
        void OnConnectionRemoved(object sender, NodeConnectionEventArgs e)
        {
            MyConnection connToDelete = e.Connection.Tag as MyConnection;

            if (connToDelete != null)
            {
                connToDelete.Disconnect();
            }
        }
コード例 #2
0
        void OnConnectionRemoved(object sender, NodeConnectionEventArgs e)
        {
            MyConnection connToDelete = e.Connection.Tag as MyConnection;

            if (connToDelete != null)
            {
                connToDelete.Disconnect();

                m_mainForm.ProjectStateChanged("Connection removed");
            }

            m_mainForm.RefreshConnections(this);
        }
コード例 #3
0
        private void DisconnectInputNodesFromEnd(int fromIndex)
        {
            if (Children != null)
            {
                foreach (MyNode child in Children)
                {
                    for (int i = 0; i < child.InputConnections.Length; i++)
                    {
                        MyConnection c = child.InputConnections[i];

                        if (c != null &&
                            c.From is MyParentInput &&
                            (c.From as MyParentInput).ParentInputIndex >= fromIndex)
                        {
                            c.Disconnect();
                            child.InputConnections[i] = null;
                        }
                    }
                }
            }

            if (GroupInputNodes != null)
            {
                foreach (MyOutput outputNode in GroupOutputNodes)
                {
                    if (outputNode != null &&
                        outputNode.InputConnections[0] != null &&
                        outputNode.InputConnections[0].From is MyParentInput &&
                        (outputNode.InputConnections[0].From as MyParentInput).ParentInputIndex >= fromIndex)
                    {
                        outputNode.InputConnections[0].Disconnect();
                        outputNode.InputConnections[0] = null;
                    }
                }
            }
        }
コード例 #4
0
 public void Disconnects()
 {
     m_connection.Disconnect();
     Assert.Empty(m_node1.OutputConnections[0]);
     Assert.Null(m_node2.InputConnections[0]);
 }