virtual public bool OnCommand(string MenuId) { switch (MenuId) { case "MenuId.AttributeFilter.SelectAll": for (int i = 0; i < attributeList.Count; ++i) { filter.Add(attributeList.Item(i)); } for (int i = 0; i < propertyPages.Count; i++) { for (int j = 0; j < SubEntries.Length; j++) { propertyPages[i].Refresh(SubEntries[j] as IPropertyEntry); // if they are not visible, this is ok } } return(true); case "MenuId.AttributeFilter.SelectNone": for (int i = 0; i < attributeList.Count; ++i) { filter.Remove(attributeList.Item(i)); } for (int i = 0; i < propertyPages.Count; i++) { for (int j = 0; j < SubEntries.Length; j++) { propertyPages[i].Refresh(SubEntries[j] as IPropertyEntry); // if they are not visible, this is ok } } return(true); } return(false); }
static public bool IncludeAttributeList(IAttributeListContainer Including, IAttributeListContainer Included, string ListName, bool Initialize) { bool res = false; if (Including == null || Included == null) { return(res); } IAttributeList toAdd = Included.GetList(ListName); IAttributeList addTo = Including.GetList(ListName); if (toAdd == null || addTo == null) { return(res); } for (int i = 0; i < toAdd.Count; i++) { INamedAttribute na = toAdd.Item(i); if (addTo.Find(na.Name) == null) { addTo.Add(na); res = true; } } if (res) { UpdateLists(Including, false); } return(res); }