bool _ConstantImage;            // true if constant image

        internal StyleBackgroundImage(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _Source           = StyleBackgroundImageSourceEnum.Unknown;
            _Value            = null;
            _MIMEType         = null;
            _BackgroundRepeat = null;
            _ConstantImage    = false;

            // Loop thru all the child nodes
            foreach (XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                {
                    continue;
                }
                switch (xNodeLoop.Name)
                {
                case "Source":
                    _Source = StyleBackgroundImageSource.GetStyle(xNodeLoop.InnerText);
                    break;

                case "Value":
                    _Value = new Expression(r, this, xNodeLoop, ExpressionType.String);
                    break;

                case "MIMEType":
                    _MIMEType = new Expression(r, this, xNodeLoop, ExpressionType.String);
                    break;

                case "BackgroundRepeat":
                    _BackgroundRepeat = new Expression(r, this, xNodeLoop, ExpressionType.Enum);
                    break;

                default:
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown BackgroundImage element '" + xNodeLoop.Name + "' ignored.");
                    break;
                }
            }
            if (_Source == StyleBackgroundImageSourceEnum.Unknown)
            {
                OwnerReport.rl.LogError(8, "BackgroundImage requires the Source element.");
            }
            if (_Value == null)
            {
                OwnerReport.rl.LogError(8, "BackgroundImage requires the Value element.");
            }
        }
Beispiel #2
0
		bool _ConstantImage;	// true if constant image
	
		internal StyleBackgroundImage(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
		{
			_Source=StyleBackgroundImageSourceEnum.Unknown;
			_Value=null;
			_MIMEType=null;
			_BackgroundRepeat=null;
			_ConstantImage=false;

			// Loop thru all the child nodes
			foreach(XmlNode xNodeLoop in xNode.ChildNodes)
			{
				if (xNodeLoop.NodeType != XmlNodeType.Element)
					continue;
				switch (xNodeLoop.Name)
				{
					case "Source":
						_Source = StyleBackgroundImageSource.GetStyle(xNodeLoop.InnerText);
						break;
					case "Value":
						_Value = new Expression(r, this, xNodeLoop, ExpressionType.String);
						break;
					case "MIMEType":
						_MIMEType = new Expression(r, this, xNodeLoop, ExpressionType.String);
						break;
					case "BackgroundRepeat":
						_BackgroundRepeat = new Expression(r, this, xNodeLoop, ExpressionType.Enum);
						break;
					default:	
						// don't know this element - log it
						OwnerReport.rl.LogError(4, "Unknown BackgroundImage element '" + xNodeLoop.Name + "' ignored.");
						break;
				}
			}
			if (_Source == StyleBackgroundImageSourceEnum.Unknown)
				OwnerReport.rl.LogError(8, "BackgroundImage requires the Source element.");
			if (_Value == null)
				OwnerReport.rl.LogError(8, "BackgroundImage requires the Value element.");
			
		}