Ejemplo n.º 1
0
 // Token: 0x06002FAE RID: 12206 RVA: 0x00114FF8 File Offset: 0x001131F8
 private void RenderFolderTreeChangedNode(OwaStoreObjectId parentFolderId, OwaStoreObjectId newFolderId, bool isExpanded, bool updateFolderId, FolderTreeRenderType renderType)
 {
     this.Writer.Write("<div id=tn");
     if (base.UserContext.ArchiveAccessed && parentFolderId.Equals(base.UserContext.GetArchiveRootFolderId()))
     {
         this.Writer.Write(" archiveroot=\"1\"");
         MailboxSession mailboxSession = parentFolderId.GetSession(base.UserContext) as MailboxSession;
         if (mailboxSession != null && mailboxSession.MailboxOwner.MailboxInfo.IsRemote)
         {
             this.Writer.Write(" isremote=\"1\"");
         }
     }
     if (updateFolderId)
     {
         this.Writer.Write(" ufid=\"f");
         Utilities.HtmlEncode(parentFolderId.ToString(), this.Writer);
         this.Writer.Write("\"");
     }
     this.Writer.Write(">");
     if (isExpanded)
     {
         this.RenderSiblingNodes(parentFolderId, newFolderId, renderType);
     }
     else
     {
         if (newFolderId == null)
         {
             throw new ArgumentNullException("newFolderId");
         }
         FolderTreeNode folderTreeNode = FolderTreeNode.Load(base.UserContext, newFolderId, renderType);
         if (folderTreeNode != null)
         {
             FolderTreeNode folderTreeNode2 = folderTreeNode;
             folderTreeNode2.CustomAttributes += " _NF=1";
             folderTreeNode.RenderUndecoratedNode(this.Writer);
         }
     }
     this.Writer.Write("</div>");
 }
Ejemplo n.º 2
0
        // Token: 0x06001F8A RID: 8074 RVA: 0x000B57B8 File Offset: 0x000B39B8
        internal void RenderConversationParts(TextWriter writer, OwaStoreObjectId conversationId, Folder contextFolder, Folder dataFolder)
        {
            ExDateTime?lastDeliveryTime = ConversationUtilities.GetLastDeliveryTime(this.ConversationPartsDataSource.Conversation);

            writer.Write("<div id=\"");
            writer.Write("tblExp");
            writer.Write("\" ");
            writer.Write("expId");
            writer.Write("=\"");
            Utilities.HtmlEncode(conversationId.ToString(), writer);
            writer.Write("\" ");
            writer.Write("iGC");
            writer.Write("=");
            writer.Write(ConversationUtilities.GetGlobalCount(this.ConversationPartsDataSource.Conversation));
            writer.Write(">");
            FolderViewStates    folderViewStates    = base.UserContext.GetFolderViewStates(contextFolder);
            ReadingPanePosition readingPanePosition = folderViewStates.ReadingPanePosition;
            int num;

            if (readingPanePosition == ReadingPanePosition.Right)
            {
                num = folderViewStates.ViewWidth;
            }
            else
            {
                num = 800;
            }
            int num2 = (num - ListViewColumns.GetColumn(ColumnId.DeliveryTime).Width - ListViewColumns.GetColumn(ColumnId.MailIcon).Width - ListViewColumns.GetColumn(ColumnId.From).Width - ListViewColumns.GetColumn(ColumnId.Importance).Width - ListViewColumns.GetColumn(ColumnId.HasAttachment).Width - ListViewColumns.GetColumn(ColumnId.Categories).Width - ListViewColumns.GetColumn(ColumnId.FlagDueDate).Width - 18) / 4;

            num2 = Math.Max(num2, 0);
            List <StoreObjectId> localItemIds = ConversationUtilities.GetLocalItemIds(this.ConversationPartsDataSource.Conversation, dataFolder);

            ConversationUtilities.MarkLocalNodes(this.ConversationPartsDataSource.Conversation, localItemIds);
            while (this.DataSource.MoveNext())
            {
                this.RenderConversationPartRow(writer, contextFolder, dataFolder, lastDeliveryTime, num2);
            }
            writer.Write("</div>");
        }
