コード例 #1
0
        public string Generate(MXGraph graph)
        {
            XmlDocument xmlDocument = new XmlDocument();
            var         rootElement = SetupDocument(xmlDocument);

            RecursivelyCreateNodes(xmlDocument, rootElement, graph.RootNode, new Dictionary <MXNode, XmlElement>(), new Dictionary <MXNodeConnection, XmlElement>());

            return(GenerateXmlString(xmlDocument));
        }
コード例 #2
0
        public MXGraph ConvertToMXGraph(DrawState drawState)
        {
            var graph = new MXGraph();

            graph.RootNode = new MXNode
            {
                NodeText = "GRAPH GENERATED BY INTERFURCREATIONS",
            };

            var firstNode = RecursivelyConvert(drawState, graph.RootNode, new Dictionary <string, MXNode>(), 50, 50);

            graph.RootNode.Connections = new List <MXNodeConnection>
            {
                new MXNodeConnection
                {
                    ConnectionText = "",
                    ResultNode     = firstNode
                }
            };

            return(graph);
        }