int IComparer <object[]> .Compare(object[] x, object[] y)
            {
                int num = 0;

                if (this.sortedColumn == ColumnId.MemberIcon)
                {
                    num = string.Compare((string)x[this.dataSource.PropertyIndex(StoreObjectSchema.ItemClass)], (string)y[this.dataSource.PropertyIndex(StoreObjectSchema.ItemClass)]);
                }
                else
                {
                    string strA;
                    string strA2;
                    ContactUtilities.GetParticipantEmailAddress((Participant)x[this.dataSource.PropertyIndex(ContactSchema.Email1)], out strA, out strA2);
                    string strB;
                    string strB2;
                    ContactUtilities.GetParticipantEmailAddress((Participant)y[this.dataSource.PropertyIndex(ContactSchema.Email1)], out strB, out strB2);
                    switch (this.sortedColumn)
                    {
                    case ColumnId.MemberDisplayName:
                        num = string.Compare(strA2, strB2, false, this.cultureInfo);
                        break;

                    case ColumnId.MemberEmail:
                        num = string.Compare(strA, strB, false, this.cultureInfo);
                        break;
                    }
                }
                if (this.order == SortOrder.Ascending)
                {
                    return(num);
                }
                return(-num);
            }
Esempio n. 2
0
 // Token: 0x06001FFB RID: 8187 RVA: 0x000B939D File Offset: 0x000B759D
 private static void GetEmailAddressData(Participant participant, out string emailAddress, out string emailAddressForDisplay, out string displayName, out string routingType)
 {
     emailAddressForDisplay = null;
     displayName            = null;
     ContactUtilities.GetParticipantEmailAddress(participant, out emailAddressForDisplay, out displayName);
     emailAddress = participant.EmailAddress;
     routingType  = participant.RoutingType;
 }
Esempio n. 3
0
        private void RenderEmailAddresses(TextWriter writer)
        {
            foreach (EmailAddressIndex emailAddressIndex in ContactUtilities.EmailAddressIndexesToRead)
            {
                string value = null;
                switch (emailAddressIndex)
                {
                case EmailAddressIndex.Email1:
                    value = LocalizedStrings.GetHtmlEncoded(1111077458);
                    break;

                case EmailAddressIndex.Email2:
                    value = LocalizedStrings.GetHtmlEncoded(1405549740);
                    break;

                case EmailAddressIndex.Email3:
                    value = LocalizedStrings.GetHtmlEncoded(-160534201);
                    break;
                }
                Participant participant = this.contact.EmailAddresses[emailAddressIndex];
                if (!(participant == null))
                {
                    string text  = null;
                    string text2 = null;
                    ContactUtilities.GetParticipantEmailAddress(participant, out text, out text2, false);
                    if (!string.IsNullOrEmpty(text))
                    {
                        writer.Write("<tr><td class=\"lbl lp\">");
                        writer.Write(value);
                        writer.Write("</td><td class=\"txvl\">");
                        base.RenderEmail(writer, text2, text, participant.RoutingType, base.IsEmbeddedItem ? null : base.Item.Id.ObjectId, emailAddressIndex);
                        writer.Write("</td></tr>");
                        this.isEmailRendered = true;
                    }
                }
            }
            if (this.isEmailRendered)
            {
                writer.Write("<tr><td class=\"spcHd\" colspan=2></td></tr>");
            }
        }
        // Token: 0x0600201D RID: 8221 RVA: 0x000BA278 File Offset: 0x000B8478
        protected override void RenderTableCellAttributes(TextWriter writer, ColumnId columnId)
        {
            string text = null;

            if (columnId == ColumnId.MemberDisplayName)
            {
                text = this.DataSource.GetItemProperty <string>(StoreObjectSchema.DisplayName, null);
            }
            else if (columnId == ColumnId.MemberEmail)
            {
                Participant itemProperty = this.DataSource.GetItemProperty <Participant>(ContactSchema.Email1, null);
                if (itemProperty != null)
                {
                    string text2;
                    ContactUtilities.GetParticipantEmailAddress(itemProperty, out text, out text2);
                }
            }
            if (text != null)
            {
                DistributionListContents.RenderAttributes(writer, "title", text);
            }
        }
