Example #1
0
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     this.m_hueColor = null;
     this.m_offsetX  = null;
     this.m_offsetY  = null;
 }
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     this.m_hueColor     = null;
     this.m_transparency = null;
     this.m_clipImage    = null;
 }
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     this.m_startColor  = null;
     this.m_middleColor = null;
     this.m_endColor    = null;
 }
Example #4
0
 protected override void ResetInstanceCache()
 {
     this.m_backgroundRepeatEvaluated = false;
     this.m_positionEvaluated         = false;
     this.m_transparentColorEvaluated = false;
     this.m_transparentColor          = null;
     this.m_imageDataHandler.ClearCache();
 }
 protected override void ResetInstanceCache()
 {
     this.m_source           = null;
     this.m_transparentColor = null;
     if (this.m_imageDataHandler != null)
     {
         this.m_imageDataHandler.ClearCache();
     }
 }
Example #6
0
 protected override void ResetInstanceCache()
 {
     this.m_colorEvaluated = false;
     this.m_colorAssigned  = false;
     this.m_color          = null;
     this.m_styleEvaluated = false;
     this.m_styleAssigned  = false;
     this.m_widthEvaluated = false;
     this.m_widthAssigned  = false;
     this.m_width          = null;
 }
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     this.m_layout = null;
     this.m_autoFitTextDisabled = null;
     this.m_minFontSize         = null;
     this.m_interlacedRows      = null;
     this.m_interlacedRowsColor = null;
     this.m_equallySpacedItems  = null;
     this.m_textWrapThreshold   = null;
 }
Example #8
0
        public static bool TryParse(string value, bool allowTransparency, out ReportColor reportColor)
        {
            Color gdiColor = default(Color);

            if (Validator.ValidateColor(value, out gdiColor, allowTransparency))
            {
                reportColor = new ReportColor(value, gdiColor, true);
                return(true);
            }
            reportColor = null;
            return(false);
        }
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     this.m_tickMarkLength      = null;
     this.m_colorBarBorderColor = null;
     this.m_labelInterval       = null;
     this.m_labelFormat         = null;
     this.m_labelPlacement      = null;
     this.m_labelBehavior       = null;
     this.m_hideEndLabels       = null;
     this.m_rangeGapColor       = null;
     this.m_noDataText          = null;
 }
Example #10
0
        public static Color GetStyleColor(Style style, StyleInstance styleInstance)
        {
            ReportColorProperty color = style.Color;
            Color result = Color.Black;

            if (!MappingHelper.GetColorFromReportColorProperty(color, ref result))
            {
                ReportColor color2 = styleInstance.Color;
                if (color2 != null)
                {
                    result = color2.ToColor();
                }
            }
            return(result);
        }
Example #11
0
        public static Color GetStyleBackGradientEndColor(Style style, StyleInstance styleInstance)
        {
            ReportColorProperty backgroundGradientEndColor = style.BackgroundGradientEndColor;
            Color result = Color.Empty;

            if (!MappingHelper.GetColorFromReportColorProperty(backgroundGradientEndColor, ref result))
            {
                ReportColor backgroundGradientEndColor2 = styleInstance.BackgroundGradientEndColor;
                if (backgroundGradientEndColor2 != null)
                {
                    result = backgroundGradientEndColor2.ToColor();
                }
            }
            return(result);
        }
Example #12
0
        public static Color GetStyleShadowColor(Style style, StyleInstance styleInstance)
        {
            ReportColorProperty shadowColor = style.ShadowColor;
            Color result = MappingHelper.m_defaultShadowColor;

            if (!MappingHelper.GetColorFromReportColorProperty(shadowColor, ref result))
            {
                ReportColor shadowColor2 = styleInstance.ShadowColor;
                if (shadowColor2 != null)
                {
                    result = shadowColor2.ToColor();
                }
            }
            return(result);
        }
Example #13
0
        public static Color GetStyleBorderColor(Border border)
        {
            ReportColorProperty color = border.Color;
            Color result = Color.Black;

            if (!MappingHelper.GetColorFromReportColorProperty(color, ref result))
            {
                ReportColor color2 = border.Instance.Color;
                if (color2 != null)
                {
                    result = color2.ToColor();
                }
            }
            return(result);
        }
