// Token: 0x06002E66 RID: 11878 RVA: 0x00109108 File Offset: 0x00107308
 public virtual void Sort()
 {
     try
     {
         ExTraceGlobals.MailCallTracer.TraceDebug((long)this.GetHashCode(), "ListViewEventHandler.Sort");
         bool flag = this.ShouldSeekToItemOnSort(this.ListViewState.SortedColumnId);
         this.PersistSort(this.ListViewState.SortedColumnId, this.ListViewState.SortDirection);
         ObjectId objectId = base.GetParameter("mId") as ObjectId;
         if (objectId != null && flag)
         {
             this.PreRefresh();
             ListView            listView   = this.GetListView();
             IListViewDataSource dataSource = this.GetDataSource(listView);
             dataSource.Load(objectId, SeekDirection.Next, base.UserContext.UserOptions.ViewRowCount);
             listView.DataSource = dataSource;
             this.WriteResponse(ListView.RenderFlags.Contents | ListView.RenderFlags.Headers, listView);
         }
         else
         {
             this.Refresh(ListView.RenderFlags.Contents | ListView.RenderFlags.Headers, 0);
         }
     }
     finally
     {
         this.EndProcessEvent();
     }
 }
Пример #2
0
        // Token: 0x06001FFA RID: 8186 RVA: 0x000B9298 File Offset: 0x000B7498
        protected bool RenderADEmailAddress(IListViewDataSource dataSource, TextWriter writer)
        {
            string text = dataSource.GetItemProperty <SmtpAddress>(ADRecipientSchema.PrimarySmtpAddress, SmtpAddress.Empty).ToString();

            if (text.Length == 0)
            {
                return(false);
            }
            RecipientAddress.RecipientAddressFlags recipientAddressFlags = RecipientAddress.RecipientAddressFlags.None;
            RecipientDisplayType?itemProperty = dataSource.GetItemProperty <RecipientDisplayType?>(ADRecipientSchema.RecipientDisplayType, null);

            if (itemProperty == RecipientDisplayType.ConferenceRoomMailbox || itemProperty == RecipientDisplayType.SyncedConferenceRoomMailbox)
            {
                recipientAddressFlags |= RecipientAddress.RecipientAddressFlags.Room;
            }
            RecipientType itemProperty2 = dataSource.GetItemProperty <RecipientType>(ADRecipientSchema.RecipientType, RecipientType.Invalid);

            if (Utilities.IsADDistributionList(itemProperty2))
            {
                recipientAddressFlags |= RecipientAddress.RecipientAddressFlags.DistributionList;
            }
            string itemProperty3 = dataSource.GetItemProperty <string>(ADRecipientSchema.LegacyExchangeDN, string.Empty);
            ProxyAddressCollection itemProperty4 = dataSource.GetItemProperty <ProxyAddressCollection>(ADRecipientSchema.EmailAddresses, null);
            string sipUri            = InstantMessageUtilities.GetSipUri(itemProperty4);
            string mobilePhoneNumber = Utilities.NormalizePhoneNumber(dataSource.GetItemProperty <string>(ADOrgPersonSchema.MobilePhone, string.Empty));

            this.RenderSingleEmailAddress(writer, dataSource.GetItemProperty <string>(ADRecipientSchema.DisplayName, string.Empty), text, text, itemProperty3, EmailAddressIndex.None, recipientAddressFlags, null, sipUri, mobilePhoneNumber);
            return(true);
        }
Пример #3
0
        public ListViewVerticalAdaptableLayout(IListViewDataSource <ItemDataType> dataSource, ListViewItem <ItemDataType> itemTemplate)
            : base(dataSource)
        {
            this.itemTemplate = itemTemplate;

            dataSource.OnUpdate += CalculateParameters;
        }
Пример #4
0
        void SetDataSource(IListViewDataSource <ItemDataType> dataSource)
        {
            if (this.dataSource == dataSource)
            {
                return;
            }

            if (this.dataSource != null)
            {
                this.dataSource.OnUpdate -= RefreshData;
            }

            this.dataSource = dataSource;

            if (dataSource == null)
            {
                return;
            }

            layout          = CreateLayout();
            layout.ItemSize = ItemSize;
            UpdateLayout();

            //sub after layout subbed
            dataSource.OnUpdate += RefreshData;

            RefreshData();
            ScrollPosition = new Vector2(0, 0);
        }
