private void reconnectOldConnections()
        {
            // For all the remembered inputs (of this node) to output pairs, reconnect.
            foreach (InputToOutputPair inOutPair in _oldConnectedOutputs)
            {
                NodeInput         input   = inOutPair.item1;
                List <NodeOutput> outputs = inOutPair.item2;

                foreach (var output in outputs)
                {
                    output.Add(input);
                }
            }

            // For all the remembered outputs (of this node) to inputs, reconnect.
            foreach (OutputToInputsPair outInsPair in _oldConnectedInputs)
            {
                NodeOutput       output = outInsPair.item1;
                List <NodeInput> inputs = outInsPair.item2;

                foreach (var input in inputs)
                {
                    output.Add(input);
                }
            }
        }
Пример #2
0
        private void reconnectOldConnections()
        {
            //  Re-connect old connections
            if (_oldConnectedOutput != null)
            {
                _oldConnectedOutput.Add(_input);
            }

            if (_oldConnectedInputs != null)
            {
                foreach (var input in _oldConnectedInputs)
                {
                    _output.Add(input);
                }
            }
        }
Пример #3
0
 public override void Undo()
 {
     _output.Add(_input);
 }
Пример #4
0
 public override void Redo()
 {
     disconnectOldConnections();
     _output.Add(_input);
 }