示例#1
0
        // Token: 0x06000222 RID: 546 RVA: 0x00013D44 File Offset: 0x00011F44
        public static void AddCompliance(UserContext userContext, Infobar infobar, Item item, bool isSenderMessage)
        {
            if (infobar == null)
            {
                throw new ArgumentNullException("infobar");
            }
            string compliance = InfobarMessageBuilderBase.GetCompliance(userContext, item, isSenderMessage);

            if (compliance != null)
            {
                infobar.AddMessageText(compliance, InfobarMessageType.Informational);
            }
        }
示例#2
0
        // Token: 0x06000221 RID: 545 RVA: 0x00013D14 File Offset: 0x00011F14
        public static void AddFlag(Infobar infobar, Item item, UserContext userContext)
        {
            if (infobar == null)
            {
                throw new ArgumentNullException("infobar");
            }
            string flag = InfobarMessageBuilderBase.GetFlag(item, userContext);

            if (flag != null)
            {
                infobar.AddMessageText(flag, InfobarMessageType.Informational);
            }
        }
示例#3
0
        // Token: 0x06000220 RID: 544 RVA: 0x00013CE4 File Offset: 0x00011EE4
        public static void AddSensitivity(Infobar infobar, Item item)
        {
            if (infobar == null)
            {
                throw new ArgumentNullException("infobar");
            }
            string sensitivity = InfobarMessageBuilderBase.GetSensitivity(item);

            if (sensitivity != null)
            {
                infobar.AddMessageText(sensitivity, InfobarMessageType.Informational);
            }
        }
示例#4
0
        // Token: 0x0600021F RID: 543 RVA: 0x00013CB4 File Offset: 0x00011EB4
        public static void AddImportance(Infobar infobar, Item item)
        {
            if (infobar == null)
            {
                throw new ArgumentNullException("infobar");
            }
            string importance = InfobarMessageBuilderBase.GetImportance(item);

            if (importance != null)
            {
                infobar.AddMessageText(importance, InfobarMessageType.Informational);
            }
        }
示例#5
0
 // Token: 0x06000223 RID: 547 RVA: 0x00013D74 File Offset: 0x00011F74
 public static void AddSendReceiptNotice(UserContext userContext, Infobar infobar, MessageItem messageItem)
 {
     if (userContext == null)
     {
         throw new ArgumentNullException("userContext");
     }
     if (infobar == null)
     {
         throw new ArgumentNullException("infobar");
     }
     if (messageItem == null)
     {
         throw new ArgumentNullException("item");
     }
     if (InfobarMessageBuilderBase.ShouldRenderReadReceiptNoticeInfobar(userContext, messageItem))
     {
         SanitizingStringBuilder <OwaHtml> sanitizingStringBuilder = new SanitizingStringBuilder <OwaHtml>();
         sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(115261126));
         sanitizingStringBuilder.Append(" <a href=\"#\" onclick=\"onClkSndRct()\">");
         sanitizingStringBuilder.Append(LocalizedStrings.GetNonEncoded(1190033799));
         sanitizingStringBuilder.Append("</a>");
         infobar.AddMessageHtml(sanitizingStringBuilder.ToSanitizedString <SanitizedHtmlString>(), InfobarMessageType.Informational);
     }
 }
示例#6
0
        public void Render(TextWriter output)
        {
            if (output == null)
            {
                throw new ArgumentNullException("output");
            }
            if (this.messages.Count == 0)
            {
                return;
            }
            Infobar.InfobarMessageComparer comparer = new Infobar.InfobarMessageComparer();
            this.messages.Sort(comparer);
            output.Write("<div id=\"divIB\">");
            int num;

            for (int i = 0; i < this.messages.Count; i = num)
            {
                num = i + 1;
                while (num < this.messages.Count && ((InfobarMessage)this.messages[num]).Type == ((InfobarMessage)this.messages[i]).Type)
                {
                    num++;
                }
                InfobarMessage infobarMessage = (InfobarMessage)this.messages[i];
                output.Write("<div id=");
                switch (infobarMessage.Type)
                {
                case InfobarMessageType.Expanding:
                case InfobarMessageType.Informational:
                case InfobarMessageType.Prompt:
                case InfobarMessageType.Warning:
                    output.Write("dvInf");
                    break;

                case InfobarMessageType.Error:
                    output.Write("dvErr");
                    break;

                case InfobarMessageType.JunkEmail:
                    output.Write("dvJnkMl");
                    break;

                case InfobarMessageType.Phishing:
                    output.Write("dvPhsh");
                    break;
                }
                output.Write(">");
                bool flag = false;
                if (infobarMessage.Type == InfobarMessageType.Error || infobarMessage.Type == InfobarMessageType.JunkEmail || infobarMessage.Type == InfobarMessageType.Phishing || infobarMessage.Type == InfobarMessageType.Prompt || infobarMessage.Type == InfobarMessageType.Warning)
                {
                    flag = true;
                    output.Write("<table cellpadding=\"0\" cellspacing=\"0\">");
                    output.Write("<tr><td valign=\"top\" rowspan=\"");
                    output.Write(num - i);
                    output.Write("\"><img src=\"");
                    switch (infobarMessage.Type)
                    {
                    case InfobarMessageType.Prompt:
                        this.userContext.RenderThemeFileUrl(output, ThemeFileId.Exclaim);
                        break;

                    case InfobarMessageType.Error:
                        this.userContext.RenderThemeFileUrl(output, ThemeFileId.Error);
                        break;

                    case InfobarMessageType.JunkEmail:
                    case InfobarMessageType.Phishing:
                        this.userContext.RenderThemeFileUrl(output, ThemeFileId.YellowShield);
                        break;

                    case InfobarMessageType.Warning:
                        this.userContext.RenderThemeFileUrl(output, ThemeFileId.Warning);
                        break;
                    }
                    output.Write("\" alt=\"\"></td>");
                    output.Write("<td class=\"w100\">");
                    if (infobarMessage.Type == InfobarMessageType.Prompt)
                    {
                        Infobar.RenderPromptMessage(output, infobarMessage);
                    }
                    else
                    {
                        Infobar.RenderInfoMessage(output, infobarMessage);
                    }
                    output.Write("</td></tr>");
                    i++;
                }
                if (flag && i < num)
                {
                    output.Write("<tr><td class=\"w100\">");
                }
                for (int j = i; j < num; j++)
                {
                    infobarMessage = (InfobarMessage)this.messages[j];
                    if (infobarMessage.Type == InfobarMessageType.Expanding)
                    {
                        Infobar.RenderExpandingMessage(output, infobarMessage, j > 0);
                    }
                    else if (infobarMessage.Type == InfobarMessageType.Prompt)
                    {
                        Infobar.RenderPromptMessage(output, infobarMessage);
                    }
                    else
                    {
                        Infobar.RenderInfoMessage(output, infobarMessage);
                    }
                }
                if (flag && i < num)
                {
                    output.Write("</td></tr>");
                }
                if (flag)
                {
                    output.Write("</table>");
                }
                output.Write("</div>");
            }
            output.Write("</div>");
        }