From: jpbruyere Date: Tue, 2 Feb 2016 11:17:36 +0000 (+0100) Subject: Revert "removed ixmlserializable from color, not functionnal" X-Git-Tag: 0.3~79 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=73b7c1d82226e4d10708e858a011991e3f598655;p=jp%2Fcrow.git Revert "removed ixmlserializable from color, not functionnal" This reverts commit e09e8bcea8a18c5ae7e8032c071fa050171507ea. --- diff --git a/src/Colors.cs b/src/Colors.cs index b83a2a96..bfedf711 100644 --- a/src/Colors.cs +++ b/src/Colors.cs @@ -1027,6 +1027,25 @@ namespace Crow public static readonly Color Zaffre = new Color(0,0.0784313725490196,0.658823529411765,1.0,"Zaffre"); public static readonly Color ZinnwalditeBrown = new Color(0.172549019607843,0.0862745098039216,0.0313725490196078,1.0,"ZinnwalditeBrown"); #endregion + + #region IXmlSerializable + public void ReadXml(System.Xml.XmlReader reader) + { + string[] c = reader["Color"].Split(new char[] { ';' }); + R = double.Parse(c[0]); + G = double.Parse(c[1]); + B = double.Parse(c[2]); + A = double.Parse(c[3]); + } + public void WriteXml(System.Xml.XmlWriter writer) + { + writer.WriteAttributeString("Color", this.ToString()); + } + public System.Xml.Schema.XmlSchema GetSchema() + { + return null; + } + #endregion public override string ToString() {