Esempio n. 5
0
        // Token: 0x06001FF9 RID: 8185 RVA: 0x000B8AC0 File Offset: 0x000B6CC0
        protected virtual bool InternalRenderColumn(TextWriter writer, ColumnId columnId)
        {
            Column column = ListViewColumns.GetColumn(columnId);

            if (columnId <= ColumnId.ADIcon)
            {
                switch (columnId)
                {
                case ColumnId.MailIcon:
                case ColumnId.ContactIcon:
                    break;

                case ColumnId.From:
                case ColumnId.To:
                case ColumnId.Subject:
                case ColumnId.Department:
                    goto IL_66B;

                case ColumnId.HasAttachment:
                {
                    string itemClass = this.dataSource.GetItemClass();
                    this.dataSource.GetItemId();
                    bool itemProperty = this.dataSource.GetItemProperty <bool>(ItemSchema.HasAttachment, false);
                    this.dataSource.GetItemProperty <string>(MessageItemSchema.RequireProtectedPlayOnPhone, string.Empty);
                    return(ListViewContentsRenderingUtilities.RenderHasAttachments(writer, this.userContext, itemProperty, itemClass));
                }

                case ColumnId.Importance:
                    goto IL_17B;

                case ColumnId.DeliveryTime:
                {
                    ExDateTime itemProperty2 = this.dataSource.GetItemProperty <ExDateTime>(ItemSchema.ReceivedTime, ExDateTime.MinValue);
                    return(this.RenderSmartDate(writer, itemProperty2));
                }

                case ColumnId.SentTime:
                {
                    ExDateTime itemProperty3 = this.dataSource.GetItemProperty <ExDateTime>(ItemSchema.SentTime, ExDateTime.MinValue);
                    return(this.RenderSmartDate(writer, itemProperty3));
                }

                case ColumnId.Size:
                {
                    int itemProperty4 = this.dataSource.GetItemProperty <int>(ItemSchema.Size, 0);
                    Utilities.RenderSizeWithUnits(writer, (long)itemProperty4, true);
                    return(true);
                }

                default:
                    switch (columnId)
                    {
                    case ColumnId.EmailAddresses:
                        if (ObjectClass.IsDistributionList(this.dataSource.GetItemClass()))
                        {
                            this.RenderSingleEmailAddress(writer, this.dataSource.GetItemProperty <string>(ContactBaseSchema.FileAs, string.Empty), string.Empty, string.Empty, null, EmailAddressIndex.None, RecipientAddress.RecipientAddressFlags.DistributionList);
                            return(true);
                        }
                        return(this.RenderEmailAddresses(writer));

                    case ColumnId.Email1:
                    case ColumnId.Email2:
                    case ColumnId.Email3:
                        goto IL_408;

                    case ColumnId.GivenName:
                    case ColumnId.Surname:
                    case ColumnId.SharepointDocumentDisplayName:
                    case ColumnId.SharepointDocumentLastModified:
                    case ColumnId.SharepointDocumentModifiedBy:
                    case ColumnId.SharepointDocumentCheckedOutTo:
                    case ColumnId.UncDocumentDisplayName:
                    case ColumnId.UncDocumentLastModified:
                        goto IL_66B;

                    case ColumnId.Categories:
                    case ColumnId.ContactCategories:
                        goto IL_34E;

                    case ColumnId.SharepointDocumentIcon:
                        return(this.RenderSharepointDocumentIcon(writer));

                    case ColumnId.SharepointDocumentFileSize:
                    {
                        long itemProperty5 = this.dataSource.GetItemProperty <long>(SharepointDocumentSchema.FileSize, 0L);
                        Utilities.RenderSizeWithUnits(writer, itemProperty5, true);
                        return(true);
                    }

                    case ColumnId.UncDocumentIcon:
                        return(this.RenderUncDocumentIcon(writer));

                    case ColumnId.UncDocumentLibraryIcon:
                        return(ListViewContentsRenderingUtilities.RenderItemIcon(writer, this.userContext, "ipf.documentlibrary.sharepoint"));

                    case ColumnId.UncDocumentFileSize:
                    {
                        long itemProperty6 = this.dataSource.GetItemProperty <long>(UncDocumentSchema.FileSize, 0L);
                        Utilities.RenderSizeWithUnits(writer, itemProperty6, true);
                        return(true);
                    }

                    case ColumnId.SharepointDocumentLibraryIcon:
                        return(ListViewContentsRenderingUtilities.RenderItemIcon(writer, this.userContext, "ipf.documentlibrary.sharepoint"));

                    default:
                        if (columnId != ColumnId.ADIcon)
                        {
                            goto IL_66B;
                        }
                        break;
                    }
                    break;
                }
            }
            else
            {
                if (columnId == ColumnId.EmailAddressAD)
                {
                    return(this.RenderADEmailAddress(this.dataSource, writer));
                }
                switch (columnId)
                {
                case ColumnId.YomiFullName:
                {
                    StringBuilder stringBuilder = new StringBuilder();
                    string        itemProperty7 = this.dataSource.GetItemProperty <string>(ContactSchema.YomiLastName, string.Empty);
                    if (!string.IsNullOrEmpty(itemProperty7))
                    {
                        Utilities.HtmlEncode(itemProperty7, stringBuilder);
                    }
                    string itemProperty8 = this.dataSource.GetItemProperty <string>(ContactSchema.YomiFirstName, string.Empty);
                    if (!string.IsNullOrEmpty(itemProperty8))
                    {
                        if (stringBuilder.Length > 0)
                        {
                            stringBuilder.Append(" ");
                        }
                        Utilities.HtmlEncode(itemProperty8, stringBuilder);
                    }
                    if (stringBuilder.Length == 0)
                    {
                        return(false);
                    }
                    writer.Write(stringBuilder.ToString());
                    return(true);
                }

                case ColumnId.YomiLastName:
                case ColumnId.YomiDisplayNameAD:
                case ColumnId.YomiDepartmentAD:
                case ColumnId.ResourceCapacityAD:
                case ColumnId.FlagStartDate:
                case ColumnId.ContactFlagStartDate:
                case ColumnId.MemberDisplayName:
                case ColumnId.ConversationLastDeliveryTime:
                case ColumnId.ConversationIcon:
                case ColumnId.ConversationSubject:
                case ColumnId.ConversationUnreadCount:
                case ColumnId.ConversationHasAttachment:
                case ColumnId.ConversationSenderList:
                    goto IL_66B;

                case ColumnId.FlagDueDate:
                case ColumnId.ContactFlagDueDate:
                case ColumnId.TaskFlag:
                {
                    FlagStatus  itemProperty9  = this.dataSource.GetItemProperty <FlagStatus>(ItemSchema.FlagStatus, FlagStatus.NotFlagged);
                    int         itemProperty10 = this.dataSource.GetItemProperty <int>(ItemSchema.ItemColor, int.MinValue);
                    ThemeFileId themeFileId    = ThemeFileId.FlagEmpty;
                    if (itemProperty9 == FlagStatus.NotFlagged)
                    {
                        string itemClass2 = this.dataSource.GetItemClass();
                        if (ObjectClass.IsTask(itemClass2))
                        {
                            bool itemProperty11 = this.dataSource.GetItemProperty <bool>(ItemSchema.IsComplete, false);
                            if (itemProperty11)
                            {
                                themeFileId = (this.IsAssignedTask ? ThemeFileId.FlagCompleteDisabled : ThemeFileId.FlagComplete);
                            }
                            else
                            {
                                themeFileId = (this.IsAssignedTask ? ThemeFileId.FlagDisabled : ThemeFileId.Flag);
                            }
                        }
                    }
                    else if (itemProperty10 == -2147483648 && itemProperty9 == FlagStatus.Flagged)
                    {
                        themeFileId = ThemeFileId.FlagSender;
                    }
                    else if (itemProperty9 == FlagStatus.Flagged)
                    {
                        themeFileId = ThemeFileId.Flag;
                    }
                    else
                    {
                        themeFileId = ThemeFileId.FlagComplete;
                    }
                    this.userContext.RenderThemeImage(writer, themeFileId, null, new object[]
                        {
                            "id=imgFlg"
                        });
                    return(true);
                }

                case ColumnId.TaskIcon:
                case ColumnId.MemberIcon:
                    break;

                case ColumnId.MarkCompleteCheckbox:
                {
                    bool itemProperty12 = this.dataSource.GetItemProperty <bool>(ItemSchema.IsComplete, false);
                    writer.Write("<input id=chkMkCmp type=checkbox class=mkCmp");
                    if (this.IsAssignedTask)
                    {
                        writer.Write(" disabled");
                    }
                    writer.Write(itemProperty12 ? " checked>" : ">");
                    return(true);
                }

                case ColumnId.DueDate:
                {
                    ExDateTime itemProperty13 = this.dataSource.GetItemProperty <ExDateTime>(TaskSchema.DueDate, ExDateTime.MinValue);
                    if (itemProperty13 != ExDateTime.MinValue)
                    {
                        writer.Write(itemProperty13.ToString(this.userContext.UserOptions.DateFormat));
                        return(true);
                    }
                    return(false);
                }

                case ColumnId.MemberEmail:
                    goto IL_408;

                case ColumnId.DeletedOnTime:
                {
                    ExDateTime itemProperty14 = this.dataSource.GetItemProperty <ExDateTime>(StoreObjectSchema.DeletedOnTime, ExDateTime.MinValue);
                    return(this.RenderWeekdayDateTime(writer, itemProperty14));
                }

                case ColumnId.DumpsterReceivedTime:
                {
                    ExDateTime itemProperty15 = this.dataSource.GetItemProperty <ExDateTime>(ItemSchema.ReceivedTime, ExDateTime.MinValue);
                    return(this.RenderWeekdayDateTime(writer, itemProperty15));
                }

                case ColumnId.ObjectDisplayName:
                {
                    string itemProperty16 = this.dataSource.GetItemProperty <string>(FolderSchema.DisplayName, string.Empty);
                    if (string.IsNullOrEmpty(itemProperty16))
                    {
                        itemProperty16 = this.dataSource.GetItemProperty <string>(ItemSchema.Subject, string.Empty);
                    }
                    if (itemProperty16.Length == 0)
                    {
                        return(false);
                    }
                    Utilities.HtmlEncode(itemProperty16, writer);
                    return(true);
                }

                case ColumnId.ObjectIcon:
                {
                    VersionedId itemProperty17 = this.dataSource.GetItemProperty <VersionedId>(FolderSchema.Id);
                    if (itemProperty17 != null)
                    {
                        return(ListViewContentsRenderingUtilities.RenderItemIcon(writer, this.userContext, ThemeFileId.Folder));
                    }
                    return(this.RenderIcon(writer));
                }

                case ColumnId.ConversationImportance:
                    goto IL_17B;

                case ColumnId.ConversationCategories:
                    goto IL_34E;

                default:
                {
                    if (columnId != ColumnId.IMAddress)
                    {
                        goto IL_66B;
                    }
                    string itemProperty18 = this.dataSource.GetItemProperty <string>(ContactSchema.IMAddress, string.Empty);
                    this.RenderSingleEmailAddress(writer, itemProperty18, itemProperty18, itemProperty18, null, EmailAddressIndex.None, RecipientAddress.RecipientAddressFlags.None);
                    return(true);
                }
                }
            }
            return(this.RenderIcon(writer));

IL_17B:
            Importance importance = Importance.Normal;
            object itemProperty19 = this.dataSource.GetItemProperty <object>(ListViewColumns.GetColumn(columnId)[0]);

            if (itemProperty19 is Importance || itemProperty19 is int)
            {
                importance = (Importance)itemProperty19;
            }
            return(ListViewContentsRenderingUtilities.RenderImportance(writer, this.UserContext, importance));

IL_34E:
            this.RenderCategories(writer, columnId == ColumnId.ConversationCategories);
            return(true);

IL_408:
            PropertyDefinition propertyDefinition = ContactSchema.Email1;

            switch (columnId)
            {
            case ColumnId.Email1:
                break;

            case ColumnId.Email2:
                propertyDefinition = ContactSchema.Email2;
                goto IL_447;

            case ColumnId.Email3:
                propertyDefinition = ContactSchema.Email3;
                goto IL_447;

            default:
                if (columnId != ColumnId.MemberEmail)
                {
                    goto IL_447;
                }
                break;
            }
            propertyDefinition = ContactSchema.Email1;
IL_447:
            Participant itemProperty20 = this.dataSource.GetItemProperty <Participant>(propertyDefinition, null);

            if (itemProperty20 == null)
            {
                return(false);
            }
            string text  = null;
            string text2 = null;

            ContactUtilities.GetParticipantEmailAddress(itemProperty20, out text2, out text);
            if (string.IsNullOrEmpty(text2))
            {
                return(false);
            }
            Utilities.HtmlEncode(text2, writer);
            return(true);

IL_66B:
            object itemProperty21 = this.dataSource.GetItemProperty <object>(column[0]);

            if (itemProperty21 is ExDateTime)
            {
                writer.Write(((ExDateTime)itemProperty21).ToString());
            }
            else if (itemProperty21 is DateTime)
            {
                ExDateTime exDateTime = new ExDateTime(this.userContext.TimeZone, (DateTime)itemProperty21);
                writer.Write(exDateTime.ToString());
            }
            else if (itemProperty21 is string)
            {
                string text3 = (string)itemProperty21;
                if (text3.Length == 0)
                {
                    return(false);
                }
                Utilities.HtmlEncode(text3, writer);
            }
            else if (itemProperty21 is int)
            {
                Utilities.HtmlEncode(((int)itemProperty21).ToString(CultureInfo.CurrentCulture.NumberFormat), writer);
            }
            else if (itemProperty21 is long)
            {
                Utilities.HtmlEncode(((long)itemProperty21).ToString(CultureInfo.CurrentCulture.NumberFormat), writer);
            }
            else if (itemProperty21 is Unlimited <int> )
            {
                if (((Unlimited <int>)itemProperty21).IsUnlimited)
                {
                    return(false);
                }
                Utilities.HtmlEncode(((Unlimited <int>)itemProperty21).Value.ToString(CultureInfo.CurrentCulture.NumberFormat), writer);
            }
            else
            {
                if (itemProperty21 is PropertyError)
                {
                    return(false);
                }
                if (itemProperty21 is PropertyError)
                {
                    return(false);
                }
            }
            return(true);
        }
