示例#1
0
        private void InternalRemoveOutput(Signal signal)
        {
            int idx = _outputs.IndexOf(signal);

            _outputs.RemoveAt(idx);
            if (_mediator != null)
            {
                _mediator.OnOutputRemoved(signal, idx);
                for (int i = idx; i < _outputs.Count; i++)
                {
                    _mediator.OnOutputMoved(_outputs[i], idx + 1, idx);
                }
            }
        }
示例#2
0
        private void InternalRemoveInput(Signal signal)
        {
            int idx = _inputs.IndexOf(signal);

            _inputs.RemoveAt(idx);
            if (_systemMediator != null)
            {
                _systemMediator.NotifyInputRemoved(signal, idx);
                for (int i = idx; i < _inputs.Count; i++)
                {
                    _systemMediator.NotifyInputMoved(_inputs[i], idx + 1, idx);
                }
            }
        }
示例#3
0
        private void InternalRemoveSignal(Signal signal)
        {
            if (_inputs.Contains(signal))
            {
                InternalRemoveInput(signal);
            }
            if (_outputs.Contains(signal))
            {
                InternalRemoveOutput(signal);
            }
            int idx = _allSignals.IndexOf(signal);

            _allSignals.RemoveAt(idx);
            if (_mediator != null)
            {
                _mediator.OnSignalRemoved(signal, idx);
                for (int i = idx; i < _allSignals.Count; i++)
                {
                    _mediator.OnSignalMoved(_allSignals[i], idx + 1, idx);
                }
            }
        }