Exemplo n.º 1
0
        static void Main(string[] args)
        {
            EventLog          el = new EventLog();
            TicketPrintServer tps;

            el.Source = "TicketPrintServerTest";
            tps       = new TicketPrintServer("ELGIN i9 (Rede)");
            tps.ServerLoop(el);
        }
Exemplo n.º 2
0
        // Teste de impressão de senhas.
        private void testPrinterButton_Click(object sender, EventArgs e)
        {
            TicketPrintServer tps = new TicketPrintServer(printerComboBox.SelectedItem.ToString());

            tps.Header = headerField.Text;
            tps.Footer = footerField.Text;
            string[] testData = { "teste", "teste", "A001" };
            tps.Print(testData);
        }
Exemplo n.º 3
0
        public TicketPrintService()
        {
            InitializeComponent();
            var parser = new FileIniDataParser();

            config          = parser.ReadFile(@"C:\Program Files\DPERS\TicketPrintServer\TicketPrintServer.ini");
            tps             = new TicketPrintServer(config["main"]["printerName"]);
            tps.Header      = config["main"]["header"];
            tps.Footer      = config["main"]["footer"];
            EventLog.Source = "TicketPrintServer";
        }
Exemplo n.º 4
0
        public Thread StartServer()
        {
            Thread thr;

            el  = new EventLog();
            tps = new TicketPrintServer("ELGIN i9 (Rede)");

            el.Source  = "TicketPrintServerTest";
            tps.Header = "IMPRESSAO DE TESTE";
            tps.Footer = "IMPRESSAO DE TESTE";
            thr        = new Thread(new ThreadStart(() => tps.ServerLoop(el)));
            thr.Start();
            return(thr);
        }