// Token: 0x06001F2E RID: 7982 RVA: 0x000B3280 File Offset: 0x000B1480 public static void RenderSwatch(TextWriter writer, ItemColor itemColor) { string str = "catFlg"; int num = (int)itemColor; CategorySwatch.RenderSwatch(writer, str + num.ToString(CultureInfo.InvariantCulture)); }
// Token: 0x06001F25 RID: 7973 RVA: 0x000B2FF4 File Offset: 0x000B11F4 private static string GetCategoryHtml(Category category) { string text = category.Name; bool flag = false; StringBuilder stringBuilder = new StringBuilder(); StringWriter stringWriter = new StringWriter(stringBuilder); if (35 < text.Length) { text = text.Substring(0, 35) + "..."; flag = true; } stringWriter.Write("<span class=\"listItm\""); if (flag) { stringWriter.Write(" title=\""); Utilities.HtmlEncode(category.Name, stringWriter); stringWriter.Write("\" "); } stringWriter.Write(">"); CategorySwatch.RenderSwatch(stringWriter, category); stringWriter.Write(" "); Utilities.HtmlEncode(text, stringWriter); stringWriter.Write("</span>"); stringWriter.Close(); return(stringBuilder.ToString()); }
// Token: 0x06001F2A RID: 7978 RVA: 0x000B3190 File Offset: 0x000B1390 public static void RenderViewCategorySwatches(TextWriter writer, UserContext userContext, string[] categories, bool isToDoItem, FlagStatus flagStatus, int itemColorInt, OwaStoreObjectId folderId, bool renderEmpty) { if (writer == null) { throw new ArgumentNullException("writer"); } if (userContext == null) { throw new ArgumentNullException("userContext"); } int num = 3; int num2 = 0; if (categories != null) { MasterCategoryList masterCategoryList = userContext.GetMasterCategoryList(folderId); if (masterCategoryList != null) { int num3 = 0; while (num3 < categories.Length && num2 < num) { Category category = masterCategoryList[categories[num3]]; if (category != null && category.Color != -1) { CategorySwatch.RenderSwatch(writer, category); num2++; } num3++; } } } if (num2 == 0 && !isToDoItem && flagStatus == FlagStatus.Flagged && itemColorInt != -1) { CategorySwatch.RenderSwatch(writer, (ItemColor)itemColorInt); num2++; } if (renderEmpty && num2 == 0) { CategorySwatch.RenderSwatch(writer, null); } }
internal static void RenderCategory(TextWriter writer, Category category) { string text = category.Name; string text2 = null; if (50 < text.Length) { text = text.Substring(0, 50) + "..."; text2 = category.Name; } writer.Write("<div nowrap"); if (text2 != null) { writer.Write(" title=\""); Utilities.HtmlEncode(text2, writer); writer.Write("\""); } writer.Write(">"); CategorySwatch.RenderSwatch(writer, category); writer.Write(" "); Utilities.HtmlEncode(text, writer, true); writer.Write("</div>"); }
private void RenderCategoryMenuItemHtml(TextWriter output) { string text = this.currentCategory.Name; bool flag = false; if (35 < text.Length) { text = text.Substring(0, 35) + "..."; flag = true; } if (flag) { output.Write("<span title=\""); Utilities.HtmlEncode(this.currentCategory.Name, output); output.Write("\">"); } CategorySwatch.RenderSwatch(output, this.currentCategory); output.Write(" "); Utilities.HtmlEncode(text, output); if (flag) { output.Write("</span>"); } }
// Token: 0x06001F31 RID: 7985 RVA: 0x000B32DC File Offset: 0x000B14DC public static void RenderCategories(OwaContext owaContext, TextWriter writer, IStorePropertyBag storePropertyBag, StoreSession storeSession) { if (owaContext == null) { throw new ArgumentNullException("owaContext"); } if (writer == null) { throw new ArgumentNullException("writer"); } if (storePropertyBag == null) { throw new ArgumentNullException("storePropertyBag"); } string[] property = ItemUtility.GetProperty <string[]>(storePropertyBag, ItemSchema.Categories, null); string value = owaContext.UserContext.IsRtl ? "rtl" : "ltr"; int num = 0; if (property != null && 0 < property.Length) { MasterCategoryList masterCategoryList = null; try { if (storeSession != null && owaContext.UserContext.IsOtherMailbox(storeSession)) { masterCategoryList = owaContext.UserContext.GetMasterCategoryList(storeSession as MailboxSession); } else { masterCategoryList = owaContext.UserContext.GetMasterCategoryList(); } } catch (QuotaExceededException ex) { ExTraceGlobals.CoreTracer.TraceDebug <string>(0L, "CategorySwatch.RenderCategories: Failed. Exception: {0}", ex.Message); return; } if (masterCategoryList != null) { for (int i = 0; i < property.Length; i++) { writer.Write("<span class=\"spanCatContainer\" dir=\""); writer.Write(value); writer.Write("\">"); CategorySwatch.RenderSwatch(writer, masterCategoryList[property[i]]); writer.Write(" "); Utilities.SanitizeHtmlEncode(property[i], writer); if (i < property.Length - 1) { writer.Write("; "); } writer.Write("</span><wbr>"); num++; } } } if (num == 0) { writer.Write("<span class=\"spanCatContainer catAfter\" dir=\""); writer.Write(value); writer.Write("\">"); int legacyColoredFlag = ItemUtility.GetLegacyColoredFlag(storePropertyBag); if (0 < legacyColoredFlag && legacyColoredFlag < CategorySwatch.FlagCategory.Length) { CategorySwatch.RenderSwatch(writer, (ItemColor)legacyColoredFlag); writer.Write("<span id=\"vaM\">"); writer.Write(SanitizedHtmlString.FromStringId(CategorySwatch.FlagCategory[legacyColoredFlag])); writer.Write("</span>"); } writer.Write("</span>"); } }
// Token: 0x06001F2D RID: 7981 RVA: 0x000B326F File Offset: 0x000B146F public static void RenderSwatch(TextWriter writer, Category category) { CategorySwatch.RenderSwatch(writer, CategorySwatch.GetCategoryClassName(category)); }