public override int Mutate(NodeModel node) { DynamoViewModel.UIDispatcher.Invoke(new Action(() => { DynamoModel.SelectModelCommand selectNodeCommand = new DynamoModel.SelectModelCommand(node.GUID, ModifierKeys.None.AsDynamoType()); DynamoViewModel.ExecuteCommand(selectNodeCommand); DynamoModel.Copy(); DynamoModel.Paste(); })); return 1; }
public AnnotationViewModel(WorkspaceViewModel workspaceViewModel, AnnotationModel model) { annotationModel = model; this.WorkspaceViewModel = workspaceViewModel; model.PropertyChanged += model_PropertyChanged; // Group is created already.So just populate it. var selectNothing = new DynamoModel.SelectModelCommand(Guid.Empty, System.Windows.Input.ModifierKeys.None.AsDynamoType()); WorkspaceViewModel.DynamoViewModel.ExecuteCommand(selectNothing); }