// Token: 0x060006B0 RID: 1712 RVA: 0x00034850 File Offset: 0x00032A50
        internal static void RenderSpecialFolderIcon(TextWriter output, UserContext userContext, string folderClass, StoreObjectId folderId)
        {
            if (output == null)
            {
                throw new ArgumentNullException("output");
            }
            if (userContext == null)
            {
                throw new ArgumentNullException("userContext");
            }
            if (folderId == null)
            {
                throw new ArgumentNullException("folderId");
            }
            ThemeFileId themeFileId = ThemeFileId.None;

            switch (Utilities.GetDefaultFolderType(userContext.MailboxSession, folderId))
            {
            case DefaultFolderType.DeletedItems:
                themeFileId = ThemeFileId.BasicDeleted;
                break;

            case DefaultFolderType.Drafts:
                themeFileId = ThemeFileId.Drafts;
                break;

            case DefaultFolderType.Inbox:
                themeFileId = ThemeFileId.Inbox;
                break;

            case DefaultFolderType.JunkEmail:
                themeFileId = ThemeFileId.JunkEMail;
                break;

            case DefaultFolderType.SentItems:
                themeFileId = ThemeFileId.SentItems;
                break;
            }
            if (themeFileId == ThemeFileId.None)
            {
                SmallIconManager.RenderFolderIconUrl(output, userContext, folderClass);
                return;
            }
            userContext.RenderThemeFileUrl(output, themeFileId);
        }
Example #2
0
        protected void RenderTargetFolderList(TextWriter writer)
        {
            if (writer == null)
            {
                throw new ArgumentNullException("writer");
            }
            writer.Write("<td class=\"ddt\" nowrap>");
            writer.Write(LocalizedStrings.GetHtmlEncoded(-1166023766));
            writer.Write("</td>");
            writer.Write("<td class=\"dd\" nowrap>");
            writer.Write("<table cellspacing=0 cellpadding=0>");
            bool flag = false;

            if (this.Module == NavigationModule.Mail && this.mruFolderList != null)
            {
                for (int i = 0; i < this.mruFolderList.Count; i++)
                {
                    writer.Write("<tr><td class=\"chkb\">");
                    writer.Write("<input type=radio name=\"tfId\" onClick=\"return onClkRdo()\" value=\"");
                    Utilities.HtmlEncode(this.mruFolderList[i].Id.ToBase64String(), writer);
                    writer.Write("\"");
                    if (this.targetFolderId != null && this.targetFolderId.Equals(this.mruFolderList[i].Id))
                    {
                        writer.Write(" checked=true");
                        flag = true;
                    }
                    writer.Write(" id=\"rdomru");
                    writer.Write(i + 1);
                    writer.Write("\">");
                    writer.Write("</td><td class=\"mru\" nowrap><label for=\"rdomru");
                    writer.Write(i + 1);
                    writer.Write("\"><a href=\"#\" onClick=\"return onClkMru(");
                    writer.Write(i + 1);
                    writer.Write(")\"><img src=\"");
                    SmallIconManager.RenderFolderIconUrl(writer, base.OwaContext.UserContext, null);
                    writer.Write("\" alt=\"\">");
                    Utilities.CropAndRenderText(writer, this.mruFolderList[i].DisplayName, 24);
                    writer.Write("</a></label></td><td></td></tr>");
                }
            }
            writer.Write("<tr><td>");
            string        dropdownName  = "tfId";
            StoreObjectId storeObjectId = flag ? null : this.targetFolderId;

            switch (this.Module)
            {
            case NavigationModule.Mail:
                if (this.mruFolderList != null && this.mruFolderList.Count != 0)
                {
                    writer.Write("<input type=radio name=\"tfId\" id=\"rdofldlst\" onClick=\"return onClkRdo()\" ");
                    if (this.targetFolderId != null && !flag)
                    {
                        writer.Write(" checked");
                    }
                    writer.Write("></td><td>");
                    dropdownName = null;
                }
                if (storeObjectId == null)
                {
                    storeObjectId = base.UserContext.InboxFolderId;
                }
                this.folderDropDown.RenderMailMove(this.allFolderList, storeObjectId, dropdownName, writer);
                break;

            case NavigationModule.Calendar:
                if (storeObjectId == null)
                {
                    storeObjectId = base.UserContext.CalendarFolderId;
                }
                break;

            case NavigationModule.Contacts:
                if (storeObjectId == null)
                {
                    storeObjectId = base.UserContext.ContactsFolderId;
                }
                this.folderDropDown.RenderContactMove(this.contactFolderList, storeObjectId, dropdownName, writer);
                break;
            }
            writer.Write("</td><td class=\"btn\" align=\"left\">");
            bool flag2 = this.mruFolderList == null || this.mruFolderList.Count == 0 || this.targetFolderId != null;

            writer.Write("<a href=\"#\" onClick=\"return onClkMv();\" onKeyPress=\"return onKPMv(event);\" id=\"btnmv\"");
            if (!flag2)
            {
                writer.Write(" class=\"fmbtn fmbtnDis\"");
            }
            else
            {
                writer.Write(" class=\"fmbtn fmbtnEnb\"");
            }
            writer.Write(">");
            writer.Write(LocalizedStrings.GetHtmlEncoded(1414245993));
            writer.Write("</a></td></tr></table></td>");
        }