Пример #1
0
        /// <summary>
        /// Obtiene la informacion de una imagen en formato base64
        /// </summary>
        /// <returns></returns>
        public string GetAsImage64()
        {
            String sdot = GetASDOT();

            DOT dot = new DOT();

            BinaryImage img = dot.ToPNG(sdot);

            img.Save(Path.Combine(folder, fname));

            return(img.ToBase64String());
        }
Пример #2
0
 public static void generarOtraImagen(ParseTreeNode raiz)
 {
     try
     {
         String      grafo_en_DOT = ControlDOT.ControlDOT.getDOT2(raiz);
         DOT         dot          = new DOT();
         BinaryImage img          = dot.ToPNG(grafo_en_DOT);
         img.Save("C:/Users/pablo/Desktop/Compi Junio/[Compi1]Practica1/[Compi1]Practica1/imagenes/ASA.png");
         MessageBox.Show("Se creó el ASA.");
     }
     catch (Exception)
     {
         MessageBox.Show("No se creó el ASA.");
     }
 }
Пример #3
0
 public static void generarImagenEXP(ParseTreeNode raiz, int numero)
 {
     try
     {
         String      grafo_en_DOT = Programa.DibujarEXP(raiz);
         DOT         dot          = new DOT();
         BinaryImage img          = dot.ToPNG(grafo_en_DOT);
         img.Save("C:/Users/pablo/Desktop/CompiJunio/[Compi1]Proyecto2/[Compi1]Proyecto2/imagenes/EXP" + numero + ".png");
         MessageBox.Show("Se creó el EXP" + numero + ".");
         Programa.sw.WriteLine("<tr>");
         Programa.sw.WriteLine("<th>DibujarEXP: AST de una expresion en particular</th>");
         Programa.sw.WriteLine("<th>EXP_" + numero + "</th>");
         Programa.sw.WriteLine("<th><img src=" + "\"" + "[Compi1]Proyecto2/imagenes/EXP" + numero + ".png" + "\"" + "></th>");
         Programa.sw.WriteLine("</tr>");
     }
     catch (Exception)
     {
         MessageBox.Show("No se creó el EXP" + numero + ".");
     }
 }
Пример #4
0
 public static void generarImagenAST(ParseTreeNode raiz, String nombre)
 {
     try
     {
         String      grafo_en_DOT = Programa.DibujarAST(raiz);
         DOT         dot          = new DOT();
         BinaryImage img          = dot.ToPNG(grafo_en_DOT);
         img.Save("C:/Users/pablo/Desktop/CompiJunio/[Compi1]Proyecto2/[Compi1]Proyecto2/imagenes/AST" + nombre + ".png");
         MessageBox.Show("Se creó el AST del " + nombre + ".");
         Programa.sw.WriteLine("<tr>");
         Programa.sw.WriteLine("<th>DibujarAST: AST de una funcion en particular</th>");
         Programa.sw.WriteLine("<th>AST_" + nombre + "</th>");
         Programa.sw.WriteLine("<th><img src=" + "\"" + "[Compi1]Proyecto2/imagenes/AST" + nombre + ".png" + "\"" + "></th>");
         Programa.sw.WriteLine("</tr>");
     }
     catch (Exception)
     {
         MessageBox.Show("No se creó el AST del " + nombre + ".");
     }
 }