Esempio 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.Cancel:
                CurrentSpaceViewModel.CancelConnection();
                break;
            }
        }
Esempio n. 2
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;

            // TODO - can be removed in Dynamo 3.0 - DYN-1729
            case DynamoModel.MakeConnectionCommand.Mode.EndAndStartCtrlConnection:
                CurrentSpaceViewModel.BeginCreateConnections(
                    nodeId, command.PortIndex, command.Type);
                break;

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

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

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