Beispiel #1
0
        public void RemovePort(OutputPort port)
        {
            var index = _outputs.IndexOf(port);

            _outputs.Remove(port);
            PortRemoved?.Invoke(this, new PortChangedEventArgs(port, index, PortChangedEventArgs.Modifier.Removed));
        }
Beispiel #2
0
        public void RemoveInput(InputPort port)
        {
            port.InputConnectionChanged -= Input_InputConnectionChanged;

            switch (port.DataType)
            {
            case PortDataType.Array:
                ((DataInputPort)port).DataAvailable     -= Input_DataAvailable;
                ((DataInputPort)port).SamplerateChanged -= Input_SamplerateChanged;
                break;

            case PortDataType.FFT:
                ((FFTInputPort)port).DataAvailable     -= Input_DataAvailable;
                ((FFTInputPort)port).SamplerateChanged -= Input_SamplerateChanged;
                ((FFTInputPort)port).FFTSizeChanged    -= Input_FFTSizeChanged;
                break;

            case PortDataType.Value:
                ((ValueInputPort)port).ValueAvailable -= Node_ValueAvailable;
                _valueInputs.Remove((ValueInputPort)port);
                break;
            }

            var index = _inputs.IndexOf(port);

            _inputs.Remove(port);
            PortRemoved?.Invoke(this, new PortChangedEventArgs {
                Port = port, Index = index
            });
        }
Beispiel #3
0
        public void RemoveOutput(OutputPort port)
        {
            port.OutputConnectionsChanged -= Output_OutputConnectionsChanged;
            var index = _outputs.IndexOf(port);

            _outputs.Remove(port);
            PortRemoved?.Invoke(this, new PortChangedEventArgs {
                Port = port, Index = index
            });
        }
Beispiel #4
0
 protected void OnPortRemoved(int port)
 {
     PortRemoved?.Invoke(this, new PortListEventArgs(port));
 }
Beispiel #5
0
 public void RemovePortFromTerminal(Terminal terminal)
 {
     UnsubscribeOnAllTerminalEvents();
     PortRemoved?.Invoke();
 }
Beispiel #6
0
 public void RemoveOutput(OutputPort port)
 {
     port.OutputConnectionsChanged -= Output_OutputConnectionsChanged;
     _outputs.Remove(port);
     PortRemoved?.Invoke(this, port);
 }