Ejemplo n.º 3
0
        private void RenderAppointmentData(CalendarViewBase view, int i, ExDateTime itemStart, ExDateTime itemEnd)
        {
            ICalendarDataSource     dataSource      = view.DataSource;
            CalendarItemTypeWrapper wrappedItemType = dataSource.GetWrappedItemType(i);

            this.output.Write("new Item(\"");
            OwaStoreObjectId            itemId    = dataSource.GetItemId(i);
            string                      changeKey = dataSource.GetChangeKey(i);
            PublishedCalendarDataSource publishedCalendarDataSource = dataSource as PublishedCalendarDataSource;

            if (publishedCalendarDataSource != null && publishedCalendarDataSource.DetailLevel != DetailLevelEnumType.AvailabilityOnly)
            {
                StoreObjectId itemStoreObjectId = publishedCalendarDataSource.GetItemStoreObjectId(i);
                Utilities.JavascriptEncode(itemStoreObjectId.ToString(), this.output);
                this.output.Write("\",\"");
                if (this.IsOneOfRecurrence(wrappedItemType))
                {
                    StoreObjectId storeObjectId = StoreObjectId.FromProviderSpecificId(itemStoreObjectId.ProviderLevelItemId);
                    Utilities.JavascriptEncode(storeObjectId.ToString(), this.output);
                }
                else
                {
                    this.output.Write("0");
                }
            }
            else
            {
                if (itemId != null)
                {
                    Utilities.JavascriptEncode(itemId.ToString(), this.output);
                }
                this.output.Write("\",\"");
                if (itemId != null && this.IsOneOfRecurrence(wrappedItemType))
                {
                    OwaStoreObjectId providerLevelItemId = itemId.ProviderLevelItemId;
                    Utilities.JavascriptEncode(providerLevelItemId.ToString(), this.output);
                }
                else
                {
                    this.output.Write("0");
                }
            }
            this.output.Write("\",\"");
            if (changeKey != null)
            {
                Utilities.JavascriptEncode(changeKey, this.output);
            }
            this.output.Write("\",\"");
            this.output.Write(DateTimeUtilities.GetJavascriptDate(itemStart));
            this.output.Write("\",\"");
            this.output.Write(DateTimeUtilities.GetJavascriptDate(itemEnd));
            this.output.Write("\",\"");
            Utilities.JavascriptEncode(dataSource.GetSubject(i), this.output);
            this.output.Write("\",\"");
            Utilities.JavascriptEncode(dataSource.GetLocation(i), this.output);
            BusyTypeWrapper wrappedBusyType = dataSource.GetWrappedBusyType(i);

            this.output.Write("\",");
            this.output.Write((int)wrappedBusyType);
            this.output.Write(",\"");
            if (itemId != null)
            {
                Utilities.JavascriptEncode(ObjectClass.GetContainerMessageClass(itemId.StoreObjectType), this.output);
            }
            this.output.Write("\"");
            bool flag = dataSource.IsMeeting(i);

            this.output.Write(flag ? ",1" : ",0");
            this.output.Write(dataSource.IsCancelled(i) ? ",1" : ",0");
            bool flag2 = dataSource.IsOrganizer(i);

            this.output.Write(flag2 ? ",1" : ",0");
            this.output.Write(",\"");
            if (flag)
            {
                Utilities.JavascriptEncode(dataSource.GetOrganizerDisplayName(i), this.output);
            }
            this.output.Write("\"");
            bool flag3 = dataSource.IsPrivate(i);

            this.output.Write(flag3 ? ",1," : ",0,");
            this.output.Write((int)wrappedItemType);
            this.output.Write(dataSource.HasAttachment(i) ? ",1" : ",0");
            this.output.Write(",\"");
            this.output.Write(dataSource.GetCssClassName(i));
            this.output.Write("\"");
            this.output.Write(")");
        }
        // 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();
        }
