Пример #1
0
        // Token: 0x06000573 RID: 1395 RVA: 0x0002B388 File Offset: 0x00029588
        protected void SetInfobarMessages()
        {
            if (!this.isCalendarItem)
            {
                RenderingUtilities.RenderReplyForwardMessageStatus(base.Item, base.Infobar, base.UserContext);
                if (this.isDelegated)
                {
                    base.Infobar.AddMessageText(string.Format(LocalizedStrings.GetNonEncoded(this.delegateMessage), MeetingUtilities.GetReceivedOnBehalfOfDisplayName((MeetingMessage)base.Item)), InfobarMessageType.Informational);
                }
            }
            object obj = base.Item.TryGetProperty(MessageItemSchema.IsDraft);

            if (obj is bool && (bool)obj)
            {
                if (ObjectClass.IsMeetingResponse(this.ItemType))
                {
                    base.Infobar.AddMessageLocalized(-1981719796, InfobarMessageType.Informational);
                }
            }
            else
            {
                InfobarMessageBuilder.AddImportance(base.Infobar, base.Item);
                InfobarMessageBuilder.AddSensitivity(base.Infobar, base.Item);
            }
            InfobarMessageBuilder.AddFlag(base.Infobar, base.Item, base.UserContext);
        }
Пример #2
0
        // Token: 0x06002B6F RID: 11119 RVA: 0x000F3A30 File Offset: 0x000F1C30
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            this.Message = base.Initialize <MessageItem>(new PropertyDefinition[]
            {
                MessageItemSchema.IsRead,
                BodySchema.Codepage,
                BodySchema.InternetCpid,
                MessageItemSchema.MessageAudioNotes,
                MessageItemSchema.SenderTelephoneNumber,
                ItemSchema.FlagStatus,
                ItemSchema.FlagCompleteTime,
                MessageItemSchema.ReplyTime,
                MessageItemSchema.RequireProtectedPlayOnPhone,
                ItemSchema.UtcDueDate,
                ItemSchema.UtcStartDate,
                ItemSchema.ReminderDueBy,
                ItemSchema.ReminderIsSet,
                StoreObjectSchema.EffectiveRights
            });
            this.IrmItemHelper = new IRMItemHelper(this.Message, base.UserContext, base.IsPreviewForm, base.IsEmbeddedItem);
            using (UMClientCommon umclientCommon = new UMClientCommon(base.UserContext.ExchangePrincipal))
            {
                this.isUMEnabled          = umclientCommon.IsUMEnabled();
                this.isPlayOnPhoneEnabled = umclientCommon.IsPlayOnPhoneEnabled();
            }
            this.IrmItemHelper.IrmDecryptIfRestricted();
            bool isSuspectedPhishingItem = false;
            bool isLinkEnabled           = false;
            bool flag = false;

            this.isMacintoshPlatform = (Utilities.GetBrowserPlatform(base.Request.UserAgent) == BrowserPlatform.Macintosh);
            JunkEmailUtilities.GetJunkEmailPropertiesForItem(this.Message, base.IsEmbeddedItem, base.ForceEnableItemLink, base.UserContext, out this.isInJunkEmailFolder, out isSuspectedPhishingItem, out isLinkEnabled, out flag);
            this.toolbar             = new ReadMessageToolbar(base.IsInDeleteItems, base.IsEmbeddedItem, this.Message, this.isInJunkEmailFolder, isSuspectedPhishingItem, isLinkEnabled, false, this.IrmItemHelper.IsReplyRestricted, this.IrmItemHelper.IsReplyAllRestricted, this.IrmItemHelper.IsForwardRestricted, this.IrmItemHelper.IsPrintRestricted);
            this.toolbar.ToolbarType = (base.IsPreviewForm ? ToolbarType.Preview : ToolbarType.Form);
            this.recipientWell       = new MessageRecipientWell(this.Message);
            if (flag)
            {
                this.bodyMarkup = Markup.PlainText;
            }
            InfobarMessageBuilder.AddImportance(this.infobar, this.Message);
            InfobarMessageBuilder.AddFlag(this.infobar, this.Message, base.UserContext);
            InfobarMessageBuilder.AddSensitivity(this.infobar, this.Message);
            if (base.UserContext.IsIrmEnabled && Utilities.IsIrmRestrictedAndDecrypted(this.Message))
            {
                InfobarMessageBuilder.AddIrmInformation(this.infobar, this.Message, base.IsPreviewForm, false, false, false);
            }
            if (!this.Message.IsRead && !base.IsPreviewForm && !base.IsEmbeddedItem)
            {
                this.Message.MarkAsRead(Utilities.ShouldSuppressReadReceipt(base.UserContext, this.Message), false);
            }
        }