Esempio n. 6
0
        // Token: 0x06002AA6 RID: 10918 RVA: 0x000EF620 File Offset: 0x000ED820
        private void RenderEmailSubsectionData()
        {
            foreach (EmailAddressIndex emailAddressIndex in ContactUtilities.EmailAddressIndexesToRead)
            {
                string label = null;
                string id    = null;
                switch (emailAddressIndex)
                {
                case EmailAddressIndex.Email1:
                    label = LocalizedStrings.GetHtmlEncoded(1111077458);
                    id    = "E1";
                    break;

                case EmailAddressIndex.Email2:
                    label = LocalizedStrings.GetHtmlEncoded(1405549740);
                    id    = "E2";
                    break;

                case EmailAddressIndex.Email3:
                    label = LocalizedStrings.GetHtmlEncoded(-160534201);
                    id    = "E3";
                    break;
                }
                Participant participant = this.contact.EmailAddresses[emailAddressIndex];
                if (!(participant == null))
                {
                    string text  = null;
                    string text2 = null;
                    ContactUtilities.GetParticipantEmailAddress(participant, out text, out text2, false);
                    if (!string.IsNullOrEmpty(text))
                    {
                        if (participant.RoutingType != null)
                        {
                            StringBuilder stringBuilder = new StringBuilder();
                            stringBuilder.Append("?ae=Item&t=IPM.Note&a=New&to=");
                            stringBuilder.Append(Utilities.UrlEncode(participant.EmailAddress));
                            if (!string.IsNullOrEmpty(text2))
                            {
                                stringBuilder.Append("&nm=");
                                stringBuilder.Append(Utilities.UrlEncode(text2));
                            }
                            if (!string.IsNullOrEmpty(participant.RoutingType))
                            {
                                stringBuilder.Append("&rt=");
                                stringBuilder.Append(Utilities.UrlEncode(participant.RoutingType));
                            }
                            if (!base.IsEmbeddedItem)
                            {
                                stringBuilder.Append("&ao=");
                                stringBuilder.Append(Utilities.UrlEncode(1.ToString()));
                                stringBuilder.Append("&stId=");
                                stringBuilder.Append(Utilities.UrlEncode(base.Item.Id.ObjectId.ToBase64String()));
                                stringBuilder.Append("&ei=");
                                StringBuilder stringBuilder2 = stringBuilder;
                                int           num            = (int)emailAddressIndex;
                                stringBuilder2.Append(num.ToString());
                            }
                            this.RenderSectionLabelValueAndUrl(label, id, string.IsNullOrEmpty(text2) ? text : text2, stringBuilder.ToString(), false);
                        }
                        else
                        {
                            this.RenderSectionLabelValueAndUrl(label, id, string.IsNullOrEmpty(text2) ? text : text2, null, false);
                        }
                    }
                }
            }
        }
