Пример #1
0
        private int GetVerticalColumnBackgroundEmphasis(PublishingMapping.PageLayout pageLayout)
        {
            PublishingMapping.BackgroundEmphasis emphasis = PublishingMapping.BackgroundEmphasis.None;

            if (pageLayout != null)
            {
                if (pageLayout.SectionEmphasis != null && pageLayout.SectionEmphasis.VerticalColumnEmphasisSpecified)
                {
                    return(BackgroundEmphasisToInt(pageLayout.SectionEmphasis.VerticalColumnEmphasis));
                }
            }

            return(BackgroundEmphasisToInt(emphasis));
        }
Пример #2
0
        private int BackgroundEmphasisToInt(PublishingMapping.BackgroundEmphasis emphasis)
        {
            switch (emphasis)
            {
            case PublishingMapping.BackgroundEmphasis.None: return(0);

            case PublishingMapping.BackgroundEmphasis.Neutral: return(1);

            case PublishingMapping.BackgroundEmphasis.Soft: return(2);

            case PublishingMapping.BackgroundEmphasis.Strong: return(3);
            }

            return(0);
        }
Пример #3
0
        private int GetBackgroundEmphasis(PublishingMapping.PageLayout pageLayout, int row)
        {
            PublishingMapping.BackgroundEmphasis emphasis = PublishingMapping.BackgroundEmphasis.None;

            if (pageLayout != null)
            {
                if (pageLayout.SectionEmphasis != null && pageLayout.SectionEmphasis.Section != null)
                {
                    var section = pageLayout.SectionEmphasis.Section.Where(p => p.Row == row).FirstOrDefault();
                    if (section != null)
                    {
                        return(BackgroundEmphasisToInt(section.Emphasis));
                    }
                }
            }

            return(BackgroundEmphasisToInt(emphasis));
        }