public static object GetStyleValueBase(string styleName, AspNetCore.ReportingServices.ReportProcessing.Style styleDef, object[] styleAttributeValues) { if (styleDef != null) { AttributeInfo attributeInfo = styleDef.StyleAttributes[styleName]; if (attributeInfo != null) { object obj = null; if (attributeInfo.IsExpression) { if (styleAttributeValues != null) { Global.Tracer.Assert(0 <= attributeInfo.IntValue && attributeInfo.IntValue < styleAttributeValues.Length); obj = styleAttributeValues[attributeInfo.IntValue]; } else { obj = null; } } else { obj = ((!("NumeralVariant" == styleName)) ? attributeInfo.Value : ((object)attributeInfo.IntValue)); } if (obj != null) { return(StyleBase.CreateStyleProperty(styleName, obj)); } } } 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))); } } } }
private void PopulateNonSharedStyleProperties() { if (!base.IsCustomControl) { AspNetCore.ReportingServices.ReportProcessing.Style styleClass = this.m_actionInfo.ActionInfoDef.StyleClass; if (styleClass != null) { StyleAttributeHashtable styleAttributes = styleClass.StyleAttributes; Global.Tracer.Assert(null != styleAttributes); this.InternalPopulateNonSharedStyleProperties(styleAttributes); } } }
public static object GetStyleValue(string styleName, AspNetCore.ReportingServices.ReportProcessing.Style styleDef, object[] styleAttributeValues, bool returnDefaultStyle) { object styleValueBase = StyleBase.GetStyleValueBase(styleName, styleDef, styleAttributeValues); if (styleValueBase != null) { return(styleValueBase); } if (returnDefaultStyle) { return(Style.NormalStyleDefaults[styleName]); } return(null); }
private void PopulateNonSharedStyleProperties() { if (!base.IsCustomControl) { AspNetCore.ReportingServices.ReportProcessing.Style styleClass = this.m_reportItemDef.StyleClass; if (styleClass != null) { StyleAttributeHashtable styleAttributes = styleClass.StyleAttributes; Global.Tracer.Assert(null != styleAttributes); this.InternalPopulateNonSharedStyleProperties(styleAttributes, false); } if (this.m_reportItem.HeadingInstance != null) { Global.Tracer.Assert(null != this.m_reportItem.HeadingInstance.MatrixHeadingDef.Subtotal.StyleClass); StyleAttributeHashtable styleAttributes2 = this.m_reportItem.HeadingInstance.MatrixHeadingDef.Subtotal.StyleClass.StyleAttributes; this.InternalPopulateNonSharedStyleProperties(styleAttributes2, true); } } }
public override object GetStyleAttributeValue(string styleName, AttributeInfo attribute) { if (this.m_reportItem.HeadingInstance != null) { AspNetCore.ReportingServices.ReportProcessing.Style styleClass = this.m_reportItem.HeadingInstance.MatrixHeadingDef.Subtotal.StyleClass; Global.Tracer.Assert(null != styleClass); AttributeInfo attributeInfo = styleClass.StyleAttributes[styleName]; if (attributeInfo != null) { if (attributeInfo.IsExpression) { MatrixSubtotalHeadingInstanceInfo matrixSubtotalHeadingInstanceInfo = this.m_reportItem.HeadingInstance.GetInstanceInfo(this.m_reportItem.RenderingContext.ChunkManager) as MatrixSubtotalHeadingInstanceInfo; Global.Tracer.Assert(null != matrixSubtotalHeadingInstanceInfo); Global.Tracer.Assert(null != matrixSubtotalHeadingInstanceInfo.StyleAttributeValues); Global.Tracer.Assert(0 <= attributeInfo.IntValue && attributeInfo.IntValue < matrixSubtotalHeadingInstanceInfo.StyleAttributeValues.Length); return(matrixSubtotalHeadingInstanceInfo.StyleAttributeValues[attributeInfo.IntValue]); } if ("NumeralVariant" == styleName) { return(attributeInfo.IntValue); } return(attributeInfo.Value); } } if (attribute.IsExpression) { ReportItemInstanceInfo instanceInfo = this.m_reportItem.InstanceInfo; if (instanceInfo != null) { return(instanceInfo.GetStyleAttributeValue(attribute.IntValue)); } return(null); } if ("NumeralVariant" == styleName) { return(attribute.IntValue); } return(attribute.Value); }
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]); } } } }
public static object GetStyleValue(string styleName, AspNetCore.ReportingServices.ReportProcessing.Style styleDef, object[] styleAttributeValues) { return(Style.GetStyleValue(styleName, styleDef, styleAttributeValues, true)); }
public void Deconstruct(int uniqueName, ref AspNetCore.ReportingServices.ReportProcessing.Action action, out ActionInstance actionInstance, AspNetCore.ReportingServices.ReportProcessing.CustomReportItem context) { Global.Tracer.Assert(this.IsCustomControl && null != context); actionInstance = null; if (this.Processing.m_actionCollection == null || this.Processing.m_actionCollection.Count == 0) { if (action != null) { Global.Tracer.Assert(action.ActionItems != null && 0 < action.ActionItems.Count); int count = action.ActionItems.Count; actionInstance = new ActionInstance(); actionInstance.UniqueName = uniqueName; actionInstance.ActionItemsValues = new ActionItemInstanceList(count); for (int i = 0; i < count; i++) { ActionItemInstance actionItemInstance = new ActionItemInstance(); if (action.ActionItems[i].DrillthroughParameters != null) { int count2 = action.ActionItems[i].DrillthroughParameters.Count; actionItemInstance.DrillthroughParametersValues = new object[count2]; actionItemInstance.DrillthroughParametersOmits = new BoolList(count2); } actionInstance.ActionItemsValues.Add(actionItemInstance); } } } else { bool flag = null == action; int count3 = this.Processing.m_actionCollection.Count; Global.Tracer.Assert(1 <= count3); if (flag) { action = new AspNetCore.ReportingServices.ReportProcessing.Action(); action.ActionItems = new ActionItemList(count3); action.ComputedActionItemsCount = count3; } else if (count3 != action.ComputedActionItemsCount) { context.ProcessingContext.ErrorContext.Register(ProcessingErrorCode.rsCRIRenderItemProperties, Severity.Error, context.CustomObjectType, context.CustomObjectName, context.Type, context.Name, "Actions", action.ComputedActionItemsCount.ToString(CultureInfo.InvariantCulture), count3.ToString(CultureInfo.InvariantCulture)); throw new ReportProcessingException(context.ProcessingContext.ErrorContext.Messages); } actionInstance = new ActionInstance(); actionInstance.UniqueName = uniqueName; actionInstance.ActionItemsValues = new ActionItemInstanceList(count3); for (int j = 0; j < count3; j++) { Action action2 = this.Processing.m_actionCollection[j]; ActionItem actionItem = null; if (flag) { actionItem = new ActionItem(); actionItem.ComputedIndex = j; actionItem.Label = new ExpressionInfo(ExpressionInfo.Types.Expression); switch (action2.m_actionType) { case ActionType.HyperLink: actionItem.HyperLinkURL = new ExpressionInfo(ExpressionInfo.Types.Expression); break; case ActionType.DrillThrough: actionItem.DrillthroughReportName = new ExpressionInfo(ExpressionInfo.Types.Expression); if (action2.m_parameters != null && 0 < action2.m_parameters.Count) { int count4 = action2.m_parameters.Count; actionItem.DrillthroughParameters = new ParameterValueList(count4); for (int k = 0; k < count4; k++) { ParameterValue parameterValue = new ParameterValue(); parameterValue.Name = action2.m_parameters.GetKey(k); parameterValue.Omit = new ExpressionInfo(ExpressionInfo.Types.Constant); parameterValue.Omit.BoolValue = false; parameterValue.Value = new ExpressionInfo(ExpressionInfo.Types.Expression); actionItem.DrillthroughParameters.Add(parameterValue); } } break; case ActionType.BookmarkLink: actionItem.BookmarkLink = new ExpressionInfo(ExpressionInfo.Types.Expression); break; } action.ActionItems.Add(actionItem); } else { actionItem = action.ActionItems[j]; } Global.Tracer.Assert(null != actionItem); ActionItemInstance actionItemInstance2 = new ActionItemInstance(); actionItemInstance2.Label = action2.Processing.m_label; switch (action2.m_actionType) { case ActionType.HyperLink: actionItemInstance2.HyperLinkURL = action2.Processing.m_action; break; case ActionType.DrillThrough: actionItemInstance2.DrillthroughReportName = action2.Processing.m_action; if (action2.m_parameters != null) { int count5 = action2.m_parameters.Count; if (actionItem.DrillthroughParameters == null && 0 < count5) { context.ProcessingContext.ErrorContext.Register(ProcessingErrorCode.rsCRIRenderItemProperties, Severity.Error, context.CustomObjectType, context.CustomObjectName, context.Type, context.Name, "Action.DrillthroughParameters", "0", count5.ToString(CultureInfo.InvariantCulture)); throw new ReportProcessingException(context.ProcessingContext.ErrorContext.Messages); } if (count5 != actionItem.DrillthroughParameters.Count) { context.ProcessingContext.ErrorContext.Register(ProcessingErrorCode.rsCRIRenderItemProperties, Severity.Error, context.CustomObjectType, context.CustomObjectName, context.Type, context.Name, "Action.DrillthroughParameters", actionItem.DrillthroughParameters.Count.ToString(CultureInfo.InvariantCulture), count5.ToString(CultureInfo.InvariantCulture)); throw new ReportProcessingException(context.ProcessingContext.ErrorContext.Messages); } Global.Tracer.Assert(0 < count5); actionItemInstance2.DrillthroughParametersValues = new object[count5]; actionItemInstance2.DrillthroughParametersOmits = new BoolList(count5); DrillthroughParameters drillthroughParameters = new DrillthroughParameters(count5); for (int l = 0; l < count5; l++) { actionItemInstance2.DrillthroughParametersValues[l] = action2.m_parameters.GetValues(l); actionItemInstance2.DrillthroughParametersOmits.Add(false); drillthroughParameters.Add(actionItem.DrillthroughParameters[l].Name, actionItemInstance2.DrillthroughParametersValues[l]); } DrillthroughInformation drillthroughInfo = new DrillthroughInformation(actionItemInstance2.DrillthroughReportName, drillthroughParameters, null); string drillthroughId = uniqueName.ToString(CultureInfo.InvariantCulture) + ":" + j.ToString(CultureInfo.InvariantCulture); context.ProcessingContext.DrillthroughInfo.AddDrillthrough(drillthroughId, drillthroughInfo); } break; case ActionType.BookmarkLink: actionItemInstance2.BookmarkLink = action2.Processing.m_action; break; } actionInstance.ActionItemsValues.Add(actionItemInstance2); } Global.Tracer.Assert(action != null && actionInstance != null && null != this.Processing.m_actionCollection); AspNetCore.ReportingServices.ReportProcessing.Style styleClass = action.StyleClass; object[] styleAttributeValues = null; AspNetCore.ReportingServices.ReportProcessing.CustomReportItem.DeconstructRenderStyle(flag, this.Processing.m_sharedStyles, this.Processing.m_nonSharedStyles, ref styleClass, out styleAttributeValues, context); action.StyleClass = styleClass; actionInstance.StyleAttributeValues = styleAttributeValues; } }