private static void Write(NodeGroup group, XContainer root) { var g = new XElement("Group"); foreach (var node in group.Contents) { g.Add(new XElement("Node", new XAttribute("Id", node.Serialized()))); } NodeUIDataSerializerXml.WriteArea(group.Renderer.Area, g); root.Add(g); }
public ConversationEditorData Read(XElement node) { var groupsResult = new List <NodeGroup>(); foreach (var g in node.Elements("Group")) { var contents = g.Elements("Node").Select(n => Id <NodeTemp> .Parse(n.Attribute("Id").Value)); System.Drawing.RectangleF area = NodeUIDataSerializerXml.ReadArea(g); groupsResult.Add(new NodeGroup(area, contents)); } return(new ConversationEditorData(groupsResult)); }