Example #14
0
        private Color GetCustomColor(MapCustomColor mapCustomColor)
        {
            ReportColorProperty color = mapCustomColor.Color;
            Color empty = Color.Empty;

            if (color != null)
            {
                if (MappingHelper.GetColorFromReportColorProperty(color, ref empty))
                {
                    return(empty);
                }
                ReportColor color2 = mapCustomColor.Instance.Color;
                if (color2 != null)
                {
                    return(color2.ToColor());
                }
            }
            return(empty);
        }
Example #15
0
        public void SetAssignedDynamicValue(BorderStyleProperty prop, AspNetCore.ReportingServices.ReportIntermediateFormat.AttributeInfo value, bool allowTransparency)
        {
            switch (prop)
            {
            case BorderStyleProperty.Color:
                this.m_colorEvaluated = true;
                this.m_color          = new ReportColor(value.Value, allowTransparency);
                break;

            case BorderStyleProperty.Style:
                this.m_styleEvaluated = true;
                this.m_style          = (BorderStyles)value.IntValue;
                break;

            case BorderStyleProperty.Width:
                this.m_widthEvaluated = true;
                this.m_width          = new ReportSize(value.Value);
                break;
            }
        }
 protected override void ResetInstanceCache()
 {
     base.ResetInstanceCache();
     this.m_scaleColor       = null;
     this.m_scaleBorderColor = null;
 }
 private void SetStyleValues(bool isParagraph)
 {
     if (this.m_currentHtmlElement.CssStyle != null)
     {
         string     text       = default(string);
         ReportSize reportSize = default(ReportSize);
         if (isParagraph && base.m_allowMultipleParagraphs)
         {
             if (this.m_currentHtmlElement.CssStyle.TryGetValue("text-align", out text))
             {
                 TextAlignments textAlign = default(TextAlignments);
                 if (RichTextStyleTranslator.TranslateTextAlign(text, out textAlign))
                 {
                     base.m_currentStyle.TextAlign = textAlign;
                 }
                 else
                 {
                     base.m_richTextLogger.RegisterInvalidValueWarning("text-align", text, this.m_currentHtmlElement.CharacterPosition);
                 }
             }
             if (this.m_currentHtmlElement.CssStyle.TryGetValue("text-indent", out text))
             {
                 if (ReportSize.TryParse(text, true, out reportSize))
                 {
                     base.m_currentParagraph.HangingIndent = reportSize;
                 }
                 else
                 {
                     base.m_richTextLogger.RegisterInvalidSizeWarning("text-indent", text, this.m_currentHtmlElement.CharacterPosition);
                 }
             }
             ReportSize generalPadding = null;
             if (this.m_currentHtmlElement.CssStyle.TryGetValue("padding", out text))
             {
                 if (ReportSize.TryParse(text, out reportSize))
                 {
                     generalPadding = reportSize;
                 }
                 else
                 {
                     base.m_richTextLogger.RegisterInvalidSizeWarning("padding", text, this.m_currentHtmlElement.CharacterPosition);
                 }
             }
             ReportSize size = default(ReportSize);
             if (this.HasPaddingValue("padding-top", generalPadding, out size))
             {
                 base.m_currentParagraph.AddSpaceBefore(size);
             }
             if (this.HasPaddingValue("padding-bottom", generalPadding, out size))
             {
                 base.m_currentParagraph.AddSpaceAfter(size);
             }
             if (this.HasPaddingValue("padding-left", generalPadding, out size))
             {
                 base.m_currentParagraph.AddLeftIndent(size);
             }
             if (this.HasPaddingValue("padding-right", generalPadding, out size))
             {
                 base.m_currentParagraph.AddRightIndent(size);
             }
         }
         if (this.m_currentHtmlElement.CssStyle.TryGetValue("font-family", out text))
         {
             base.m_currentStyle.FontFamily = text;
         }
         if (this.m_currentHtmlElement.CssStyle.TryGetValue("font-size", out text))
         {
             if (ReportSize.TryParse(text, out reportSize))
             {
                 base.m_currentStyle.FontSize = reportSize;
             }
             else
             {
                 base.m_richTextLogger.RegisterInvalidSizeWarning("font-size", text, this.m_currentHtmlElement.CharacterPosition);
             }
         }
         if (this.m_currentHtmlElement.CssStyle.TryGetValue("font-weight", out text))
         {
             FontWeights fontWeight = default(FontWeights);
             if (RichTextStyleTranslator.TranslateFontWeight(text, out fontWeight))
             {
                 base.m_currentStyle.FontWeight = fontWeight;
             }
             else
             {
                 base.m_richTextLogger.RegisterInvalidValueWarning("font-weight", text, this.m_currentHtmlElement.CharacterPosition);
             }
         }
         if (this.m_currentHtmlElement.CssStyle.TryGetValue("color", out text))
         {
             ReportColor color = default(ReportColor);
             if (ReportColor.TryParse(RichTextStyleTranslator.TranslateHtmlColor(text), out color))
             {
                 base.m_currentStyle.Color = color;
             }
             else
             {
                 base.m_richTextLogger.RegisterInvalidColorWarning("color", text, this.m_currentHtmlElement.CharacterPosition);
             }
         }
     }
 }
        private void ParseTextRunElement(HtmlElement.HtmlElementType elementType)
        {
            base.m_currentStyle = base.m_currentStyle.CreateChildStyle(elementType);
            bool flag = false;

            switch (this.m_currentHtmlElement.ElementType)
            {
            case HtmlElement.HtmlElementType.I:
            case HtmlElement.HtmlElementType.EM:
                base.m_currentStyle.FontStyle = FontStyles.Italic;
                break;

            case HtmlElement.HtmlElementType.U:
                base.m_currentStyle.TextDecoration = TextDecorations.Underline;
                break;

            case HtmlElement.HtmlElementType.STRONG:
            case HtmlElement.HtmlElementType.B:
                base.m_currentStyle.FontWeight = FontWeights.Bold;
                break;

            case HtmlElement.HtmlElementType.STRIKE:
            case HtmlElement.HtmlElementType.S:
                base.m_currentStyle.TextDecoration = TextDecorations.LineThrough;
                break;

            case HtmlElement.HtmlElementType.SPAN:
            case HtmlElement.HtmlElementType.FONT:
                flag = true;
                break;
            }
            if (flag && !this.m_currentHtmlElement.IsEmptyElement && this.m_currentHtmlElement.HasAttributes)
            {
                if (this.m_currentHtmlElement.ElementType == HtmlElement.HtmlElementType.FONT)
                {
                    string text = default(string);
                    if (this.m_currentHtmlElement.Attributes.TryGetValue("size", out text))
                    {
                        string size = default(string);
                        if (RichTextStyleTranslator.TranslateHtmlFontSize(text, out size))
                        {
                            base.m_currentStyle.FontSize = new ReportSize(size);
                        }
                        else
                        {
                            base.m_richTextLogger.RegisterInvalidSizeWarning("size", text, this.m_currentHtmlElement.CharacterPosition);
                        }
                    }
                    if (this.m_currentHtmlElement.Attributes.TryGetValue("face", out text))
                    {
                        base.m_currentStyle.FontFamily = text;
                    }
                    if (this.m_currentHtmlElement.Attributes.TryGetValue("color", out text))
                    {
                        ReportColor color = default(ReportColor);
                        if (ReportColor.TryParse(RichTextStyleTranslator.TranslateHtmlColor(text), out color))
                        {
                            base.m_currentStyle.Color = color;
                        }
                        else
                        {
                            base.m_richTextLogger.RegisterInvalidColorWarning("color", text, this.m_currentHtmlElement.CharacterPosition);
                        }
                    }
                }
                else if (this.m_currentHtmlElement.ElementType == HtmlElement.HtmlElementType.SPAN)
                {
                    this.SetStyleValues(false);
                }
            }
        }
Example #19
0
 public static bool TryParse(string value, out ReportColor reportColor)
 {
     return(ReportColor.TryParse(value, false, out reportColor));
 }