Example #1
0
        void OnModelCommandCompleted(DynamoModel.RecordableCommand command)
        {
            var name = command.GetType().Name;
            switch (name)
            {
                case "OpenFileCommand":
                    this.AddToRecentFiles((command as DynamoModel.OpenFileCommand).XmlFilePath);
                    this.VisualizationManager.UnPause();
                    break;

                case "MutateTestCommand":
                    var mutatorDriver = new Dynamo.TestInfrastructure.MutatorDriver(this);
                    mutatorDriver.RunMutationTests();
                    break;

                case "SelectInRegionCommand":
                    var selectC = command as DynamoModel.SelectInRegionCommand;
                    CurrentSpaceViewModel.SelectInRegion(selectC.Region, selectC.IsCrossSelection);
                    break;

                case "DragSelectionCommand":
                    var dragC = command as DynamoModel.DragSelectionCommand;

                    if (DynamoModel.DragSelectionCommand.Operation.BeginDrag == dragC.DragOperation)
                        CurrentSpaceViewModel.BeginDragSelection(dragC.MouseCursor);
                    else
                        CurrentSpaceViewModel.EndDragSelection(dragC.MouseCursor);
                    break;

                case "DeleteModelCommand":
                case "CreateNodeCommand":
                case "CreateNoteCommand":
                case "UndoRedoCommand":
                case "ModelEventCommand":
                case "UpdateModelValueCommand":
                case "ConvertNodesToCodeCommand":
                    UndoCommand.RaiseCanExecuteChanged();
                    RedoCommand.RaiseCanExecuteChanged();
                    break;

                case "SwitchTabCommand":
                    if (command.IsInPlaybackMode)
                        RaisePropertyChanged("CurrentWorkspaceIndex");
                    break;

                case "RunCancelCommand":
                case "ForceRunCancelCommand":
                case "SelectModelCommand":
                case "MakeConnectionCommand":
                case "CreateCustomNodeCommand":
                    // for this commands there is no need
                    // to do anything after execution
                    break;

                default:
                    throw new InvalidOperationException("Unhandled command name");
            }
        }
Example #2
0
        private void MutateTestImpl()
        {
            var mutatorDriver = new Dynamo.TestInfrastructure.MutatorDriver(this);

            mutatorDriver.RunMutationTests();
        }
Example #3
0
 private void MutateTestImpl()
 {
     var mutatorDriver = new Dynamo.TestInfrastructure.MutatorDriver(this);
     mutatorDriver.RunMutationTests();
 }
Example #4
0
        void OnModelCommandCompleted(DynamoModel.RecordableCommand command)
        {
            var name = command.GetType().Name;

            switch (name)
            {
            case "OpenFileCommand":
                this.AddToRecentFiles((command as DynamoModel.OpenFileCommand).XmlFilePath);
                this.VisualizationManager.UnPause();
                break;

            case "MutateTestCommand":
                var mutatorDriver = new Dynamo.TestInfrastructure.MutatorDriver(this);
                mutatorDriver.RunMutationTests();
                break;

            case "SelectInRegionCommand":
                var selectC = command as DynamoModel.SelectInRegionCommand;
                CurrentSpaceViewModel.SelectInRegion(selectC.Region, selectC.IsCrossSelection);
                break;

            case "DragSelectionCommand":
                var dragC = command as DynamoModel.DragSelectionCommand;

                if (DynamoModel.DragSelectionCommand.Operation.BeginDrag == dragC.DragOperation)
                {
                    CurrentSpaceViewModel.BeginDragSelection(dragC.MouseCursor);
                }
                else
                {
                    CurrentSpaceViewModel.EndDragSelection(dragC.MouseCursor);
                }
                break;

            case "DeleteModelCommand":
            case "CreateNodeCommand":
            case "CreateNoteCommand":
            case "UndoRedoCommand":
            case "ModelEventCommand":
            case "UpdateModelValueCommand":
            case "ConvertNodesToCodeCommand":
                UndoCommand.RaiseCanExecuteChanged();
                RedoCommand.RaiseCanExecuteChanged();
                break;

            case "SwitchTabCommand":
                if (command.IsInPlaybackMode)
                {
                    RaisePropertyChanged("CurrentWorkspaceIndex");
                }
                break;

            case "RunCancelCommand":
            case "ForceRunCancelCommand":
            case "SelectModelCommand":
            case "MakeConnectionCommand":
            case "CreateCustomNodeCommand":
                // for this commands there is no need
                // to do anything after execution
                break;

            default:
                throw new InvalidOperationException("Unhandled command name");
            }
        }