Пример #5
0
        // Token: 0x06000B33 RID: 2867 RVA: 0x0004F58C File Offset: 0x0004D78C
        public static string GetSingleEmailAddress(IListViewDataSource dataSource, string displayName, string emailAddress, string emailAddressForDisplay, string legacyExchangeDN, EmailAddressIndex emailAddressIndex, RecipientAddress.RecipientAddressFlags recipientAddressFlags, string routingType, string sipUri, string mobilePhoneNumber, bool htmlEncodeEmailAddress)
        {
            StringBuilder stringBuilder = new StringBuilder();

            using (StringWriter stringWriter = new StringWriter(stringBuilder))
            {
                InstantMessageUtilities.RenderSingleEmailAddress(dataSource, stringWriter, displayName, emailAddress, emailAddressForDisplay, legacyExchangeDN, emailAddressIndex, recipientAddressFlags, routingType, sipUri, mobilePhoneNumber, htmlEncodeEmailAddress);
            }
            return(stringBuilder.ToString());
        }
        // Token: 0x06002E6B RID: 11883 RVA: 0x00109268 File Offset: 0x00107468
        private void Refresh(ListView.RenderFlags renderFlags, int startRange, SeekDirection direction)
        {
            this.PreRefresh();
            if (startRange < 0)
            {
                startRange = 0;
            }
            ListView            listView   = this.GetListView();
            IListViewDataSource dataSource = this.GetDataSource(listView);

            this.LoadDataSource(dataSource, startRange, base.UserContext.UserOptions.ViewRowCount, direction);
            listView.DataSource = dataSource;
            this.WriteResponse(renderFlags, listView);
        }
Пример #7
0
        // Token: 0x060021BC RID: 8636 RVA: 0x000C0594 File Offset: 0x000BE794
        protected override void OnLoad(EventArgs e)
        {
            this.CallTracer.TraceDebug((long)this.GetHashCode(), "FolderListViewPage.OnLoad");
            this.LoadViewState();
            this.AlgorithmTracer.TraceDebug <bool, int, int>((long)this.GetHashCode(), "Creating ListView with isMultiline={0}, sortedColumn={1}, and sortOrder={2}", this.IsMultiLine, (int)this.SortedColumn, (int)this.SortOrder);
            this.listView = this.CreateListView(this.SortedColumn, this.SortOrder);
            ListView listView = this.listView as ListView;

            if (listView != null)
            {
                IListViewDataSource listViewDataSource = this.CreateDataSource(listView);
                listViewDataSource.Load(0, base.UserContext.UserOptions.ViewRowCount);
                listView.DataSource = listViewDataSource;
            }
            base.OnLoad(e);
        }
        // Token: 0x060021EB RID: 8683 RVA: 0x000C1C68 File Offset: 0x000BFE68
        protected override OwaQueryStringParameters GetDefaultItemParameters()
        {
            IListViewDataSource dataSource = ((VirtualListView2)this.listView).DataSource;

            if (dataSource.RangeCount < 1 || Utilities.IsPublic(this.Folder))
            {
                return(null);
            }
            OwaQueryStringParameters owaQueryStringParameters = new OwaQueryStringParameters();

            dataSource.MoveToItem(0);
            bool   flag          = Utilities.IsDefaultFolder(this.Folder, DefaultFolderType.JunkEmail);
            int    itemProperty  = dataSource.GetItemProperty <int>(ItemSchema.EdgePcl, 1);
            bool   itemProperty2 = dataSource.GetItemProperty <bool>(ItemSchema.LinkEnabled, false);
            bool   flag2         = JunkEmailUtilities.IsSuspectedPhishingItem(itemProperty) && !itemProperty2;
            string itemClass     = dataSource.GetItemClass();

            if (ObjectClass.IsOfClass(itemClass, "IPM.Sharing") && !flag && !flag2)
            {
                owaQueryStringParameters.SetApplicationElement("PreFormAction");
                owaQueryStringParameters.Action = "Preview";
            }
            else
            {
                owaQueryStringParameters.SetApplicationElement("Item");
                owaQueryStringParameters.Action = "Preview";
            }
            if ((!flag && !flag2) || ObjectClass.IsOfClass(itemClass, "IPM.Conversation"))
            {
                bool     itemProperty3 = dataSource.GetItemProperty <bool>(MessageItemSchema.IsDraft, false);
                bool     itemProperty4 = dataSource.GetItemProperty <bool>(MessageItemSchema.HasBeenSubmitted, false);
                TaskType itemProperty5 = (TaskType)dataSource.GetItemProperty <int>(TaskSchema.TaskType, 0);
                bool     flag3         = TaskUtilities.IsAssignedTaskType(itemProperty5);
                owaQueryStringParameters.ItemClass = itemClass;
                if ((itemProperty3 && !itemProperty4) || ObjectClass.IsContact(itemClass) || ObjectClass.IsDistributionList(itemClass))
                {
                    owaQueryStringParameters.State = "Draft";
                }
                else if (ObjectClass.IsTask(itemClass) && flag3)
                {
                    owaQueryStringParameters.State = "Assigned";
                }
            }
            owaQueryStringParameters.Id = dataSource.GetItemId();
            return(owaQueryStringParameters);
        }
