예제 #1
0
        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: 0x060023CE RID: 9166 RVA: 0x000CE21C File Offset: 0x000CC41C
        protected override ListViewContents2 CreateListViewContents()
        {
            DefaultFolderType defaultFolderType = Utilities.GetDefaultFolderType(this.contextFolder);
            bool renderLastModifiedTime         = MessagePrefetchConfiguration.IsMessagePrefetchEnabledForSession(base.UserContext, this.dataFolder.Session);
            ListViewContents2 listViewContents;

            if (this.IsConversationView)
            {
                listViewContents = new ConversationItemList2(base.SortedColumn, base.SortOrder, base.UserContext, this.folderScope, defaultFolderType, OwaStoreObjectId.CreateFromStoreObject(this.contextFolder), renderLastModifiedTime);
                switch (base.SortedColumn)
                {
                case ColumnId.ConversationLastDeliveryTime:
                    listViewContents = new TimeGroupByList2(ColumnId.ConversationLastDeliveryTime, base.SortOrder, (ItemList2)listViewContents, base.UserContext);
                    break;

                case ColumnId.ConversationIcon:
                case ColumnId.ConversationSubject:
                case ColumnId.ConversationHasAttachment:
                case ColumnId.ConversationSenderList:
                case ColumnId.ConversationImportance:
                case ColumnId.ConversationFlagStatus:
                case ColumnId.ConversationToList:
                    listViewContents = base.CreateGroupByList(listViewContents);
                    break;

                case ColumnId.ConversationSize:
                    listViewContents = new SizeGroupByList2(ColumnId.ConversationSize, base.SortOrder, (ItemList2)listViewContents, base.UserContext);
                    break;
                }
                return(listViewContents);
            }
            ViewDescriptor viewDescriptor;

            if (defaultFolderType == DefaultFolderType.Drafts)
            {
                viewDescriptor = MessageVirtualListView2.MultiLineToDrafts;
            }
            else if (defaultFolderType == DefaultFolderType.DeletedItems)
            {
                viewDescriptor = MessageVirtualListView2.MultiLineFromDeletedItems;
            }
            else if (defaultFolderType == DefaultFolderType.SentItems || defaultFolderType == DefaultFolderType.Outbox)
            {
                viewDescriptor = MessageVirtualListView2.MultiLineTo;
            }
            else
            {
                viewDescriptor = MessageVirtualListView2.MultiLineFrom;
            }
            listViewContents = new MessageMultiLineList2(viewDescriptor, base.SortedColumn, base.SortOrder, base.UserContext, this.folderScope, renderLastModifiedTime);
            ColumnId sortedColumn = base.SortedColumn;

            switch (sortedColumn)
            {
            case ColumnId.DeliveryTime:
                listViewContents = new TimeGroupByList2(ColumnId.DeliveryTime, base.SortOrder, (ItemList2)listViewContents, base.UserContext);
                break;

            case ColumnId.SentTime:
                listViewContents = new TimeGroupByList2(ColumnId.SentTime, base.SortOrder, (ItemList2)listViewContents, base.UserContext);
                break;

            case ColumnId.Size:
                listViewContents = new SizeGroupByList2(base.SortOrder, (ItemList2)listViewContents, base.UserContext);
                break;

            default:
                switch (sortedColumn)
                {
                case ColumnId.FlagDueDate:
                    listViewContents = new FlagGroupByList2(ColumnId.FlagDueDate, base.SortOrder, (ItemList2)listViewContents, base.UserContext);
                    break;

                case ColumnId.FlagStartDate:
                    listViewContents = new FlagGroupByList2(ColumnId.FlagStartDate, base.SortOrder, (ItemList2)listViewContents, base.UserContext);
                    break;

                default:
                    listViewContents = base.CreateGroupByList(listViewContents);
                    break;
                }
                break;
            }
            return(listViewContents);
        }