Exemplo n.º 1
0
        private void nodeClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            string fullPath = e.Node.FullPath;

            if (fullPath.ToLower().EndsWith(".sln"))
            {
                Solution sol = new Solution();
                sol.read(fullPath);
                string    tempfile   = "temp.dot";
                string    retempfile = "retemp.dot";
                DotWriter dotWriter  = new DotWriter(tempfile);
                sol.writeDepsInDotCodeForSolution(dotWriter.dotFile);
                dotWriter.Close();
                DotWriter.reduceDotfile(tempfile, retempfile);

                string pngtemp = "temp.png";
                DotWriter.createPngFromDot(retempfile, pngtemp);
                this.nwImageViewer1.LoadImage(pngtemp);
                this.nwImageViewer1.Invalidate();
            }
        }