Пример #1
0
        public void LoadXML(XmlReader reader)
        {
            _GradientSegments.Clear();
            XMLHelpers.ReadOrbitType(reader, "orbitType", ref _OrbitType);
            XMLHelpers.ReadBlendType(reader, "blendType", ref _BlendType);
            XMLHelpers.ReadDouble(reader, "multiplier", ref _Multiplier);
            XMLHelpers.ReadDouble(reader, "offset", ref _Offset);
            XMLHelpers.ReadDouble(reader, "power", ref _Power);

            while (reader.NodeType != XmlNodeType.EndElement && reader.Read())
            {
                if (reader.NodeType == XmlNodeType.Element && reader.Name == "GRADIENTSEGMENT")
                {
                    GradientSegment seg = new GradientSegment();
                    seg.LoadXML(reader);
                    _GradientSegments.Add(seg);
                }
            }

            // backwards compatability
            if (_GradientSegments.Count() == 0)
            {
                _GradientSegments.Add(new GradientSegment());
            }

            reader.Read();
        }