Ejemplo n.º 5
0
        protected void RenderDataExpandos()
        {
            MailboxSession   mailboxSession       = (MailboxSession)this.conversationId.GetSession(base.UserContext);
            OwaStoreObjectId deletedItemsFolderId = base.UserContext.GetDeletedItemsFolderId(mailboxSession);

            RenderingUtilities.RenderExpando(base.SanitizingResponse, "sCnvId", this.conversationId.ToString());
            RenderingUtilities.RenderExpando(base.SanitizingResponse, "iMR", (int)base.UserContext.UserOptions.PreviewMarkAsRead);
            RenderingUtilities.RenderExpando(base.SanitizingResponse, "iMRDly", base.UserContext.UserOptions.MarkAsReadDelaytime);
            RenderingUtilities.RenderExpando(base.SanitizingResponse, "fHideDelItems", ConversationUtilities.HideDeletedItems ? 1 : 0);
            RenderingUtilities.RenderExpando(base.SanitizingResponse, "sDeletedItemsId", deletedItemsFolderId.ToString());
            RenderingUtilities.RenderExpando(base.SanitizingResponse, "iGC", ConversationUtilities.GetGlobalCount(this.conversation));
            RenderingUtilities.RenderExpando(base.SanitizingResponse, "iC", this.localItemIds.Count);
            RenderingUtilities.RenderExpando(base.SanitizingResponse, "iSort", (int)base.UserContext.UserOptions.ConversationSortOrder);
            RenderingUtilities.RenderExpando(base.SanitizingResponse, "iMaxItemPrts", Globals.MaxItemsInConversationReadingPane);
            RenderingUtilities.RenderExpando(base.SanitizingResponse, "fIsConversationIgnored", this.IsIgnoredConversation ? 1 : 0);
            string text = string.Format(CultureInfo.InvariantCulture, "<a id=\"aIbBlk\" href=\"#\">{0}</a>", new object[]
            {
                LocalizedStrings.GetHtmlEncoded(469213884)
            });
            string value = string.Format(CultureInfo.InvariantCulture, LocalizedStrings.GetNonEncoded(2063285740), new object[]
            {
                text
            });

            RenderingUtilities.RenderExpando(base.SanitizingResponse, "L_ImgFltBlock", value);
            RenderingUtilities.RenderExpando(base.SanitizingResponse, "L_ImgFltCompBlock", SanitizedHtmlString.FromStringId(-1196115124));
            text = string.Format(CultureInfo.InvariantCulture, "<a id=\"aIbNotSup\" href=\"#\">{0}</a>", new object[]
            {
                LocalizedStrings.GetHtmlEncoded(1099573627)
            });
            value = string.Format(CultureInfo.InvariantCulture, LocalizedStrings.GetNonEncoded(-1170788421), new object[]
            {
                text
            });
            RenderingUtilities.RenderExpando(base.SanitizingResponse, "L_TypeNotSup", value);
            RenderingUtilities.RenderExpando(base.SanitizingResponse, "L_OpnInOlk", SanitizedHtmlString.FromStringId(1305715400));
            text = string.Format(CultureInfo.InvariantCulture, "<a id=\"aIbReadRcp\" href=\"#\">{0}</a>", new object[]
            {
                LocalizedStrings.GetHtmlEncoded(1190033799)
            });
            RenderingUtilities.RenderExpando(base.SanitizingResponse, "L_ReadRcp", SanitizedHtmlString.Format("{0} {1}", new object[]
            {
                SanitizedHtmlString.FromStringId(115261126),
                text
            }));
        }
 // Token: 0x060025BE RID: 9662 RVA: 0x000DA8C6 File Offset: 0x000D8AC6
 public TargetFolderMRUEntry(OwaStoreObjectId folderId)
 {
     this.folderId = folderId.ToString();
 }