Ejemplo n.º 1
0
        public void Expand()
        {
            ExTraceGlobals.MailCallTracer.TraceDebug((long)this.GetHashCode(), "TreeEventHandler.Expand");
            string text = (string)base.GetParameter("id");
            bool   flag = false;

            if (OwaStoreObjectId.IsDummyArchiveFolder(text))
            {
                text = base.UserContext.GetArchiveRootFolderIdString();
                flag = !string.IsNullOrEmpty(text);
            }
            this.RenderFolderTreeChangedNode(OwaStoreObjectId.CreateFromString(text), null, true, flag, (FolderTreeRenderType)base.GetParameter("rdt"));
            if (flag)
            {
                NavigationHost.RenderFavoritesAndNavigationTrees(this.Writer, base.UserContext, null, new NavigationNodeGroupSection[]
                {
                    NavigationNodeGroupSection.First
                });
            }
        }
        // Token: 0x060021E8 RID: 8680 RVA: 0x000C18B0 File Offset: 0x000BFAB0
        protected override void LoadViewState()
        {
            OwaStoreObjectId owaStoreObjectId = null;

            if (base.SerializedContainerId != null)
            {
                if (OwaStoreObjectId.IsDummyArchiveFolder(base.SerializedContainerId))
                {
                    owaStoreObjectId         = base.UserContext.GetArchiveRootFolderId();
                    this.archiveRootFolderId = owaStoreObjectId.ToString();
                }
                else
                {
                    owaStoreObjectId = OwaStoreObjectId.CreateFromString(base.SerializedContainerId);
                }
            }
            if (owaStoreObjectId == null)
            {
                base.AlgorithmTracer.TraceDebug((long)this.GetHashCode(), "folder Id is null, using default folder");
                owaStoreObjectId = OwaStoreObjectId.CreateFromMailboxFolderId(this.DefaultFolderId);
            }
            PropertyDefinition[] array = new PropertyDefinition[]
            {
                FolderSchema.DisplayName,
                FolderSchema.ItemCount,
                FolderSchema.UnreadCount,
                ViewStateProperties.ReadingPanePosition,
                ViewStateProperties.ViewWidth,
                ViewStateProperties.ViewHeight,
                ViewStateProperties.MultiLine,
                ViewStateProperties.SortColumn,
                ViewStateProperties.SortOrder,
                ViewStateProperties.ViewFilter,
                ViewStateProperties.FilteredViewLabel,
                FolderSchema.SearchFolderAllowAgeout,
                FolderSchema.IsOutlookSearchFolder,
                FolderSchema.AdminFolderFlags,
                FolderSchema.FolderQuota,
                FolderSchema.FolderSize,
                FolderSchema.ELCFolderComment,
                FolderSchema.ELCPolicyIds,
                FolderSchema.ExtendedFolderFlags,
                StoreObjectSchema.EffectiveRights,
                FolderSchema.OutlookSearchFolderClsId
            };
            this.folder = Utilities.GetFolderForContent <Folder>(base.UserContext, owaStoreObjectId, array);
            this.favoritesFilterParameter = Utilities.GetFavoritesFilterViewParameter(base.UserContext, this.Folder);
            if (this.folder is SearchFolder && this.favoritesFilterParameter != null && !this.favoritesFilterParameter.IsCurrentVersion)
            {
                this.favoritesFilterParameter.UpgradeFilter(this.folder as SearchFolder, array);
            }
            this.sortOrder           = this.DefaultSortOrder;
            this.sortedColumn        = this.DefaultSortedColumn;
            this.isMultiLine         = this.DefaultMultiLineSetting;
            this.readingPanePosition = this.DefaultReadingPanePosition;
            FolderViewStates folderViewStates = base.UserContext.GetFolderViewStates(this.folder);

            if (base.UserContext.IsWebPartRequest)
            {
                string          queryStringParameter = Utilities.GetQueryStringParameter(base.Request, "view", false);
                WebPartListView webPartListView      = WebPartUtilities.LookUpWebPartView(this.folder.Id.ObjectId.ObjectType, this.folder.ClassName, queryStringParameter);
                if (webPartListView != null)
                {
                    if (webPartListView.ColumnId != null)
                    {
                        this.sortedColumn = (ColumnId)webPartListView.ColumnId.Value;
                    }
                    if (webPartListView.SortOrder != null)
                    {
                        this.sortOrder = (SortOrder)webPartListView.SortOrder.Value;
                    }
                    if (webPartListView.IsMultiLine != null)
                    {
                        this.isMultiLine = webPartListView.IsMultiLine.Value;
                    }
                }
            }
            else
            {
                this.viewWidth   = folderViewStates.ViewWidth;
                this.viewHeight  = folderViewStates.ViewHeight;
                this.sortOrder   = folderViewStates.GetSortOrder(this.DefaultSortOrder);
                this.isMultiLine = folderViewStates.GetMultiLine(this.DefaultMultiLineSetting);
                string sortColumn = folderViewStates.GetSortColumn(null);
                if (sortColumn != null)
                {
                    ColumnId columnId = ColumnIdParser.Parse(sortColumn);
                    if (columnId < ColumnId.Count && (!this.isMultiLine || ListViewColumns.GetColumn(columnId).SortBoundaries != null))
                    {
                        this.sortedColumn = columnId;
                    }
                }
            }
            if (ConversationUtilities.IsConversationSortColumn(this.sortedColumn) && !ConversationUtilities.ShouldAllowConversationView(base.UserContext, this.Folder))
            {
                this.sortedColumn = ColumnId.DeliveryTime;
            }
            this.readingPanePosition = folderViewStates.GetReadingPanePosition(this.DefaultReadingPanePosition);
            this.LoadELCData();
        }