Example #1
0
        public static string Imprimir()
        {
            String cadena  = "";
            String retorno = "Error cadena vacia";

            if (Sello.TryParse(Sello.mensaje, out cadena))
            // if (Sello.TryParse(Sello.mensaje))
            {
                Sello.mensaje = cadena;
                retorno       = Sello.ArmarFormatoMensaje();
            }

            return(retorno);
        }
Example #2
0
        public static string Imprimir()
        {
            string cadena;
            string retorno;

            if (Sello.TryParse(Sello.mensaje, out cadena))
            {
                Sello.mensaje = cadena;
                retorno       = Sello.ArnarFormatoMensaje(Sello.mensaje);
            }
            else
            {
                retorno = Sello.mensaje;
            }
            return(retorno);
        }
Example #3
0
        private static string ArmarFormatoMensaje()
        {
            int    cantidad;
            string a = "";
            int    i;
            string cadena = "";

            if (Sello.TryParse(Sello.mensaje, out cadena))
            {
                Sello.mensaje = cadena;


                cantidad = Sello.mensaje.Length;

                cantidad = cantidad + 2;

                for (i = 0; i < cantidad; i++)
                {
                    a = a + "*";
                }
                a = a + "\n";
                a = a + "*";
                a = a + Sello.mensaje;
                a = a + "*\n";

                for (i = 0; i < cantidad; i++)
                {
                    a = a + "*";
                }
            }
            else
            {
                Console.BackgroundColor = ConsoleColor.Red;
                Console.WriteLine("No hay mensaje para imprimir");
                Console.BackgroundColor = ConsoleColor.DarkGray;
            }
            return(a);
        }
Example #4
0
 public static void ImprimirEnColor()
 {
     Console.ForegroundColor = Sello.Color;
     Console.WriteLine(Sello.Imprimir());
     Console.ForegroundColor = ConsoleColor.Gray;
 }
Example #5
0
 public static string Imprimir()
 {
     return(Sello.ArmarFormatoMensaje());
 }
Example #6
0
 public static void ImprimirEnColor()
 {
     Console.ForegroundColor = Sello.color;
     Console.Write(Sello.Imprimir());
     Console.ForegroundColor = ConsoleColor.White;
 }
Example #7
0
 public static void ImprimirEnColor()
 {
     Console.BackgroundColor = Sello.color;
     Console.WriteLine(Sello.Imprimir());
     Console.BackgroundColor = ConsoleColor.Black;
 }
Example #8
0
 public static string Imprimir()
 {
     Console.WriteLine(Sello.ArmarFormatoMensaje());
     return(Sello.mensaje);
 }
 public static void ImprimirEncolor()
 {
     Console.BackgroundColor = Sello.color;
     Console.WriteLine(Sello.Imprimir()); //Encapsulamiento
 }
Example #10
0
 public static void ImprimirSinColor()
 {
     Console.WriteLine(Sello.Imprimir());
 }