Пример #1
0
        public override void ReadXml(System.Xml.XmlReader reader)
        {
            reader.ReadAttrAsColor("Color", ref this.Color);
            this.Text = reader["Text"];
            this.FontId = reader["FontId"];
			reader.ReadAttrAsEnum<XFlipEffects>("FlipEffects", ref this.FlipEffects);

            base.ReadXml(reader);
        }
Пример #2
0
        public override void ReadXml(System.Xml.XmlReader reader)
        {
            Color color = Color.White;
            double f = 0;

            reader.ReadAttrAsBoolean("IsRoot", ref this.IsRoot);
            reader.ReadAttrAsFloat("Opacity", ref this.Opacity);
            reader.ReadAttrAsFloat("Rotation", ref this.Rotation);
            reader.ReadAttrAsVector2("ScaleVector", ref this.ScaleVector);

            reader.ReadAttrAsRectF("Bounds", ref this.Bounds);
            if (reader.ReadAttrAsColor("BackColor", ref color))
                this.BackColor = color;
            if (reader.ReadAttrAsVector2("Origin", ref tmpVector1))
                this.Origin = tmpVector1;
            if (reader.ReadAttrAsVector2("RotationCenter", ref tmpVector1))
                this.RotationCenter = tmpVector1;
            if (reader.ReadAttrAsFloat("Scale", ref f))
                this.Scale = f;
            if (reader.ReadAttrAsFloat("Depth", ref f))
                this.Depth = (float)f;
            if (reader.ReadAttrAsVector2("Location", ref tmpVector1))
                this.Location = tmpVector1;
            if (reader.ReadAttrAsVector2("Center", ref tmpVector1))
                this.Center = tmpVector1;

            base.ReadXml(reader);
        }