Пример #3
0
        // Token: 0x060005FE RID: 1534 RVA: 0x000300A8 File Offset: 0x0002E2A8
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            if (ObjectClass.IsMessage(base.OwaContext.FormsRegistryContext.Type, false))
            {
                this.message = base.Initialize <MessageItem>(ReadMessage.prefetchProperties);
            }
            else
            {
                this.message = base.InitializeAsMessageItem(ReadMessage.prefetchProperties);
            }
            this.recipientWell = new MessageRecipientWell(base.UserContext, this.message);
            RenderingUtilities.RenderReplyForwardMessageStatus(this.message, base.Infobar, base.UserContext);
            object obj = this.message.TryGetProperty(MessageItemSchema.IsDraft);

            if (obj is bool && (bool)obj)
            {
                base.Infobar.AddMessageLocalized(-1981719796, InfobarMessageType.Informational);
            }
            else
            {
                InfobarMessageBuilder.AddImportance(base.Infobar, this.message);
                InfobarMessageBuilder.AddSensitivity(base.Infobar, this.message);
                InfobarMessageBuilder.AddCompliance(base.UserContext, base.Infobar, this.message, false);
                if (Utilities.IsClearSigned(this.message) || Utilities.IsOpaqueSigned(this.message))
                {
                    base.Infobar.AddMessageLocalized(-1329088272, InfobarMessageType.Warning);
                }
                else if (Utilities.IsEncrypted(this.message))
                {
                    base.Infobar.AddMessageLocalized(-767943720, InfobarMessageType.Warning);
                }
            }
            InfobarMessageBuilder.AddFlag(base.Infobar, this.message, base.UserContext);
            if (this.message.Id != null && !this.message.IsRead)
            {
                this.message.MarkAsRead(Utilities.ShouldSuppressReadReceipt(base.UserContext, this.message), false);
            }
            this.isJunk = false;
            if (!this.isEmbeddedItem)
            {
                this.isJunk = Utilities.IsDefaultFolderId(base.Item.Session, this.CurrentFolderId, DefaultFolderType.JunkEmail);
            }
            base.HandleReadReceipt(this.message);
        }
Пример #4
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            this.post = base.Initialize <PostItem>(ReadPost.prefetchProperties);
            if (!base.IsPreviewForm && !base.IsEmbeddedItem)
            {
                this.post.MarkAsRead(false);
            }
            bool flag  = false;
            bool flag2 = false;
            bool flag3 = false;

            JunkEmailUtilities.GetJunkEmailPropertiesForItem(this.post, base.IsEmbeddedItem, base.ForceEnableItemLink, base.UserContext, out this.isInJunkmailFolder, out flag, out flag2, out flag3);
            this.isSuspectedPhishingItemWithoutLinkEnabled = (flag && !flag2);
            this.toolbar = new ReadPostToolbar(base.IsEmbeddedItem, base.Item);
            InfobarMessageBuilder.AddImportance(this.infobar, this.post);
            InfobarMessageBuilder.AddSensitivity(this.infobar, this.post);
            InfobarMessageBuilder.AddFlag(this.infobar, this.post, base.UserContext);
            InfobarMessageBuilder.AddCompliance(base.UserContext, this.infobar, this.post, false);
        }
