Exemplo n.º 1
0
        private void InternalPopulateNonSharedStyleProperties(StyleAttributeHashtable styleAttributes)
        {
            if (styleAttributes == null)
            {
                return;
            }
            IDictionaryEnumerator enumerator = styleAttributes.GetEnumerator();

            while (enumerator.MoveNext())
            {
                AttributeInfo attributeInfo = (AttributeInfo)enumerator.Value;
                string        text          = (string)enumerator.Key;
                if ("BackgroundImageSource" == text)
                {
                    if (GetBackgroundImageProperties(attributeInfo, styleAttributes["BackgroundImageValue"], styleAttributes["BackgroundImageMIMEType"], out Image.SourceType imageSource, out object imageValue, out bool isValueExpression, out object mimeType, out bool isMimeTypeExpression) && (isValueExpression || isMimeTypeExpression) && imageValue != null)
                    {
                        string mimeType2 = null;
                        if (!isMimeTypeExpression)
                        {
                            mimeType2 = (string)mimeType;
                        }
                        object styleProperty = new BackgroundImage(m_renderingContext, imageSource, imageValue, mimeType2);
                        SetStyleProperty("BackgroundImage", isExpression: true, needNonSharedProps: true, needSharedProps: false, styleProperty);
                    }
                }
                else if (!("BackgroundImageValue" == text) && !("BackgroundImageMIMEType" == text) && attributeInfo.IsExpression)
                {
                    SetStyleProperty(text, isExpression: true, needNonSharedProps: true, needSharedProps: false, CreateProperty(text, GetStyleAttributeValue(text, attributeInfo)));
                }
            }
        }
Exemplo n.º 2
0
 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)));
             }
         }
     }
 }
Exemplo n.º 3
0
        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)));
                }
            }
        }
Exemplo n.º 4
0
 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);
     }
 }
Exemplo n.º 5
0
 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)));
             }
         }
     }
 }
Exemplo n.º 6
0
 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);
     }
 }
Exemplo n.º 7
0
 private void PopulateNonSharedStyleProperties()
 {
     if (!base.IsCustomControl)
     {
         Microsoft.ReportingServices.ReportProcessing.Style styleClass = m_actionInfo.ActionInfoDef.StyleClass;
         if (styleClass != null)
         {
             StyleAttributeHashtable styleAttributes = styleClass.StyleAttributes;
             Global.Tracer.Assert(styleAttributes != null);
             InternalPopulateNonSharedStyleProperties(styleAttributes);
         }
     }
 }
Exemplo n.º 8
0
        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);
        }
Exemplo n.º 9
0
        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);
        }
Exemplo n.º 10
0
 private void PopulateNonSharedStyleProperties()
 {
     if (!base.IsCustomControl)
     {
         Microsoft.ReportingServices.ReportProcessing.Style styleClass = m_reportItemDef.StyleClass;
         if (styleClass != null)
         {
             StyleAttributeHashtable styleAttributes = styleClass.StyleAttributes;
             Global.Tracer.Assert(styleAttributes != null);
             InternalPopulateNonSharedStyleProperties(styleAttributes, isSubtotal: false);
         }
         if (m_reportItem.HeadingInstance != null)
         {
             Global.Tracer.Assert(m_reportItem.HeadingInstance.MatrixHeadingDef.Subtotal.StyleClass != null);
             StyleAttributeHashtable styleAttributes2 = m_reportItem.HeadingInstance.MatrixHeadingDef.Subtotal.StyleClass.StyleAttributes;
             InternalPopulateNonSharedStyleProperties(styleAttributes2, isSubtotal: true);
         }
     }
 }
Exemplo n.º 11
0
 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);
         }
     }
 }
Exemplo n.º 12
0
        internal AttributeInfo GetStyleDefinition(string styleName, out string expressionString)
        {
            expressionString = null;
            if (base.IsCustomControl)
            {
                return(null);
            }
            if (m_reportItem.HeadingInstance == null && m_reportItemDef.StyleClass == null)
            {
                return(null);
            }
            StyleAttributeHashtable styleAttributeHashtable = null;
            ExpressionInfoList      expressionInfoList      = null;

            if (m_reportItem.HeadingInstance != null)
            {
                Global.Tracer.Assert(m_reportItem.HeadingInstance.MatrixHeadingDef.Subtotal.StyleClass != null);
                styleAttributeHashtable = m_reportItem.HeadingInstance.MatrixHeadingDef.Subtotal.StyleClass.StyleAttributes;
                expressionInfoList      = m_reportItem.HeadingInstance.MatrixHeadingDef.Subtotal.StyleClass.ExpressionList;
            }
            AttributeInfo attributeInfo = null;

            if ((styleAttributeHashtable == null || !styleAttributeHashtable.ContainsKey(styleName)) && m_reportItemDef.StyleClass != null)
            {
                styleAttributeHashtable = m_reportItemDef.StyleClass.StyleAttributes;
                expressionInfoList      = m_reportItemDef.StyleClass.ExpressionList;
            }
            if (styleAttributeHashtable != null)
            {
                attributeInfo = styleAttributeHashtable[styleName];
                if (attributeInfo != null && attributeInfo.IsExpression)
                {
                    expressionString = expressionInfoList[attributeInfo.IntValue].OriginalText;
                }
            }
            return(attributeInfo);
        }
Exemplo n.º 13
0
        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]);
                }
            }
        }
Exemplo n.º 14
0
 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]);
     }
 }
Exemplo n.º 15
0
 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]);
             }
         }
     }
 }
Exemplo n.º 16
0
 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]);
     }
 }