예제 #1
0
파일: File.cs 프로젝트: gnrr/draw-test
 static void writeXML(List<Shape> shapes, string path)
 {
     Record rec = new Record();
     rec.shapes = shapes;
     System.IO.FileStream f =
         new System.IO.FileStream(path, System.IO.FileMode.Create);
     System.Xml.Serialization.XmlSerializer serializer =
         new System.Xml.Serialization.XmlSerializer(typeof(Record));
     foreach (Shape sh in shapes)
     {
         serializer.Serialize(f, sh);
     }
     f.Close();
 }