Пример #1
0
        private void RemoveConnection(int index)
        {
            Connection[]   newConnections = new Connection[connections.Length - 1];
            SplineComputer computer       = connections[index].computer;
            int            pointIndex     = connections[index].pointIndex;

            for (int i = 0; i < connections.Length; i++)
            {
                if (i < index)
                {
                    newConnections[i] = connections[i];
                }
                else if (i == index)
                {
                    continue;
                }
                else
                {
                    newConnections[i - 1] = connections[i];
                }
            }
            connections = newConnections;
            if (computer != null)
            {
                computer.RemoveNodeLink(pointIndex);
            }
        }