Exemplo n.º 1
0
        public void Save(IVirtualFile file)
        {
            XmlDocument doc = XmlTool.CreateDocument("Diagram");

            foreach (DiagramTableItem item in Tables)
            {
                item.Save(XmlTool.AddChild(doc.DocumentElement, "Table"));
            }
            //XmlElement stx = XmlTool.AddChild(doc.DocumentElement, "Style");
            //ObjectDiff.SaveDiff(Style, new DiagramStyle(), stx);
            Style.SaveToXml(doc.DocumentElement.AddChild("Style"));
            using (StringWriter sw = new StringWriter())
            {
                doc.Save(sw);
                file.SaveText(sw.ToString());
            }
        }