void assignToSelection() { SelectionSetVM newSet = new SelectionSetVM(_selectedMaterialIndex); foreach (var filter in Filters) { foreach (var item in filter.FilterItems) { if (item.IsSelected) { newSet.SelectedFilterValues.Add(new FilterSelection(filter.Name, item.Name)); } } } foreach (var elem in Elements) { if (elem.Include) { newSet.ElementsIdsToInclude.Add(elem.UniqueID); } if (elem.Exclude) { newSet.ElementsIdsToExclude.Add(elem.UniqueID); } } SelectionSets.Add(newSet); processSelectionSet(newSet); UpdateAll(); }
public GenSelectionSet CreateSelectionSet(IGraphType graphType, INode node) { if (graphType == null) { return(null); } var selectionSet = new GenSelectionSet { Namespace = this, Name = graphType.Name, GraphType = graphType, Node = node }; if (!selectionSet.MapsToBuildInType) { SelectionSets.Add(selectionSet); } return(selectionSet); }