Пример #1
0
 private void GroupWorksheetRows(int currentRowNum)
 {
     while (this.hierarchyRowGroups.Count > 0)
     {
         TreeViewSpreadExport.RowGroup rowGroup = this.hierarchyRowGroups.Pop();
         rowGroup.EndRow = currentRowNum - 1;
         this.readyToExportRowGroups.Push(rowGroup);
     }
     while (this.readyToExportRowGroups.Count > 0)
     {
         TreeViewSpreadExport.RowGroup rowGroup = this.readyToExportRowGroups.Pop();
         this.spreadExportRenderer.GroupRows(rowGroup.StartRow, rowGroup.EndRow, rowGroup.Level);
     }
 }
Пример #2
0
 private void ProcessCurrentRowGrouping(int currentRowHierarchyLevel, int currentRowNum)
 {
     if (currentRowHierarchyLevel > this.lastRowHierarchyLevel)
     {
         this.hierarchyRowGroups.Push(new TreeViewSpreadExport.RowGroup(currentRowNum, currentRowHierarchyLevel));
     }
     else if (currentRowHierarchyLevel < this.lastRowHierarchyLevel)
     {
         for (int index = this.hierarchyRowGroups.Count > 0 ? this.hierarchyRowGroups.Peek().Level : 0; currentRowHierarchyLevel < index && this.hierarchyRowGroups.Count > 0; index = this.hierarchyRowGroups.Count > 0 ? this.hierarchyRowGroups.Peek().Level : 0)
         {
             TreeViewSpreadExport.RowGroup rowGroup = this.hierarchyRowGroups.Pop();
             rowGroup.EndRow = currentRowNum - 1;
             this.readyToExportRowGroups.Push(rowGroup);
         }
     }
     this.lastRowHierarchyLevel = currentRowHierarchyLevel;
 }