Exemplo n.º 1
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            string type = base.OwaContext.FormsRegistryContext.Type;

            if (ObjectClass.IsPost(type))
            {
                this.post = base.Initialize <PostItem>(PrintPost.prefetchProperties);
            }
            this.attachmentWellRenderObjects = AttachmentWell.GetAttachmentInformation(this.post, base.AttachmentLinks, base.UserContext.IsPublicLogon, base.IsEmbeddedItem);
            this.shouldRenderAttachmentWell  = PrintAttachmentWell.ShouldRenderAttachments(this.attachmentWellRenderObjects);
            if (this.post.Importance == Importance.High)
            {
                this.importanceString = LocalizedStrings.GetHtmlEncoded(-77932258);
            }
            else if (this.post.Importance == Importance.Low)
            {
                this.importanceString = LocalizedStrings.GetHtmlEncoded(1502599728);
            }
            switch (this.post.Sensitivity)
            {
            case Sensitivity.Personal:
                this.sensitivityString = LocalizedStrings.GetHtmlEncoded(567923294);
                break;

            case Sensitivity.Private:
                this.sensitivityString = LocalizedStrings.GetHtmlEncoded(-1268489823);
                break;

            case Sensitivity.CompanyConfidential:
                this.sensitivityString = LocalizedStrings.GetHtmlEncoded(-819101664);
                break;
            }
            this.categoriesString = ItemUtility.GetCategoriesAsString(this.post);
        }
Exemplo n.º 2
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            string type = base.OwaContext.FormsRegistryContext.Type;

            StorePropertyDefinition[] array = new StorePropertyDefinition[]
            {
                ItemSchema.BlockStatus,
                BodySchema.Codepage,
                BodySchema.InternetCpid,
                MessageItemSchema.SenderTelephoneNumber,
                ItemSchema.FlagStatus,
                ItemSchema.FlagCompleteTime
            };
            if (ObjectClass.IsMessage(type, false))
            {
                this.message = base.Initialize <MessageItem>(array);
            }
            else
            {
                this.message = base.InitializeAsMessageItem(array);
            }
            this.IrmDecryptIfRestricted();
            this.recipientWell = new PrintRecipientWell(new MessageRecipientWell(this.message));
            this.attachmentWellRenderObjects = AttachmentWell.GetAttachmentInformation(this.message, base.AttachmentLinks, base.UserContext.IsPublicLogon, base.IsEmbeddedItem);
            this.shouldRenderAttachmentWell  = (!this.IsRestrictedButIrmFeatureDisabledOrDecryptionFailed && PrintAttachmentWell.ShouldRenderAttachments(this.attachmentWellRenderObjects));
            if (this.message.Importance == Importance.High)
            {
                this.importanceString = LocalizedStrings.GetHtmlEncoded(-77932258);
            }
            else if (this.message.Importance == Importance.Low)
            {
                this.importanceString = LocalizedStrings.GetHtmlEncoded(1502599728);
            }
            switch (this.message.Sensitivity)
            {
            case Sensitivity.Personal:
                this.sensitivityString = LocalizedStrings.GetHtmlEncoded(567923294);
                break;

            case Sensitivity.Private:
                this.sensitivityString = LocalizedStrings.GetHtmlEncoded(-1268489823);
                break;

            case Sensitivity.CompanyConfidential:
                this.sensitivityString = LocalizedStrings.GetHtmlEncoded(-819101664);
                break;
            }
            this.categoriesString = ItemUtility.GetCategoriesAsString(this.message);
            if (this.message.Id != null && !this.message.IsRead && !base.IsPreviewForm)
            {
                this.message.MarkAsRead(Utilities.ShouldSuppressReadReceipt(base.UserContext, this.message), false);
            }
        }