// Token: 0x06002137 RID: 8503 RVA: 0x000BECC0 File Offset: 0x000BCEC0 private bool ShouldSkipFirstHeader(object groupValue, string groupValueString) { if (!base.IsForVirtualListView || this.DataSource.StartRange == 0) { return(false); } int currentItem = this.DataSource.CurrentItem; this.DataSource.MoveToItem(currentItem - 1); object itemGroupByValue = this.GetItemGroupByValue(); string itemValueString = itemGroupByValue as string; bool result = GroupByList2.IsItemInGroup(groupValue, groupValueString, itemGroupByValue, itemValueString); this.DataSource.MoveToItem(currentItem); return(result); }
protected override ListViewContents2 CreateListViewContents() { ListViewContents2 listViewContents = new TaskSingleLineList(TaskVirtualListView.taskViewDescriptor, base.SortedColumn, base.SortOrder, base.UserContext, this.folderScope); ColumnId sortedColumn = base.SortedColumn; if (sortedColumn == ColumnId.DueDate) { listViewContents = new TimeGroupByList2(ColumnId.DueDate, base.SortOrder, (ItemList2)listViewContents, base.UserContext); } else { Column column = ListViewColumns.GetColumn(base.SortedColumn); if (column.GroupType == GroupType.Expanded) { listViewContents = new GroupByList2(base.SortedColumn, base.SortOrder, (ItemList2)listViewContents, base.UserContext); } } return(listViewContents); }
// Token: 0x06002135 RID: 8501 RVA: 0x000BEAB4 File Offset: 0x000BCCB4 protected void RenderGroups(TextWriter writer, int startRange, int endRange) { GroupType groupType = this.groupByColumn.GroupType; if (groupType != GroupType.Expanded) { return; } if (this.groupRange == null) { this.DataSource.MoveToItem(startRange); object obj = this.GetItemGroupByValue(); string groupValueString = obj as string; bool skipHeader = this.ShouldSkipFirstHeader(obj, groupValueString); while (this.DataSource.MoveNext()) { object itemGroupByValue = this.GetItemGroupByValue(); string itemValueString = itemGroupByValue as string; if (!GroupByList2.IsItemInGroup(obj, groupValueString, itemGroupByValue, itemValueString)) { this.RenderGroup(writer, startRange, this.DataSource.CurrentItem - 1, null, skipHeader); startRange = this.DataSource.CurrentItem; obj = itemGroupByValue; groupValueString = (obj as string); skipHeader = false; } } if (startRange <= this.DataSource.CurrentItem) { this.RenderGroup(writer, startRange, this.DataSource.CurrentItem - 1, null, skipHeader); return; } } else { this.DataSource.MoveToItem(startRange); int num; if (this.sortOrder == SortOrder.Ascending) { num = 0; } else { num = this.groupRange.Length - 1; } while (0 <= num && num < this.groupRange.Length && this.DataSource.CurrentItem < this.DataSource.RangeCount) { startRange = int.MinValue; bool skipHeader2 = false; while (this.groupRange[num].IsInGroup(this.DataSource, this.groupByColumn)) { if (startRange == -2147483648) { startRange = this.DataSource.CurrentItem; if (startRange == 0) { skipHeader2 = this.ShouldSkipFirstHeader(this.groupRange[num]); } } if (!this.DataSource.MoveNext()) { break; } } if (startRange != -2147483648) { this.RenderGroup(writer, startRange, this.DataSource.CurrentItem - 1, this.groupRange[num], skipHeader2); } if (this.sortOrder == SortOrder.Ascending) { num++; } else { num--; } } } }