Пример #5
0
 // Token: 0x06002ADF RID: 10975 RVA: 0x000F1888 File Offset: 0x000EFA88
 protected virtual void AddMessagesToInfobar()
 {
     InfobarMessageBuilder.AddImportance(this.infobar, this.Message);
     InfobarMessageBuilder.AddSensitivity(this.infobar, this.Message);
     InfobarMessageBuilder.AddFlag(this.infobar, this.Message, base.UserContext);
     InfobarMessageBuilder.AddCompliance(base.UserContext, this.infobar, this.Message, false);
     InfobarMessageBuilder.AddDeletePolicyInformation(this.infobar, this.Message, base.UserContext);
     this.AddIrmMessageToInfobar();
     if (!base.IsEmbeddedItem && !this.IsPublicItem)
     {
         InfobarMessageBuilder.AddReadReceiptNotice(base.UserContext, this.infobar, this.Message);
     }
     if (ObjectClass.IsTaskRequest(this.Message.ClassName))
     {
         this.infobar.AddMessage(SanitizedHtmlString.FromStringId(357315796), InfobarMessageType.Informational);
     }
     if (TextMessagingUtilities.NeedToAddUnsyncedMessageInfobar(this.Message.ClassName, this.Message, base.UserContext.MailboxSession))
     {
         this.infobar.AddMessage(SanitizedHtmlString.FromStringId(882347163), InfobarMessageType.Informational);
     }
 }
Пример #6
0
        protected internal override void BuildInfobar()
        {
            InfobarMessageBuilder.AddFlag(this.FormInfobar, this.meetingResponse, this.UserContext);
            if (this.isDraft)
            {
                this.FormInfobar.AddMessage(-1981719796, InfobarMessageType.Informational);
                string format = string.Empty;
                switch (this.meetingResponse.ResponseType)
                {
                case ResponseType.Tentative:
                    format = LocalizedStrings.GetHtmlEncoded(-588720585);
                    break;

                case ResponseType.Accept:
                    format = LocalizedStrings.GetHtmlEncoded(-14610226);
                    break;

                case ResponseType.Decline:
                    format = LocalizedStrings.GetHtmlEncoded(-1615218790);
                    break;
                }
                SanitizedHtmlString messageHtml;
                if (this.meetingResponse.From != null && string.CompareOrdinal(this.UserContext.ExchangePrincipal.LegacyDn, this.meetingResponse.From.EmailAddress) != 0)
                {
                    ADSessionSettings adSettings  = Utilities.CreateScopedADSessionSettings(this.UserContext.LogonIdentity.DomainName);
                    string            displayName = ExchangePrincipal.FromLegacyDN(adSettings, this.meetingResponse.From.EmailAddress).MailboxInfo.DisplayName;
                    messageHtml = SanitizedHtmlString.Format(format, new object[]
                    {
                        displayName
                    });
                }
                else
                {
                    messageHtml = SanitizedHtmlString.Format(format, new object[]
                    {
                        LocalizedStrings.GetNonEncoded(372029413)
                    });
                }
                this.FormInfobar.AddMessage(messageHtml, InfobarMessageType.Informational);
                return;
            }
            string s   = string.Empty;
            string arg = string.Empty;

            if (this.OriginalSender == null || string.IsNullOrEmpty(this.OriginalSender.DisplayName))
            {
                arg = LocalizedStrings.GetNonEncoded(-342979842);
            }
            else
            {
                arg = this.OriginalSender.DisplayName;
            }
            switch (this.meetingResponse.ResponseType)
            {
            case ResponseType.Tentative:
                s = string.Format(Strings.InfoAttendeeTentative, arg);
                break;

            case ResponseType.Accept:
                s = string.Format(Strings.InfoAttendeeAccepted, arg);
                break;

            case ResponseType.Decline:
                s = string.Format(Strings.InfoAttendeeDecline, arg);
                break;
            }
            this.FormInfobar.AddMessage(Utilities.SanitizeHtmlEncode(s), InfobarMessageType.Informational);
            InfobarMessageBuilder.AddImportance(this.FormInfobar, this.meetingResponse);
            InfobarMessageBuilder.AddSensitivity(this.FormInfobar, this.meetingResponse);
            if (this.isDelegated)
            {
                this.FormInfobar.AddMessage(Utilities.SanitizeHtmlEncode(string.Format(LocalizedStrings.GetNonEncoded(-1205864060), MeetingUtilities.GetReceivedOnBehalfOfDisplayName(this.meetingResponse))), InfobarMessageType.Informational);
            }
            if (!this.isEmbeddedItem && !Utilities.IsPublic(this.meetingResponse))
            {
                InfobarMessageBuilder.AddReadReceiptNotice(this.UserContext, this.FormInfobar, this.meetingResponse);
            }
        }