Esempio n. 7
0
        protected void RenderColumn(TextWriter writer, ColumnId columnId, int itemIndex, bool isBold, bool openForCompose)
        {
            if (writer == null)
            {
                throw new ArgumentNullException("writer");
            }
            if (itemIndex < 0 || itemIndex >= this.dataSource.RangeCount)
            {
                throw new ArgumentOutOfRangeException("itemIndex", itemIndex.ToString());
            }
            Column column = ListViewColumns.GetColumn(columnId);

            switch (columnId)
            {
            case ColumnId.MailIcon:
                if (!this.RenderIcon(writer, itemIndex))
                {
                    goto IL_857;
                }
                goto IL_857;

            case ColumnId.From:
            case ColumnId.To:
            {
                string itemPropertyString = this.dataSource.GetItemPropertyString(itemIndex, column[0]);
                if (itemPropertyString.Length != 0)
                {
                    Utilities.CropAndRenderText(writer, itemPropertyString, 16);
                    goto IL_857;
                }
                goto IL_857;
            }

            case ColumnId.Subject:
            {
                writer.Write("<h1");
                if (isBold)
                {
                    writer.Write(" class=\"bld\"");
                }
                writer.Write(">");
                writer.Write("<a href=\"#\"");
                this.RenderFolderNameTooltip(writer, itemIndex);
                writer.Write(" onClick=\"onClkRdMsg(this, '");
                string s = this.dataSource.GetItemProperty(itemIndex, StoreObjectSchema.ItemClass) as string;
                Utilities.HtmlEncode(Utilities.JavascriptEncode(s), writer);
                writer.Write("', {0}, {1});\">", itemIndex, openForCompose ? 1 : 0);
                string itemPropertyString2 = this.dataSource.GetItemPropertyString(itemIndex, column[0]);
                if (string.IsNullOrEmpty(itemPropertyString2.Trim()))
                {
                    writer.Write(LocalizedStrings.GetHtmlEncoded(730745110));
                }
                else
                {
                    Utilities.CropAndRenderText(writer, itemPropertyString2, 32);
                }
                writer.Write("</a></h1>");
                goto IL_857;
            }

            case ColumnId.Department:
            case ColumnId.ContactIcon:
            case ColumnId.BusinessPhone:
            case ColumnId.BusinessFax:
            case ColumnId.MobilePhone:
            case ColumnId.HomePhone:
                goto IL_74A;

            case ColumnId.HasAttachment:
            {
                bool   hasAttachments = false;
                object itemProperty   = this.dataSource.GetItemProperty(itemIndex, ItemSchema.HasAttachment);
                if (itemProperty is bool)
                {
                    hasAttachments = (bool)itemProperty;
                }
                if (!ListViewContentsRenderingUtilities.RenderHasAttachments(writer, this.userContext, hasAttachments))
                {
                    goto IL_857;
                }
                goto IL_857;
            }

            case ColumnId.Importance:
            {
                Importance importance    = Importance.Normal;
                object     itemProperty2 = this.dataSource.GetItemProperty(itemIndex, ItemSchema.Importance);
                if (itemProperty2 is Importance || itemProperty2 is int)
                {
                    importance = (Importance)itemProperty2;
                }
                if (!ListViewContentsRenderingUtilities.RenderImportance(writer, this.UserContext, importance))
                {
                    goto IL_857;
                }
                goto IL_857;
            }

            case ColumnId.DeliveryTime:
            {
                ExDateTime itemPropertyExDateTime = this.dataSource.GetItemPropertyExDateTime(itemIndex, ItemSchema.ReceivedTime);
                if (!this.RenderDate(writer, itemPropertyExDateTime))
                {
                    goto IL_857;
                }
                goto IL_857;
            }

            case ColumnId.SentTime:
            {
                ExDateTime itemPropertyExDateTime2 = this.dataSource.GetItemPropertyExDateTime(itemIndex, ItemSchema.SentTime);
                if (!this.RenderDate(writer, itemPropertyExDateTime2))
                {
                    goto IL_857;
                }
                goto IL_857;
            }

            case ColumnId.Size:
            {
                int    num           = 0;
                object itemProperty3 = this.dataSource.GetItemProperty(itemIndex, ItemSchema.Size);
                if (itemProperty3 is int)
                {
                    num = (int)itemProperty3;
                }
                Utilities.RenderSizeWithUnits(writer, (long)num, true);
                goto IL_857;
            }

            case ColumnId.FileAs:
                break;

            case ColumnId.Title:
            case ColumnId.CompanyName:
                goto IL_5B5;

            case ColumnId.PhoneNumbers:
                if (!this.RenderPhoneNumberColumn(writer, itemIndex))
                {
                    goto IL_857;
                }
                goto IL_857;

            case ColumnId.EmailAddresses:
            {
                Participant[] array = new Participant[3];
                bool          flag  = false;
                array[0] = (this.dataSource.GetItemProperty(itemIndex, ContactSchema.Email1) as Participant);
                array[1] = (this.dataSource.GetItemProperty(itemIndex, ContactSchema.Email2) as Participant);
                array[2] = (this.dataSource.GetItemProperty(itemIndex, ContactSchema.Email3) as Participant);
                foreach (Participant participant in array)
                {
                    if (participant != null && !string.IsNullOrEmpty(participant.EmailAddress))
                    {
                        string text  = null;
                        string text2 = null;
                        ContactUtilities.GetParticipantEmailAddress(participant, out text, out text2);
                        Utilities.CropAndRenderText(writer, text, 24);
                        flag = true;
                        break;
                    }
                }
                if (!flag)
                {
                    goto IL_857;
                }
                goto IL_857;
            }

            default:
            {
                switch (columnId)
                {
                case ColumnId.CheckBox:
                {
                    VersionedId itemPropertyVersionedId = this.dataSource.GetItemPropertyVersionedId(itemIndex, ItemSchema.Id);
                    ListViewContentsRenderingUtilities.RenderCheckBox(writer, itemPropertyVersionedId.ObjectId.ToBase64String());
                    string itemClass = this.dataSource.GetItemProperty(itemIndex, StoreObjectSchema.ItemClass) as string;
                    if (ObjectClass.IsMeetingRequest(itemClass) || ObjectClass.IsMeetingCancellation(itemClass))
                    {
                        if (this.meetingMessageIdStringBuilder.Length > 0)
                        {
                            this.meetingMessageIdStringBuilder.Append(",");
                        }
                        this.meetingMessageIdStringBuilder.Append(itemPropertyVersionedId.ObjectId.ToBase64String());
                        goto IL_857;
                    }
                    goto IL_857;
                }

                case ColumnId.CheckBoxContact:
                case ColumnId.CheckBoxAD:
                {
                    string arg;
                    if (columnId == ColumnId.CheckBoxAD)
                    {
                        arg = Utilities.GetBase64StringFromGuid((Guid)this.dataSource.GetItemProperty(itemIndex, ADObjectSchema.Guid));
                    }
                    else
                    {
                        VersionedId itemPropertyVersionedId2 = this.dataSource.GetItemPropertyVersionedId(itemIndex, ItemSchema.Id);
                        arg = itemPropertyVersionedId2.ObjectId.ToBase64String();
                    }
                    writer.Write("<input type=\"checkbox\" name=\"chkRcpt\" value=\"{0}\"", arg);
                    writer.Write(" onClick=\"onClkRChkBx(this);\">");
                    goto IL_857;
                }

                case ColumnId.ADIcon:
                case ColumnId.BusinessFaxAD:
                case ColumnId.BusinessPhoneAD:
                case ColumnId.DepartmentAD:
                    goto IL_74A;

                case ColumnId.AliasAD:
                    break;

                case ColumnId.CompanyAD:
                    goto IL_5B5;

                case ColumnId.DisplayNameAD:
                    goto IL_383;

                default:
                    switch (columnId)
                    {
                    case ColumnId.PhoneAD:
                        break;

                    case ColumnId.TitleAD:
                        goto IL_5B5;

                    default:
                        goto IL_74A;
                    }
                    break;
                }
                string text3 = this.dataSource.GetItemProperty(itemIndex, column[0]) as string;
                if (!string.IsNullOrEmpty(text3))
                {
                    Utilities.CropAndRenderText(writer, text3, 24);
                    goto IL_857;
                }
                goto IL_857;
            }
            }
IL_383:
            StringBuilder stringBuilder = new StringBuilder();
            object obj;
            int    num2;

            if (columnId == ColumnId.DisplayNameAD)
            {
                string value = this.dataSource.GetItemProperty(itemIndex, ADRecipientSchema.DisplayName) as string;
                if (!string.IsNullOrEmpty(value))
                {
                    stringBuilder.Append(value);
                }
                obj  = Utilities.GetBase64StringFromGuid((Guid)this.dataSource.GetItemProperty(itemIndex, ADObjectSchema.Guid));
                num2 = (isBold ? 2 : 1);
            }
            else
            {
                string value = this.dataSource.GetItemProperty(itemIndex, ContactBaseSchema.FileAs) as string;
                if (!string.IsNullOrEmpty(value))
                {
                    stringBuilder.Append(value);
                }
                bool flag2 = (columnId == ColumnId.DisplayNameAD) ? this.userContext.IsPhoneticNamesEnabled : Utilities.IsJapanese;
                if (flag2)
                {
                    string value2 = this.dataSource.GetItemProperty(itemIndex, ContactSchema.YomiFirstName) as string;
                    string value3 = this.dataSource.GetItemProperty(itemIndex, ContactSchema.YomiLastName) as string;
                    bool   flag3  = false;
                    if (stringBuilder.Length > 0 && (!string.IsNullOrEmpty(value3) || !string.IsNullOrEmpty(value2)))
                    {
                        stringBuilder.Append(" (");
                        flag3 = true;
                    }
                    if (!string.IsNullOrEmpty(value3))
                    {
                        stringBuilder.Append(value3);
                        if (!string.IsNullOrEmpty(value2))
                        {
                            stringBuilder.Append(" ");
                        }
                    }
                    if (!string.IsNullOrEmpty(value2))
                    {
                        stringBuilder.Append(value2);
                    }
                    if (flag3)
                    {
                        stringBuilder.Append(")");
                    }
                }
                VersionedId itemPropertyVersionedId3 = this.dataSource.GetItemPropertyVersionedId(itemIndex, ItemSchema.Id);
                obj  = itemPropertyVersionedId3.ObjectId.ToBase64String();
                num2 = (isBold ? 4 : 3);
            }
            if (Utilities.WhiteSpaceOnlyOrNullEmpty(stringBuilder.ToString()))
            {
                stringBuilder.Append(LocalizedStrings.GetNonEncoded(-808148510));
            }
            writer.Write("<h1");
            if (isBold)
            {
                writer.Write(" class=\"bld\"");
            }
            writer.Write("><a href=\"#\" id=\"{0}\"", obj.ToString());
            if (isBold)
            {
                writer.Write(" class=\"lvwdl\"");
            }
            this.RenderFolderNameTooltip(writer, itemIndex);
            writer.Write(" onClick=\"return onClkRcpt(this, {0});\">", num2);
            if (isBold)
            {
                ListViewContentsRenderingUtilities.RenderItemIcon(writer, this.userContext, "IPM.DistList");
            }
            Utilities.CropAndRenderText(writer, stringBuilder.ToString(), 32);
            writer.Write("</a></h1>");
            goto IL_857;
IL_5B5:
            string text4 = this.dataSource.GetItemProperty(itemIndex, column[0]) as string;

            if (!string.IsNullOrEmpty(text4))
            {
                Utilities.CropAndRenderText(writer, text4, 16);
                goto IL_857;
            }
            goto IL_857;
IL_74A:
            object itemProperty4 = this.dataSource.GetItemProperty(itemIndex, column[0]);
            string text5 = itemProperty4 as string;

            if (itemProperty4 is ExDateTime)
            {
                writer.Write(((ExDateTime)itemProperty4).ToString());
            }
            else if (itemProperty4 is DateTime)
            {
                ExDateTime exDateTime = new ExDateTime(this.userContext.TimeZone, (DateTime)itemProperty4);
                writer.Write(exDateTime.ToString());
            }
            else if (text5 != null)
            {
                if (text5.Length != 0)
                {
                    Utilities.HtmlEncode(text5, writer);
                }
            }
            else if (itemProperty4 is int)
            {
                Utilities.HtmlEncode(((int)itemProperty4).ToString(CultureInfo.CurrentCulture.NumberFormat), writer);
            }
            else if (itemProperty4 is Unlimited <int> )
            {
                Unlimited <int> unlimited = (Unlimited <int>)itemProperty4;
                if (!unlimited.IsUnlimited)
                {
                    Utilities.HtmlEncode(unlimited.Value.ToString(CultureInfo.CurrentCulture.NumberFormat), writer);
                }
            }
            else if (!(itemProperty4 is PropertyError))
            {
            }
IL_857:
            writer.Write("&nbsp;");
        }