예제 #1
0
            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);
            }
예제 #2
0
            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));
            }