//public static void SavePlayer(Game.PBPlayer player, XmlWriter writer) // 11-04-2010 Scott //{ // writer.WriteStartDocument(); // writer.WriteStartElement("Player"); // WriteFigureList(player.GetPathFigure(player,null), writer); // writer.WriteEndElement(); // writer.WriteEndDocument(); //} //public static string SavePlayer(Game.PBPlayer player) // 11-04-2010 Scott //{ // var s = new StringBuilder(); // using (var w = XmlWriter.Create(s, new XmlWriterSettings() // { // Indent = true, // })) // { // SavePlayer(player, w); // } // return s.ToString(); //} public static void SaveDrawing(Drawing drawing, XmlWriter writer) { writer.WriteStartDocument(); writer.WriteStartElement("Drawing"); writer.WriteAttributeString("Title", drawing.Title.ToString()); writer.WriteAttributeString("BackgroundPath", drawing.BackgroundPath); writer.WriteAttributeDouble("YardLine", drawing.YardLine); // 01-20-2012 Scott WriteFigureList(drawing.GetSerializableFigures(), writer); writer.WriteEndElement(); writer.WriteEndDocument(); }