public int ColorPrintCinta(ColorPrint Color) { if ((System.Convert.ToInt32(Color)) == System.Convert.ToInt32(ColorPrint.Negro)) { ticket = "\x1B" + "r" + "\x00"; } else if ((System.Convert.ToInt32(Color)) == System.Convert.ToInt32(ColorPrint.Rojo)) { ticket = "\x1B" + "r" + "\x01"; } RawPrinterHelper.SendStringToPrinter(PrinterName, ticket); // imprime linea return(System.Convert.ToInt32(Color)); }
static void Main(string[] args) { Console.WriteLine("Set Theme"); Console.WriteLine("1: Default \n 2: Blue&White \n Choose Your Theme :"); var themeOption = Convert.ToInt32(Console.ReadLine()); Default objDefault = new Default(); Display display = new Display(objDefault); switch (themeOption) { case 2: ColorPrint objColorPrint = new ColorPrint(ConsoleColor.Blue); display = new Display(objColorPrint); break; } display.PrintToConsole("HelloWorld"); Console.ReadLine(); }