Exemplo 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;
            }
        }
Exemplo 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;
            }
        }
Exemplo n.º 3
0
        private void MakeConnectionImpl(MakeConnectionCommand command)
        {
            System.Guid nodeId = command.NodeId;

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

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

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