Пример #9
0
            public bool IsInGroup(IListViewDataSource dataSource, Column column)
            {
                object itemProperty = dataSource.GetItemProperty <object>(column[0]);
                long   num          = 0L;

                if (itemProperty != null)
                {
                    if (itemProperty is int)
                    {
                        num = (long)((int)itemProperty);
                    }
                    else if (itemProperty is long)
                    {
                        num = (long)itemProperty;
                    }
                }
                return((long)this.start <= num && num < (long)this.end);
            }
 // Token: 0x06002E67 RID: 11879 RVA: 0x001091D0 File Offset: 0x001073D0
 public virtual void Find()
 {
     try
     {
         string text = (string)base.GetParameter("srch");
         if (255 < text.Length)
         {
             throw new OwaInvalidOperationException("Search string excedes the maximum supported length");
         }
         ListView            listView   = this.GetListView();
         IListViewDataSource dataSource = this.GetDataSource(listView, true);
         dataSource.Load(0, base.UserContext.UserOptions.ViewRowCount);
         listView.DataSource = dataSource;
         this.WriteResponse(ListView.RenderFlags.Contents, listView);
     }
     finally
     {
         this.EndProcessEvent();
     }
 }
 // Token: 0x06002E5F RID: 11871 RVA: 0x00108E98 File Offset: 0x00107098
 public virtual void TypeDown()
 {
     try
     {
         ExTraceGlobals.MailCallTracer.TraceDebug((long)this.GetHashCode(), "ListViewEventHandler.TypeDown");
         this.PreRefresh();
         ListView listView = this.GetListView();
         Column   column   = ListViewColumns.GetColumn(this.ListViewState.SortedColumnId);
         if (!column.IsTypeDownCapable)
         {
             throw new OwaInvalidOperationException("Type down search is not supported");
         }
         IListViewDataSource dataSource = this.GetDataSource(listView);
         dataSource.Load((string)base.GetParameter("td"), base.UserContext.UserOptions.ViewRowCount);
         listView.DataSource = dataSource;
         this.WriteResponse(ListView.RenderFlags.Contents, listView);
     }
     finally
     {
         this.EndProcessEvent();
     }
 }
            // Token: 0x06002142 RID: 8514 RVA: 0x000BF76C File Offset: 0x000BD96C
            public bool IsInGroup(IListViewDataSource dataSource, Column column)
            {
                FlagStatus itemProperty = dataSource.GetItemProperty <FlagStatus>(ItemSchema.FlagStatus, FlagStatus.NotFlagged);

                if (this.flagStatus != itemProperty)
                {
                    return(false);
                }
                if (itemProperty == FlagStatus.Flagged)
                {
                    StorePropertyDefinition propertyDefinition;
                    if (column.Id == ColumnId.FlagDueDate || column.Id == ColumnId.ContactFlagDueDate)
                    {
                        propertyDefinition = ItemSchema.UtcDueDate;
                    }
                    else
                    {
                        propertyDefinition = ItemSchema.UtcStartDate;
                    }
                    ExDateTime itemProperty2 = dataSource.GetItemProperty <ExDateTime>(propertyDefinition, ExDateTime.MinValue);
                    return((this.timeRange.Start <= itemProperty2 && itemProperty2 < this.timeRange.End) || (this.timeRange.Start == itemProperty2 && this.timeRange.Start == this.timeRange.End));
                }
                return(true);
            }
Пример #13
0
            // Token: 0x060025F3 RID: 9715 RVA: 0x000DBD80 File Offset: 0x000D9F80
            public bool IsInGroup(IListViewDataSource dataSource, Column column)
            {
                ExDateTime itemProperty = dataSource.GetItemProperty <ExDateTime>(column[0], ExDateTime.MinValue);

                return(this.DoesRangeMatch(itemProperty));
            }
 public ListViewHorizontalLayout(IListViewDataSource <ItemDataType> dataSource)
     : base(dataSource)
 {
 }
 // Token: 0x06002E6C RID: 11884 RVA: 0x001092B9 File Offset: 0x001074B9
 protected virtual void LoadDataSource(IListViewDataSource listViewDataSource, int startRange, int itemCount, SeekDirection direction)
 {
     listViewDataSource.Load(startRange, itemCount);
 }
