private void InternalPopulateNonSharedStyleProperties(StyleAttributeHashtable styleAttributes) { if (styleAttributes != null) { IDictionaryEnumerator enumerator = styleAttributes.GetEnumerator(); while (enumerator.MoveNext()) { AttributeInfo attributeInfo = (AttributeInfo)enumerator.Value; string text = (string)enumerator.Key; if ("BackgroundImageSource" == text) { object obj = default(object); Image.SourceType imageSource = default(Image.SourceType); bool flag = default(bool); object obj2 = default(object); bool flag2 = default(bool); if (base.GetBackgroundImageProperties(attributeInfo, styleAttributes["BackgroundImageValue"], styleAttributes["BackgroundImageMIMEType"], out imageSource, out obj, out flag, out obj2, out flag2) && (flag | flag2) && obj != null) { string mimeType = null; if (!flag2) { mimeType = (string)obj2; } object styleProperty = new BackgroundImage(base.m_renderingContext, imageSource, obj, mimeType); base.SetStyleProperty("BackgroundImage", true, true, false, styleProperty); } } else if (!("BackgroundImageValue" == text) && !("BackgroundImageMIMEType" == text) && attributeInfo.IsExpression) { base.SetStyleProperty(text, true, true, false, this.CreateProperty(text, this.GetStyleAttributeValue(text, attributeInfo))); } } } }
private static void ValidateBackgroundImage(ExpressionInfo backgroundImageSource, ExpressionInfo backgroundImageValue, ExpressionInfo backgroundImageMIMEType, Style style, ObjectType objectType, string objectName, ErrorContext errorContext) { if (backgroundImageSource != null) { bool flag = true; Global.Tracer.Assert(ExpressionInfo.Types.Constant == backgroundImageSource.Type); Image.SourceType intValue = (Image.SourceType)backgroundImageSource.IntValue; Global.Tracer.Assert(null != backgroundImageValue); if (Image.SourceType.Database == intValue && ExpressionInfo.Types.Constant == backgroundImageValue.Type) { errorContext.Register(ProcessingErrorCode.rsBinaryConstant, Severity.Error, objectType, objectName, "BackgroundImageValue"); flag = false; } if (Image.SourceType.Database == intValue && !PublishingValidator.ValidateMimeType(backgroundImageMIMEType, objectType, objectName, "BackgroundImageMIMEType", errorContext)) { flag = false; } if (flag) { style.AddAttribute("BackgroundImageSource", backgroundImageSource); style.AddAttribute("BackgroundImageValue", backgroundImageValue); if (Image.SourceType.Database == intValue) { style.AddAttribute("BackgroundImageMIMEType", backgroundImageMIMEType); } } } }
internal InternalImage(Image.SourceType imgType, string mimeType, object valueObject, RenderingContext rc) { m_imageType = imgType; m_MIMEType = mimeType; m_valueObject = valueObject; m_renderingContext = rc; m_transparent = false; }
internal override void PopulateStyleProperties(bool populateAll) { if (base.IsCustomControl) { return; } bool flag = true; bool flag2 = false; if (populateAll) { flag = NeedPopulateSharedProps(); flag2 = NeedPopulateNonSharedProps(); if (!flag && !flag2) { return; } } Microsoft.ReportingServices.ReportProcessing.Style styleClass = m_actionInfo.ActionInfoDef.StyleClass; StyleAttributeHashtable styleAttributeHashtable = null; if (styleClass != null) { styleAttributeHashtable = styleClass.StyleAttributes; } Global.Tracer.Assert(styleAttributeHashtable != null); IDictionaryEnumerator enumerator = styleAttributeHashtable.GetEnumerator(); while (enumerator.MoveNext()) { AttributeInfo attributeInfo = (AttributeInfo)enumerator.Value; string text = (string)enumerator.Key; if ("BackgroundImage" == text) { Image.SourceType imageSource = Image.SourceType.External; object imageValue = null; object mimeType = null; bool isValueExpression = false; bool isMimeTypeExpression = false; GetBackgroundImageProperties(styleAttributeHashtable["BackgroundImageSource"], styleAttributeHashtable["BackgroundImageValue"], styleAttributeHashtable["BackgroundImageMIMEType"], out imageSource, out imageValue, out isValueExpression, out mimeType, out isMimeTypeExpression); if (imageValue != null) { string mimeType2 = null; if (!isMimeTypeExpression) { mimeType2 = (string)mimeType; } object styleProperty = new BackgroundImage(m_renderingContext, imageSource, imageValue, mimeType2); AddStyleProperty(text, isValueExpression || isMimeTypeExpression, flag2, flag, styleProperty); } } else if (!("BackgroundImageValue" == text) && !("BackgroundImageMIMEType" == text)) { AddStyleProperty(text, attributeInfo.IsExpression, flag2, flag, CreateProperty(text, GetStyleAttributeValue(text, attributeInfo))); } } }
internal bool GetBackgroundImageSource(AttributeInfo sourceAttribute, out Image.SourceType imageSource) { if (sourceAttribute == null) { imageSource = Image.SourceType.External; return(false); } Global.Tracer.Assert(!sourceAttribute.IsExpression); imageSource = (Image.SourceType)sourceAttribute.IntValue; return(true); }
public override object this[string styleName] { get { if (base.IsCustomControl) { object obj = null; if (base.m_nonSharedProperties != null) { obj = base.m_nonSharedProperties[styleName]; } if (obj == null && base.m_sharedProperties != null) { obj = base.m_sharedProperties[styleName]; } return(this.CreateProperty(styleName, obj)); } Global.Tracer.Assert(!base.IsCustomControl); if (this.m_actionInfo.ActionInfoDef.StyleClass == null) { return(null); } StyleAttributeHashtable styleAttributes = this.m_actionInfo.ActionInfoDef.StyleClass.StyleAttributes; AttributeInfo attributeInfo = null; if ("BackgroundImage" == styleName) { Image.SourceType imageSource = Image.SourceType.External; object obj2 = null; object obj3 = null; bool flag = false; bool flag2 = default(bool); base.GetBackgroundImageProperties(styleAttributes["BackgroundImageSource"], styleAttributes["BackgroundImageValue"], styleAttributes["BackgroundImageMIMEType"], out imageSource, out obj2, out flag2, out obj3, out flag); if (obj2 != null) { string mimeType = null; if (!flag) { mimeType = (string)obj3; } return(new BackgroundImage(base.m_renderingContext, imageSource, obj2, mimeType)); } } else { attributeInfo = styleAttributes[styleName]; if (attributeInfo != null) { return(this.CreateProperty(styleName, this.GetStyleAttributeValue(styleName, attributeInfo))); } } return(null); } }
public override void PopulateStyleProperties(bool populateAll) { if (!base.IsCustomControl) { bool flag = true; bool flag2 = false; if (populateAll) { flag = this.NeedPopulateSharedProps(); flag2 = this.NeedPopulateNonSharedProps(); if (!flag && !flag2) { return; } } AspNetCore.ReportingServices.ReportProcessing.Style styleClass = this.m_actionInfo.ActionInfoDef.StyleClass; StyleAttributeHashtable styleAttributeHashtable = null; if (styleClass != null) { styleAttributeHashtable = styleClass.StyleAttributes; } Global.Tracer.Assert(null != styleAttributeHashtable); IDictionaryEnumerator enumerator = styleAttributeHashtable.GetEnumerator(); while (enumerator.MoveNext()) { AttributeInfo attributeInfo = (AttributeInfo)enumerator.Value; string text = (string)enumerator.Key; if ("BackgroundImage" == text) { Image.SourceType imageSource = Image.SourceType.External; object obj = null; object obj2 = null; bool flag3 = false; bool flag4 = false; base.GetBackgroundImageProperties(styleAttributeHashtable["BackgroundImageSource"], styleAttributeHashtable["BackgroundImageValue"], styleAttributeHashtable["BackgroundImageMIMEType"], out imageSource, out obj, out flag3, out obj2, out flag4); if (obj != null) { string mimeType = null; if (!flag4) { mimeType = (string)obj2; } object styleProperty = new BackgroundImage(base.m_renderingContext, imageSource, obj, mimeType); base.AddStyleProperty(text, flag3 | flag4, flag2, flag, styleProperty); } } else if (!("BackgroundImageValue" == text) && !("BackgroundImageMIMEType" == text)) { base.AddStyleProperty(text, attributeInfo.IsExpression, flag2, flag, this.CreateProperty(text, this.GetStyleAttributeValue(text, attributeInfo))); } } } }
internal InternalImage(Image.SourceType imgType, string mimeType, object valueObject, RenderingContext rc, bool brokenImage, ImageMapAreaInstanceList imageMapAreas) { m_imageType = imgType; m_MIMEType = mimeType; m_valueObject = valueObject; m_renderingContext = rc; m_transparent = (!brokenImage && valueObject == null); if (!brokenImage) { m_imageMapAreas = imageMapAreas; } }
public override object this[string styleName] { get { if (base.IsCustomControl) { object obj = null; if (m_nonSharedProperties != null) { obj = m_nonSharedProperties[styleName]; } if (obj == null && m_sharedProperties != null) { obj = m_sharedProperties[styleName]; } return(CreateProperty(styleName, obj)); } Global.Tracer.Assert(!base.IsCustomControl); if (m_actionInfo.ActionInfoDef.StyleClass == null) { return(null); } StyleAttributeHashtable styleAttributes = m_actionInfo.ActionInfoDef.StyleClass.StyleAttributes; AttributeInfo attributeInfo = null; if ("BackgroundImage" == styleName) { Image.SourceType imageSource = Image.SourceType.External; object imageValue = null; object mimeType = null; bool isMimeTypeExpression = false; GetBackgroundImageProperties(styleAttributes["BackgroundImageSource"], styleAttributes["BackgroundImageValue"], styleAttributes["BackgroundImageMIMEType"], out imageSource, out imageValue, out bool _, out mimeType, out isMimeTypeExpression); if (imageValue != null) { string mimeType2 = null; if (!isMimeTypeExpression) { mimeType2 = (string)mimeType; } return(new BackgroundImage(m_renderingContext, imageSource, imageValue, mimeType2)); } } else { attributeInfo = styleAttributes[styleName]; if (attributeInfo != null) { return(CreateProperty(styleName, GetStyleAttributeValue(styleName, attributeInfo))); } } return(null); } }
public bool HasBackgroundImage(out bool isExpressionBased) { isExpressionBased = false; if (this.m_reportItem.HeadingInstance == null && this.m_reportItemDef.StyleClass == null) { return(false); } if (this.GetStyleDefinition("BackgroundImageValue") == null) { return(false); } StyleAttributeHashtable styleAttributeHashtable = null; if (this.m_reportItemDef.StyleClass != null) { styleAttributeHashtable = this.m_reportItemDef.StyleClass.StyleAttributes; } StyleAttributeHashtable styleAttributeHashtable2 = null; if (this.m_reportItem.HeadingInstance != null) { Global.Tracer.Assert(null != this.m_reportItem.HeadingInstance.MatrixHeadingDef.Subtotal.StyleClass); styleAttributeHashtable2 = this.m_reportItem.HeadingInstance.MatrixHeadingDef.Subtotal.StyleClass.StyleAttributes; } Image.SourceType sourceType = Image.SourceType.External; object obj = null; object obj2 = null; object obj3 = null; bool flag = false; bool flag2 = false; bool flag3 = false; if (styleAttributeHashtable2 != null) { base.GetBackgroundImageProperties(styleAttributeHashtable2["BackgroundImageSource"], styleAttributeHashtable2["BackgroundImageValue"], styleAttributeHashtable2["BackgroundImageMIMEType"], styleAttributeHashtable2["BackgroundRepeat"], out sourceType, out obj, out flag, out obj2, out flag2, out obj3, out flag3); } if (obj == null && styleAttributeHashtable != null) { base.GetBackgroundImageProperties(styleAttributeHashtable["BackgroundImageSource"], styleAttributeHashtable["BackgroundImageValue"], styleAttributeHashtable["BackgroundImageMIMEType"], styleAttributeHashtable["BackgroundRepeat"], out sourceType, out obj, out flag, out obj2, out flag2, out obj3, out flag3); } if (obj != null) { isExpressionBased = (flag || flag2 || flag3); return(true); } return(false); }
internal bool HasBackgroundImage(out bool isExpressionBased) { isExpressionBased = false; if (m_reportItem.HeadingInstance == null && m_reportItemDef.StyleClass == null) { return(false); } if (GetStyleDefinition("BackgroundImageValue") == null) { return(false); } StyleAttributeHashtable styleAttributeHashtable = null; if (m_reportItemDef.StyleClass != null) { styleAttributeHashtable = m_reportItemDef.StyleClass.StyleAttributes; } StyleAttributeHashtable styleAttributeHashtable2 = null; if (m_reportItem.HeadingInstance != null) { Global.Tracer.Assert(m_reportItem.HeadingInstance.MatrixHeadingDef.Subtotal.StyleClass != null); styleAttributeHashtable2 = m_reportItem.HeadingInstance.MatrixHeadingDef.Subtotal.StyleClass.StyleAttributes; } Image.SourceType imageSource = Image.SourceType.External; object imageValue = null; object mimeType = null; object repeat = null; bool isValueExpression = false; bool isMimeTypeExpression = false; bool isRepeatExpression = false; if (styleAttributeHashtable2 != null) { GetBackgroundImageProperties(styleAttributeHashtable2["BackgroundImageSource"], styleAttributeHashtable2["BackgroundImageValue"], styleAttributeHashtable2["BackgroundImageMIMEType"], styleAttributeHashtable2["BackgroundRepeat"], out imageSource, out imageValue, out isValueExpression, out mimeType, out isMimeTypeExpression, out repeat, out isRepeatExpression); } if (imageValue == null && styleAttributeHashtable != null) { GetBackgroundImageProperties(styleAttributeHashtable["BackgroundImageSource"], styleAttributeHashtable["BackgroundImageValue"], styleAttributeHashtable["BackgroundImageMIMEType"], styleAttributeHashtable["BackgroundRepeat"], out imageSource, out imageValue, out isValueExpression, out mimeType, out isMimeTypeExpression, out repeat, out isRepeatExpression); } if (imageValue != null) { isExpressionBased = (isValueExpression || isMimeTypeExpression || isRepeatExpression); return(true); } return(false); }
public bool GetBackgroundImageProperties(AttributeInfo sourceAttribute, AttributeInfo valueAttribute, AttributeInfo mimeTypeAttribute, out Image.SourceType imageSource, out object imageValue, out bool isValueExpression, out object mimeType, out bool isMimeTypeExpression) { this.GetBackgroundImageValue(valueAttribute, out imageValue, out isValueExpression); this.GetBackgroundImageMIMEType(mimeTypeAttribute, out mimeType, out isMimeTypeExpression); return(this.GetBackgroundImageSource(sourceAttribute, out imageSource)); }
public void Initialize(InitializationContext context) { Global.Tracer.Assert(null != this.m_styleAttributes); IDictionaryEnumerator enumerator = this.m_styleAttributes.GetEnumerator(); while (enumerator.MoveNext()) { string text = (string)enumerator.Key; AttributeInfo attributeInfo = (AttributeInfo)enumerator.Value; Global.Tracer.Assert(null != text); Global.Tracer.Assert(null != attributeInfo); if (attributeInfo.IsExpression) { string name = text; switch (text) { case "BorderColorLeft": case "BorderColorRight": case "BorderColorTop": case "BorderColorBottom": text = "BorderColor"; break; case "BorderStyleLeft": case "BorderStyleRight": case "BorderStyleTop": case "BorderStyleBottom": text = "BorderStyle"; break; case "BorderWidthLeft": case "BorderWidthRight": case "BorderWidthTop": case "BorderWidthBottom": text = "BorderWidth"; break; } Global.Tracer.Assert(null != this.m_expressionList); ExpressionInfo expressionInfo = this.m_expressionList[attributeInfo.IntValue]; expressionInfo.Initialize(text, context); context.ExprHostBuilder.StyleAttribute(name, expressionInfo); } } AttributeInfo attributeInfo2 = this.m_styleAttributes["BackgroundImageSource"]; if (attributeInfo2 != null) { Global.Tracer.Assert(!attributeInfo2.IsExpression); Image.SourceType intValue = (Image.SourceType)attributeInfo2.IntValue; if (Image.SourceType.Embedded == intValue) { AttributeInfo attributeInfo3 = this.m_styleAttributes["BackgroundImageValue"]; Global.Tracer.Assert(null != attributeInfo3); PublishingValidator.ValidateEmbeddedImageName(attributeInfo3, context.EmbeddedImages, context.ObjectType, context.ObjectName, "BackgroundImageValue", context.ErrorContext); } else if (intValue == Image.SourceType.External) { AttributeInfo attributeInfo4 = this.m_styleAttributes["BackgroundImageValue"]; Global.Tracer.Assert(null != attributeInfo4); if (!attributeInfo4.IsExpression) { context.ImageStreamNames[attributeInfo4.Value] = new ImageInfo(context.ObjectName, null); } } } context.CheckInternationalSettings(this.m_styleAttributes); }
internal BackgroundImage(RenderingContext context, Image.SourceType imageSource, object imageValue, string mimeType) { m_internalImage = new InternalImage(imageSource, mimeType, imageValue, context); }
internal bool GetBackgroundImageProperties(AttributeInfo sourceAttribute, AttributeInfo valueAttribute, AttributeInfo mimeTypeAttribute, AttributeInfo repeatAttribute, out Image.SourceType imageSource, out object imageValue, out bool isValueExpression, out object mimeType, out bool isMimeTypeExpression, out object repeat, out bool isRepeatExpression) { GetBackgroundImageValue(valueAttribute, out imageValue, out isValueExpression); GetBackgroundImageMIMEType(mimeTypeAttribute, out mimeType, out isMimeTypeExpression); GetBackgroundImageRepeat(repeatAttribute, out repeat, out isRepeatExpression); return(GetBackgroundImageSource(sourceAttribute, out imageSource)); }
public override object this[string styleName] { get { if (base.IsCustomControl) { object obj = null; if (base.m_nonSharedProperties != null) { obj = base.m_nonSharedProperties[styleName]; } if (obj == null && base.m_sharedProperties != null) { obj = base.m_sharedProperties[styleName]; } return(this.CreatePropertyOrReturnDefault(styleName, obj)); } Global.Tracer.Assert(!base.IsCustomControl); if (this.m_reportItem.HeadingInstance == null && this.m_reportItemDef.StyleClass == null) { return(this.m_styleDefaults[styleName]); } StyleAttributeHashtable styleAttributeHashtable = null; if (this.m_reportItemDef.StyleClass != null) { styleAttributeHashtable = this.m_reportItemDef.StyleClass.StyleAttributes; } StyleAttributeHashtable styleAttributeHashtable2 = null; if (this.m_reportItem.HeadingInstance != null) { Global.Tracer.Assert(null != this.m_reportItem.HeadingInstance.MatrixHeadingDef.Subtotal.StyleClass); styleAttributeHashtable2 = this.m_reportItem.HeadingInstance.MatrixHeadingDef.Subtotal.StyleClass.StyleAttributes; } AttributeInfo attributeInfo = null; if ("BackgroundImage" == styleName) { Image.SourceType imageSource = Image.SourceType.External; object obj2 = null; object obj3 = null; bool flag = false; bool flag2 = default(bool); if (styleAttributeHashtable2 != null) { base.GetBackgroundImageProperties(styleAttributeHashtable2["BackgroundImageSource"], styleAttributeHashtable2["BackgroundImageValue"], styleAttributeHashtable2["BackgroundImageMIMEType"], out imageSource, out obj2, out flag2, out obj3, out flag); } if (obj2 == null && styleAttributeHashtable != null) { base.GetBackgroundImageProperties(styleAttributeHashtable["BackgroundImageSource"], styleAttributeHashtable["BackgroundImageValue"], styleAttributeHashtable["BackgroundImageMIMEType"], out imageSource, out obj2, out flag2, out obj3, out flag); } if (obj2 != null) { string mimeType = null; if (!flag) { mimeType = (string)obj3; } return(new BackgroundImage(base.m_renderingContext, imageSource, obj2, mimeType)); } } else { if (styleAttributeHashtable2 != null) { AttributeInfo attributeInfo2 = styleAttributeHashtable2[styleName]; if (attributeInfo2 != null) { return(this.CreatePropertyOrReturnDefault(styleName, this.GetStyleAttributeValue(styleName, attributeInfo2))); } } if (styleAttributeHashtable != null) { attributeInfo = styleAttributeHashtable[styleName]; if (attributeInfo != null) { return(this.CreatePropertyOrReturnDefault(styleName, this.GetStyleAttributeValue(styleName, attributeInfo))); } } } return(this.m_styleDefaults[styleName]); } }
internal override void PopulateStyleProperties(bool populateAll) { if (base.IsCustomControl) { return; } bool flag = true; bool flag2 = false; if (populateAll) { flag = NeedPopulateSharedProps(); flag2 = NeedPopulateNonSharedProps(); if (!flag && !flag2) { return; } } Microsoft.ReportingServices.ReportProcessing.Style styleClass = m_reportItemDef.StyleClass; StyleAttributeHashtable styleAttributeHashtable = null; if (styleClass != null) { styleAttributeHashtable = styleClass.StyleAttributes; } StyleAttributeHashtable styleAttributeHashtable2 = null; if (m_reportItem.HeadingInstance != null) { Global.Tracer.Assert(m_reportItem.HeadingInstance.MatrixHeadingDef.Subtotal.StyleClass != null); styleAttributeHashtable2 = m_reportItem.HeadingInstance.MatrixHeadingDef.Subtotal.StyleClass.StyleAttributes; } for (int i = 0; i < 42; i++) { string name = m_styleDefaults.GetName(i); if (styleAttributeHashtable == null && styleAttributeHashtable2 == null) { AddStyleProperty(name, isExpression: false, flag2, flag, m_styleDefaults[i]); } else if (styleAttributeHashtable2 != null && styleAttributeHashtable2.ContainsKey(name)) { AttributeInfo attribute = styleAttributeHashtable2[name]; AddStyleProperty(name, isExpression: true, needNonSharedProps: true, needSharedProps: false, CreatePropertyOrReturnDefault(name, GetStyleAttributeValue(name, attribute))); } else if (styleAttributeHashtable != null && styleAttributeHashtable.ContainsKey(name)) { AttributeInfo attributeInfo = styleAttributeHashtable[name]; AddStyleProperty(name, attributeInfo.IsExpression, flag2, flag, CreatePropertyOrReturnDefault(name, GetStyleAttributeValue(name, attributeInfo))); } else if ("BackgroundImage" == name) { Image.SourceType imageSource = Image.SourceType.External; object imageValue = null; object mimeType = null; bool isValueExpression = false; bool isMimeTypeExpression = false; bool flag3 = false; if (styleAttributeHashtable2 != null) { flag3 = GetBackgroundImageProperties(styleAttributeHashtable2["BackgroundImageSource"], styleAttributeHashtable2["BackgroundImageValue"], styleAttributeHashtable2["BackgroundImageMIMEType"], out imageSource, out imageValue, out isValueExpression, out mimeType, out isMimeTypeExpression); } if (!flag3 && styleAttributeHashtable != null) { flag3 = GetBackgroundImageProperties(styleAttributeHashtable["BackgroundImageSource"], styleAttributeHashtable["BackgroundImageValue"], styleAttributeHashtable["BackgroundImageMIMEType"], out imageSource, out imageValue, out isValueExpression, out mimeType, out isMimeTypeExpression); } object styleProperty; if (imageValue != null) { string mimeType2 = null; if (!isMimeTypeExpression) { mimeType2 = (string)mimeType; } styleProperty = new BackgroundImage(m_renderingContext, imageSource, imageValue, mimeType2); } else { styleProperty = m_styleDefaults[i]; } AddStyleProperty(name, isValueExpression || isMimeTypeExpression, flag2, flag, styleProperty); } else { AddStyleProperty(name, isExpression: false, flag2, flag, m_styleDefaults[i]); } } }
public override object this[string styleName] { get { if (base.IsCustomControl) { object obj = null; if (m_nonSharedProperties != null) { obj = m_nonSharedProperties[styleName]; } if (obj == null && m_sharedProperties != null) { obj = m_sharedProperties[styleName]; } return(CreatePropertyOrReturnDefault(styleName, obj)); } Global.Tracer.Assert(!base.IsCustomControl); if (m_reportItem.HeadingInstance == null && m_reportItemDef.StyleClass == null) { return(m_styleDefaults[styleName]); } StyleAttributeHashtable styleAttributeHashtable = null; if (m_reportItemDef.StyleClass != null) { styleAttributeHashtable = m_reportItemDef.StyleClass.StyleAttributes; } StyleAttributeHashtable styleAttributeHashtable2 = null; if (m_reportItem.HeadingInstance != null) { Global.Tracer.Assert(m_reportItem.HeadingInstance.MatrixHeadingDef.Subtotal.StyleClass != null); styleAttributeHashtable2 = m_reportItem.HeadingInstance.MatrixHeadingDef.Subtotal.StyleClass.StyleAttributes; } AttributeInfo attributeInfo = null; if ("BackgroundImage" == styleName) { Image.SourceType imageSource = Image.SourceType.External; object imageValue = null; object mimeType = null; bool isMimeTypeExpression = false; bool isValueExpression; if (styleAttributeHashtable2 != null) { GetBackgroundImageProperties(styleAttributeHashtable2["BackgroundImageSource"], styleAttributeHashtable2["BackgroundImageValue"], styleAttributeHashtable2["BackgroundImageMIMEType"], out imageSource, out imageValue, out isValueExpression, out mimeType, out isMimeTypeExpression); } if (imageValue == null && styleAttributeHashtable != null) { GetBackgroundImageProperties(styleAttributeHashtable["BackgroundImageSource"], styleAttributeHashtable["BackgroundImageValue"], styleAttributeHashtable["BackgroundImageMIMEType"], out imageSource, out imageValue, out isValueExpression, out mimeType, out isMimeTypeExpression); } if (imageValue != null) { string mimeType2 = null; if (!isMimeTypeExpression) { mimeType2 = (string)mimeType; } return(new BackgroundImage(m_renderingContext, imageSource, imageValue, mimeType2)); } } else { if (styleAttributeHashtable2 != null) { AttributeInfo attributeInfo2 = styleAttributeHashtable2[styleName]; if (attributeInfo2 != null) { return(CreatePropertyOrReturnDefault(styleName, GetStyleAttributeValue(styleName, attributeInfo2))); } } if (styleAttributeHashtable != null) { attributeInfo = styleAttributeHashtable[styleName]; if (attributeInfo != null) { return(CreatePropertyOrReturnDefault(styleName, GetStyleAttributeValue(styleName, attributeInfo))); } } } return(m_styleDefaults[styleName]); } }
public override void PopulateStyleProperties(bool populateAll) { if (!base.IsCustomControl) { bool flag = true; bool flag2 = false; if (populateAll) { flag = this.NeedPopulateSharedProps(); flag2 = this.NeedPopulateNonSharedProps(); if (!flag && !flag2) { return; } } AspNetCore.ReportingServices.ReportProcessing.Style styleClass = this.m_reportItemDef.StyleClass; StyleAttributeHashtable styleAttributeHashtable = null; if (styleClass != null) { styleAttributeHashtable = styleClass.StyleAttributes; } StyleAttributeHashtable styleAttributeHashtable2 = null; if (this.m_reportItem.HeadingInstance != null) { Global.Tracer.Assert(null != this.m_reportItem.HeadingInstance.MatrixHeadingDef.Subtotal.StyleClass); styleAttributeHashtable2 = this.m_reportItem.HeadingInstance.MatrixHeadingDef.Subtotal.StyleClass.StyleAttributes; } for (int i = 0; i < 42; i++) { string name = this.m_styleDefaults.GetName(i); if (styleAttributeHashtable == null && styleAttributeHashtable2 == null) { base.AddStyleProperty(name, false, flag2, flag, this.m_styleDefaults[i]); } else if (styleAttributeHashtable2 != null && styleAttributeHashtable2.ContainsKey(name)) { AttributeInfo attribute = styleAttributeHashtable2[name]; base.AddStyleProperty(name, true, true, false, this.CreatePropertyOrReturnDefault(name, this.GetStyleAttributeValue(name, attribute))); } else if (styleAttributeHashtable != null && styleAttributeHashtable.ContainsKey(name)) { AttributeInfo attributeInfo = styleAttributeHashtable[name]; base.AddStyleProperty(name, attributeInfo.IsExpression, flag2, flag, this.CreatePropertyOrReturnDefault(name, this.GetStyleAttributeValue(name, attributeInfo))); } else if ("BackgroundImage" == name) { Image.SourceType imageSource = Image.SourceType.External; object obj = null; object obj2 = null; bool flag3 = false; bool flag4 = false; bool flag5 = false; if (styleAttributeHashtable2 != null) { flag5 = base.GetBackgroundImageProperties(styleAttributeHashtable2["BackgroundImageSource"], styleAttributeHashtable2["BackgroundImageValue"], styleAttributeHashtable2["BackgroundImageMIMEType"], out imageSource, out obj, out flag3, out obj2, out flag4); } if (!flag5 && styleAttributeHashtable != null) { flag5 = base.GetBackgroundImageProperties(styleAttributeHashtable["BackgroundImageSource"], styleAttributeHashtable["BackgroundImageValue"], styleAttributeHashtable["BackgroundImageMIMEType"], out imageSource, out obj, out flag3, out obj2, out flag4); } object styleProperty; if (obj != null) { string mimeType = null; if (!flag4) { mimeType = (string)obj2; } styleProperty = new BackgroundImage(base.m_renderingContext, imageSource, obj, mimeType); } else { styleProperty = this.m_styleDefaults[i]; } base.AddStyleProperty(name, flag3 | flag4, flag2, flag, styleProperty); } else { base.AddStyleProperty(name, false, flag2, flag, this.m_styleDefaults[i]); } } } }