Esempio n. 1
0
        public HierarchySelectorContext(HierarchySelector selector, XmlNode xmlNode, HierarchySelectorContext parent = null)
        {
            this.Selector = selector;
            this.XmlNode  = xmlNode;
            this.Parent   = parent;
            this.Items    = new List <HierarchySelectorContext>();

            this.Parse();
        }
Esempio n. 2
0
 /// <summary>
 /// Creates a new instance of the
 /// hierarchy selector section object.
 /// </summary>
 /// <param name="xmlNode">
 /// The xml node that contains the hierarchy
 /// selector section definition.
 /// </param>
 public HierarchySelectorSection(
     HierarchySelector selector,
     XmlNode xmlNode,
     HierarchySelectorContext parent = null
     )
     : base(selector, xmlNode, parent)
 {
     // Parse the hierarchy selection section definition.
     this.Parse();
 }
Esempio n. 3
0
        private void ValidateSelections(HierarchySelectorContext parent)
        {
            foreach (HierarchySelectorContext item in parent.Items)
            {
                if (item.GetType() == typeof(HierarchySelectorItem))
                {
                    Guid idHierarchy = ((HierarchySelectorItem)item).IdHierarchy;

                    if (this.Selector.SelectedItems[this.Section.Name].Contains(idHierarchy))
                    {
                        this.Selector.SelectedItems[this.Section.Name].Remove(idHierarchy);
                    }
                }
                else
                {
                    foreach (HierarchySelectorContext child in item.Items)
                    {
                        ValidateSelections(child);
                    }
                }
            }
        }
Esempio n. 4
0
 /// <summary>
 /// Creates a new instance of the hierarchy selector filter object.
 /// </summary>
 /// <param name="section">The hierarchy selector section of which the filter is part of.</param>
 /// <param name="xmlNode">The xml node that contains the hierarchy selector filter definition.</param>
 public HierarchySelectorFilter(HierarchySelector selector, XmlNode xmlNode, HierarchySelectorContext parent = null)
     : base(selector, xmlNode, parent)
 {
     this.Parse();
 }