// Token: 0x06001F28 RID: 7976 RVA: 0x000B3104 File Offset: 0x000B1304
        public static void RenderViewCategorySwatches(TextWriter writer, UserContext userContext, Item item, OwaStoreObjectId folderId)
        {
            if (writer == null)
            {
                throw new ArgumentNullException("writer");
            }
            if (userContext == null)
            {
                throw new ArgumentNullException("userContext");
            }
            if (item == null)
            {
                throw new ArgumentNullException("item");
            }
            string[]   property  = ItemUtility.GetProperty <string[]>(item, ItemSchema.Categories, null);
            FlagStatus property2 = ItemUtility.GetProperty <FlagStatus>(item, ItemSchema.FlagStatus, FlagStatus.NotFlagged);
            int        property3 = ItemUtility.GetProperty <int>(item, ItemSchema.ItemColor, -1);
            bool       property4 = ItemUtility.GetProperty <bool>(item, ItemSchema.IsToDoItem, false);

            CategorySwatch.RenderViewCategorySwatches(writer, userContext, property, property4, property2, property3, folderId);
        }
Exemplo n.º 2
0
        private void RenderCategories(TextWriter writer, bool conversationMode)
        {
            string[] itemProperty = this.dataSource.GetItemProperty <string[]>(conversationMode ? ConversationItemSchema.ConversationCategories : ItemSchema.Categories, null);
            writer.Write("<div id=\"");
            writer.Write("divCatGroup");
            writer.Write("\"");
            if (this.userContext.CanActAsOwner && itemProperty != null && 0 < itemProperty.Length)
            {
                writer.Write(" title=\"");
                for (int i = 0; i < itemProperty.Length; i++)
                {
                    if (i != 0)
                    {
                        writer.Write("; ");
                    }
                    Utilities.HtmlEncode(itemProperty[i], writer);
                }
                writer.Write("\"");
            }
            writer.Write(">");
            int        itemColorInt = -1;
            bool       isToDoItem   = false;
            FlagStatus itemProperty2;

            if (conversationMode)
            {
                itemProperty2 = (FlagStatus)this.dataSource.GetItemProperty <int>(ConversationItemSchema.ConversationFlagStatus, 0);
            }
            else
            {
                itemProperty2 = this.dataSource.GetItemProperty <FlagStatus>(ItemSchema.FlagStatus, FlagStatus.NotFlagged);
                itemColorInt  = this.dataSource.GetItemProperty <int>(ItemSchema.ItemColor, -1);
                isToDoItem    = this.dataSource.GetItemProperty <bool>(ItemSchema.IsToDoItem, false);
            }
            OwaStoreObjectId folderId = OwaStoreObjectId.CreateFromString(this.dataSource.ContainerId);

            CategorySwatch.RenderViewCategorySwatches(writer, this.userContext, itemProperty, isToDoItem, itemProperty2, itemColorInt, folderId);
            writer.Write("</div>");
        }
 // Token: 0x06001F29 RID: 7977 RVA: 0x000B317B File Offset: 0x000B137B
 public static void RenderViewCategorySwatches(TextWriter writer, UserContext userContext, string[] categories, bool isToDoItem, FlagStatus flagStatus, int itemColorInt, OwaStoreObjectId folderId)
 {
     CategorySwatch.RenderViewCategorySwatches(writer, userContext, categories, isToDoItem, flagStatus, itemColorInt, folderId, true);
 }