예제 #1
0
 public static void AddStyle(byte rplId, ReportColorProperty prop, StyleWriter writer)
 {
     if (prop != null && prop.Value != null)
     {
         writer.Write(rplId, prop.Value.ToString());
     }
 }
예제 #2
0
        public static Color GetColorProp(byte rplId, StyleAttributeNames styleAttributeName, Color defaultColor, Style styleDef, Dictionary <byte, object> styles)
        {
            object obj = null;

            if (styles != null && styles.TryGetValue(rplId, out obj))
            {
                string text = obj as string;
                if (text != null)
                {
                    ReportColor reportColor = new ReportColor(text);
                    return(reportColor.ToColor());
                }
            }
            ReportColorProperty reportColorProperty = ((StyleBase)styleDef)[styleAttributeName] as ReportColorProperty;

            if (reportColorProperty != null && !reportColorProperty.IsExpression)
            {
                ReportColor value = reportColorProperty.Value;
                if (value != null)
                {
                    return(value.ToColor());
                }
            }
            return(defaultColor);
        }
예제 #3
0
        internal static Color GetColorProp(byte rplId, StyleAttributeNames styleAttributeName, Color defaultColor, Style styleDef, Dictionary <byte, object> styles)
        {
            object value = null;

            if (styles != null && styles.TryGetValue(rplId, out value))
            {
                string text = value as string;
                if (text != null)
                {
                    return(new ReportColor(text).ToColor());
                }
            }
            ReportColorProperty reportColorProperty = styleDef[styleAttributeName] as ReportColorProperty;

            if (reportColorProperty != null && !reportColorProperty.IsExpression)
            {
                ReportColor value2 = reportColorProperty.Value;
                if (value2 != null)
                {
                    return(value2.ToColor());
                }
            }
            return(defaultColor);
        }