示例#1
0
        private void BtnTeste_Click(object sender, EventArgs e)
        {
            if (!_conectado)
            {
                MessageBox.Show("Configure a impressora e conecte!", "Atenção", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            _printerHelper.Expand(PrinterDriver.ExpandType.Width);
            _printerHelper.NewLine(_printerHelper.PadCenter(" Teste de Impressora"));
            _printerHelper.Expand(PrinterDriver.ExpandType.None);
            _printerHelper.SingleSep();
            _printerHelper.Flush("", 1);
        }