public LineList_Output_ParamDef(string inName, FeRestraint inDefaultRestraint = null, List <string> inDefaultSelectedSectionNames = null) : base(inName) { if (inDefaultSelectedSectionNames == null || inDefaultSelectedSectionNames.Count == 0) { // Adds ALL sections SelectedSections.AddItems(FeSectionPipe.GetAllSections()); } else { SelectedSections.AddItems((from a in FeSectionPipe.GetAllSections() where inDefaultSelectedSectionNames.Contains(a.Name) select a).ToList()); } SelectedSections.CollectionChanged += SelectedSections_CollectionChanged; if (inDefaultRestraint == null) { Restraint = new FeRestraint(); // All False } else { Restraint = inDefaultRestraint; } }
public void SelectFamilyMedian() { List <string> chunk0s = (from a in FeSectionPipe.GetAllSections() select a.NameChunk(0)).Distinct().ToList(); List <FeSection> toSelect = new List <FeSection>(); foreach (string c1 in chunk0s) { List <FeSection> familyMembers = (from a in FeSectionPipe.GetAllSections() where a.NameChunk(0) == c1 select a).ToList(); toSelect.Add(familyMembers[familyMembers.Count / 2]); } SelectedSections.AddItems(toSelect, true); }
public void SelectAllSections() { SelectedSections.AddItems(FeSectionPipe.GetAllSections(), true); }