Exemplo n.º 1
0
        protected override bool RenderIcon(TextWriter writer, int itemIndex)
        {
            string itemClass         = base.DataSource.GetItemProperty(itemIndex, StoreObjectSchema.ItemClass) as string;
            int    itemPropertyInt   = base.DataSource.GetItemPropertyInt(itemIndex, ItemSchema.IconIndex, -1);
            bool   itemPropertyBool  = base.DataSource.GetItemPropertyBool(itemIndex, MessageItemSchema.MessageInConflict, false);
            bool   itemPropertyBool2 = base.DataSource.GetItemPropertyBool(itemIndex, MessageItemSchema.IsRead, false);

            return(ListViewContentsRenderingUtilities.RenderMessageIcon(writer, base.UserContext, itemClass, itemPropertyBool2, itemPropertyBool, itemPropertyInt));
        }
Exemplo n.º 2
0
        // Token: 0x06001FF4 RID: 8180 RVA: 0x000B8960 File Offset: 0x000B6B60
        protected bool RenderMessageIcon(TextWriter writer)
        {
            string itemProperty  = this.dataSource.GetItemProperty <string>(StoreObjectSchema.ItemClass);
            int    itemProperty2 = this.dataSource.GetItemProperty <int>(ItemSchema.IconIndex, -1);
            bool   itemProperty3 = this.dataSource.GetItemProperty <bool>(MessageItemSchema.MessageInConflict, false);
            bool   itemProperty4 = this.dataSource.GetItemProperty <bool>(MessageItemSchema.IsRead, false);

            return(ListViewContentsRenderingUtilities.RenderMessageIcon(writer, this.userContext, itemProperty, itemProperty4, itemProperty3, itemProperty2));
        }
        // Token: 0x06001F53 RID: 8019 RVA: 0x000B4688 File Offset: 0x000B2888
        private bool RenderConversationIcon(TextWriter writer)
        {
            this.DataSource.GetItemProperty <int>(ConversationItemSchema.ConversationMessageCount, 0);
            int  itemProperty  = this.DataSource.GetItemProperty <int>(ConversationItemSchema.ConversationUnreadMessageCount, 0);
            bool itemProperty2 = this.DataSource.GetItemProperty <bool>(ConversationItemSchema.ConversationHasIrm, false);

            string[] array = null;
            if (base.SortedColumn.Id == ColumnId.ConversationIcon)
            {
                string itemProperty3 = this.DataSource.GetItemProperty <string>(ConversationItemSchema.ConversationMessageClasses, null);
                if (!string.IsNullOrEmpty(itemProperty3))
                {
                    array = new string[]
                    {
                        itemProperty3
                    };
                }
            }
            else
            {
                array = this.DataSource.GetItemProperty <string[]>(ConversationItemSchema.ConversationMessageClasses, null);
            }
            int itemProperty4 = this.DataSource.GetItemProperty <int>(ConversationItemSchema.ConversationReplyForwardState, -1);

            if (this.currentRowGlobalCount == 1)
            {
                string itemClass = "IPM.Note";
                if (array != null && array.Length >= 1)
                {
                    itemClass = array[0];
                }
                ListViewContentsRenderingUtilities.RenderMessageIcon(writer, base.UserContext, itemClass, itemProperty != 1, false, itemProperty4, itemProperty2);
                return(true);
            }
            ThemeFileId themeFileId = itemProperty2 ? ThemeFileId.IrmConversationIconRead : ThemeFileId.ConversationIconRead;
            bool        flag        = false;

            if (array != null)
            {
                int num = 0;
                while (num < array.Length && ItemClassType.IsMeetingType(array[num]))
                {
                    num++;
                }
                if (num >= array.Length)
                {
                    flag = true;
                }
            }
            bool flag2 = false;

            if (array != null)
            {
                int num2 = 0;
                while (num2 < array.Length && ItemClassType.IsSmsType(array[num2]))
                {
                    num2++;
                }
                if (num2 >= array.Length)
                {
                    flag2 = true;
                }
            }
            if (flag)
            {
                themeFileId = ThemeFileId.ConversationIconMeeting;
            }
            else if (flag2)
            {
                if (itemProperty4 == 261)
                {
                    themeFileId = ThemeFileId.ConversationIconSmsReply;
                }
                else if (itemProperty4 == 262)
                {
                    themeFileId = ThemeFileId.ConversationIconSmsForward;
                }
                else
                {
                    themeFileId = ThemeFileId.ConversationIconSmsReadAndUnread;
                }
            }
            else if (itemProperty4 == 261)
            {
                themeFileId = (itemProperty2 ? ThemeFileId.IrmConversationIconReply : ThemeFileId.ConversationIconReply);
            }
            else if (itemProperty4 == 262)
            {
                themeFileId = (itemProperty2 ? ThemeFileId.IrmConversationIconForward : ThemeFileId.ConversationIconForward);
            }
            else if (itemProperty > 0)
            {
                themeFileId = (itemProperty2 ? ThemeFileId.IrmConversationIconUnread : ThemeFileId.ConversationIconUnread);
            }
            return(ListViewContentsRenderingUtilities.RenderItemIcon(writer, base.UserContext, themeFileId));
        }