Ejemplo n.º 1
0
        private void MakeConnectionImpl(DynamoModel.MakeConnectionCommand command)
        {
            Guid nodeId = command.ModelGuid;

            switch (command.ConnectionMode)
            {
            case DynamoModel.MakeConnectionCommand.Mode.Begin:
                CurrentSpaceViewModel.BeginConnection(
                    nodeId, command.PortIndex, command.Type);
                break;

            case DynamoModel.MakeConnectionCommand.Mode.End:
                CurrentSpaceViewModel.EndConnection(
                    nodeId, command.PortIndex, command.Type);
                break;

            case DynamoModel.MakeConnectionCommand.Mode.BeginShiftReconnections:
                CurrentSpaceViewModel.BeginShiftReconnections(
                    nodeId, command.PortIndex, command.Type);
                break;

            case DynamoModel.MakeConnectionCommand.Mode.EndShiftReconnections:
                CurrentSpaceViewModel.EndConnection(
                    nodeId, command.PortIndex, command.Type);
                break;

            case DynamoModel.MakeConnectionCommand.Mode.EndAndStartCtrlConnection:
                CurrentSpaceViewModel.EndAndStartCtrlConnection(
                    nodeId, command.PortIndex, command.Type);
                break;

            case DynamoModel.MakeConnectionCommand.Mode.Cancel:
                CurrentSpaceViewModel.CancelConnection();
                break;
            }
        }