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))); } } } }
public ShimBackgroundImageInstance(BackgroundImage backgroundImageDef, AspNetCore.ReportingServices.ReportRendering.BackgroundImage renderImage, string backgroundRepeat) : base(null) { this.m_backgroundImageDef = backgroundImageDef; this.m_renderImage = renderImage; this.m_backgroundRepeat = StyleTranslator.TranslateBackgroundRepeat(backgroundRepeat, null, this.m_backgroundImageDef.StyleDef.IsDynamicImageStyle); }
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))); } } } }
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]); } } } }