Ejemplo n.º 1
0
        public void onClick()
        {
            EventPublisher.Publish(new EICloseOtherPanels <GameObject>(gameObject));
            string   dataFolderPath = FileBrowser.OpenSingleFolder("Open folder containing Noides.csv and Edges.csv") + "/";
            EIImport importEI       = new EIImport(dataFolderPath, "csv");

            EventPublisher.Publish(importEI);
        }
Ejemplo n.º 2
0
        void onImport(EIImport ei)
        {
            ElementRecords elementRecords;

            if (importer.TryGetElementRecords(ei.getDataFolderPath(), ei.getFileFormat(), out elementRecords))
            {
                this.graph.Empty();

                Node[] nodes = this.nodeFactory.make(elementRecords.GetNodeRecords());
                this.graph.AddNodes(nodes);

                Edge[] edges = this.edgeFactory.make(elementRecords.GetEdgeRecords());
                this.graph.AddEdges(edges);
            }
        }