Ejemplo n.º 1
0
        public override void CreateDomainScopeMember(ReportHierarchyNode parentNode, Grouping grouping, AutomaticSubtotalContext context)
        {
            GaugeMember gaugeMember = new GaugeMember(context.GenerateID(), this);

            gaugeMember.Grouping = grouping.CloneForDomainScope(context, gaugeMember);
            HierarchyNodeList hierarchyNodeList = (parentNode != null) ? parentNode.InnerHierarchy : this.ColumnMembers;

            if (hierarchyNodeList != null)
            {
                hierarchyNodeList.Add(gaugeMember);
                gaugeMember.IsColumn = true;
                this.GaugeRow.Cells.Insert(this.ColumnMembers.GetMemberIndex(gaugeMember), new GaugeCell(context.GenerateID(), this));
                base.ColumnCount++;
            }
        }
Ejemplo n.º 2
0
 private void FindLeafNodes(List <ReportHierarchyNode> leafNodes)
 {
     for (int i = 0; i < base.Count; i++)
     {
         ReportHierarchyNode reportHierarchyNode = this[i];
         HierarchyNodeList   innerHierarchy      = reportHierarchyNode.InnerHierarchy;
         if (innerHierarchy == null)
         {
             leafNodes.Add(reportHierarchyNode);
         }
         else
         {
             innerHierarchy.FindLeafNodes(leafNodes);
         }
     }
 }
Ejemplo n.º 3
0
 private static void CalculateLeafCellIndexes(HierarchyNodeList nodes, ref List <int> leafCellIndexes, int excludedCellIndex)
 {
     if (leafCellIndexes == null)
     {
         int count = nodes.Count;
         leafCellIndexes = new List <int>(count);
         for (int i = 0; i < count; i++)
         {
             ReportHierarchyNode reportHierarchyNode = nodes[i];
             if (reportHierarchyNode.InnerHierarchy == null && reportHierarchyNode.MemberCellIndex != excludedCellIndex)
             {
                 leafCellIndexes.Add(reportHierarchyNode.MemberCellIndex);
             }
         }
     }
 }
Ejemplo n.º 4
0
        private static bool CalculateDependencies(HierarchyNodeList members, HierarchyNodeList staticMembersInSameScope, HierarchyNodeList dynamicMembers)
        {
            if (members == null)
            {
                return(false);
            }
            bool flag  = false;
            int  count = members.Count;

            foreach (ReportHierarchyNode member in members)
            {
                if (!member.IsStatic)
                {
                    dynamicMembers.Add(member);
                }
                else
                {
                    staticMembersInSameScope.Add(member);
                    flag = (member.InnerHierarchy == null || (flag | HierarchyNodeList.CalculateDependencies(member.InnerHierarchy, staticMembersInSameScope, dynamicMembers)));
                }
            }
            return(flag);
        }
Ejemplo n.º 5
0
 public List <int> GetLeafCellIndexes(int excludedCellIndex)
 {
     if (excludedCellIndex < 0)
     {
         return(this.LeafCellIndexes);
     }
     if (this.m_leafCellIndexesWithoutExcluded == null)
     {
         this.m_excludedIndex = excludedCellIndex;
         HierarchyNodeList.CalculateLeafCellIndexes(this, ref this.m_leafCellIndexesWithoutExcluded, excludedCellIndex);
     }
     else if (this.m_excludedIndex != excludedCellIndex)
     {
         this.m_excludedIndex = excludedCellIndex;
         this.m_leafCellIndexesWithoutExcluded = null;
         HierarchyNodeList.CalculateLeafCellIndexes(this, ref this.m_leafCellIndexesWithoutExcluded, excludedCellIndex);
     }
     if (this.m_leafCellIndexesWithoutExcluded.Count != 0)
     {
         return(this.m_leafCellIndexesWithoutExcluded);
     }
     return(null);
 }
Ejemplo n.º 6
0
 private void CalculateDependencies()
 {
     this.m_staticMembersInSameScope = new HierarchyNodeList();
     this.m_dynamicMembersAtScope    = new HierarchyNodeList();
     this.m_hasStaticLeafMembers     = HierarchyNodeList.CalculateDependencies(this, this.m_staticMembersInSameScope, this.m_dynamicMembersAtScope);
 }