private void SetLacingType(object param) { DynamoViewModel.ExecuteCommand( new DynamoModel.UpdateModelValueCommand( Guid.Empty, NodeModel.GUID, "ArgumentLacing", param.ToString())); DynamoViewModel.RaiseCanExecuteUndoRedo(); }
private void DoGraphAutoLayout(object o) { Model.DoGraphAutoLayout(); DynamoViewModel.RaiseCanExecuteUndoRedo(); Dynamo.Logging.Analytics.TrackCommandEvent("GraphLayout"); }
private void Paste(object param) { var point = InCanvasSearchViewModel.InCanvasSearchPosition; DynamoViewModel.Model.Paste(new Point2D(point.X, point.Y), false); DynamoViewModel.RaiseCanExecuteUndoRedo(); }
private void RecordSelectionForUndo() { // This is where we attempt to store all the models in undo recorder // before they are modified (i.e. being dragged around the canvas). // Note that we only do this once when the first mouse-move occurs // after a mouse-down, because mouse-down can potentially be used // just to select a node (as opposed to moving the selected nodes), in // which case we don't want any of the nodes to be recorded for undo. // List <ModelBase> models = DynamoSelection.Instance.Selection. Where((x) => (x is ModelBase)).Cast <ModelBase>().ToList <ModelBase>(); WorkspaceModel.RecordModelsForModification(models, Model.UndoRecorder); DynamoViewModel.RaiseCanExecuteUndoRedo(); }
private void DoGraphAutoLayout(object o) { Model.DoGraphAutoLayout(); DynamoViewModel.RaiseCanExecuteUndoRedo(); }