public void RemoveOperation(Operation operation) { RemoveOperationCommand removeOperationCommand = (RemoveOperationCommand)RemoveOperationCommandFactory.Factory().Create(DiagramController.ModelController); removeOperationCommand.DeletedOperation = operation; removeOperationCommand.Execute(); }
public void RenameOperation(Operation operation, string newName) { RenameElementCommand <Operation> renameElementCommand = (RenameElementCommand <Operation>) RenameElementCommandFactory <Operation> .Factory().Create(DiagramController.ModelController); renameElementCommand.NewName = newName; renameElementCommand.RenamedElement = operation; renameElementCommand.ContainingCollection = Class.Operations; renameElementCommand.AssociatedElements.Add(Class); renameElementCommand.Execute(); }