Пример #16
0
 protected abstract bool IsValidDataSource(IListViewDataSource dataSource);
 // Token: 0x06002E6E RID: 11886 RVA: 0x0010943E File Offset: 0x0010763E
 protected virtual void RenderSearchResultsHeader(IListViewDataSource dataSource)
 {
     this.Writer.Write(LocalizedStrings.GetHtmlEncoded(-774873536), dataSource.TotalCount);
 }
Пример #18
0
 public ListViewLayout(IListViewDataSource <ItemDataType> dataSource)
 {
     this.dataSource = dataSource;
 }
Пример #19
0
        // Token: 0x06000B32 RID: 2866 RVA: 0x0004F400 File Offset: 0x0004D600
        public static void RenderSingleEmailAddress(IListViewDataSource dataSource, TextWriter writer, string displayName, string emailAddress, string emailAddressForDisplay, string legacyExchangeDN, EmailAddressIndex emailAddressIndex, RecipientAddress.RecipientAddressFlags recipientAddressFlags, string routingType, string sipUri, string mobilePhoneNumber, bool htmlEncodeEmailAddress)
        {
            writer.Write("<span id=\"ea\"");
            if (dataSource is FolderListViewDataSource)
            {
                writer.Write(" aO=1");
            }
            else
            {
                writer.Write(" aO=2");
            }
            writer.Write(" dn=\"");
            if (htmlEncodeEmailAddress)
            {
                Utilities.HtmlEncode(displayName, writer);
            }
            else
            {
                writer.Write(displayName);
            }
            writer.Write("\" rf=");
            int num = (int)recipientAddressFlags;

            Utilities.HtmlEncode(num.ToString(CultureInfo.InvariantCulture), writer);
            writer.Write(" rt=\"");
            if (!string.IsNullOrEmpty(routingType))
            {
                writer.Write(routingType);
            }
            else if (!string.IsNullOrEmpty(legacyExchangeDN))
            {
                writer.Write("EX\" lgDn=\"");
                Utilities.HtmlEncode(legacyExchangeDN, writer);
            }
            else if (recipientAddressFlags == RecipientAddress.RecipientAddressFlags.DistributionList)
            {
                writer.Write("MAPIPDL");
            }
            else
            {
                writer.Write("SMTP");
            }
            writer.Write("\" em=\"");
            if (htmlEncodeEmailAddress)
            {
                Utilities.HtmlEncode(emailAddress, writer);
            }
            else
            {
                writer.Write(emailAddress);
            }
            writer.Write("\" ei=\"");
            int num2 = (int)emailAddressIndex;

            Utilities.HtmlEncode(num2.ToString(), writer);
            if (!string.IsNullOrEmpty(sipUri))
            {
                writer.Write("\" uri=\"");
                if (htmlEncodeEmailAddress)
                {
                    Utilities.HtmlEncode(sipUri, writer);
                }
                else
                {
                    writer.Write(sipUri);
                }
            }
            if (!string.IsNullOrEmpty(mobilePhoneNumber))
            {
                writer.Write("\" mo=\"");
                if (htmlEncodeEmailAddress)
                {
                    Utilities.HtmlEncode(mobilePhoneNumber, writer);
                }
                else
                {
                    writer.Write(mobilePhoneNumber);
                }
            }
            writer.Write("\">");
            if (htmlEncodeEmailAddress)
            {
                Utilities.HtmlEncode(emailAddressForDisplay, writer);
            }
            else
            {
                writer.Write(emailAddressForDisplay);
            }
            writer.Write("</span>");
        }
 // Token: 0x06002060 RID: 8288 RVA: 0x000BB5D8 File Offset: 0x000B97D8
 protected override bool IsValidDataSource(IListViewDataSource dataSource)
 {
     return(dataSource is DistributionListDataSource);
 }
Пример #21
0
 // Token: 0x06000B34 RID: 2868 RVA: 0x0004F5E0 File Offset: 0x0004D7E0
 public static string GetSingleEmailAddress(IListViewDataSource dataSource, string displayName, string emailAddress, string emailAddressForDisplay, string legacyExchangeDN, EmailAddressIndex emailAddressIndex, RecipientAddress.RecipientAddressFlags recipientAddressFlags, string routingType, string sipUri, string mobilePhoneNumber)
 {
     return(InstantMessageUtilities.GetSingleEmailAddress(dataSource, displayName, emailAddress, emailAddressForDisplay, legacyExchangeDN, emailAddressIndex, recipientAddressFlags, routingType, sipUri, mobilePhoneNumber, true));
 }
Пример #22
0
 public ListViewCellLayout(IListViewDataSource <ItemDataType> dataSource)
     : base(dataSource)
 {
 }