Exemplo n.º 1
0
        private void button5_Click(object sender, EventArgs e)
        {
            int    c1 = 27, c2 = 118, c3 = 140;
            char   cc1 = Convert.ToChar(c1);
            char   cc2 = Convert.ToChar(c2);
            char   cc3 = Convert.ToChar(c3);
            string cmd = "" + cc1 + cc2 + cc3;
            int    r   = Clase_MP2032.ComandoTX(cmd, cmd.Length);

            MessageBox.Show("ComandoTX :" + r);
        }
Exemplo n.º 2
0
        private void button4_Click(object sender, EventArgs e)
        {
            int g = Clase_MP2032.AcionaGuilhotina(0);//0=corte total, 1= corte parcial

            if (g == 1)
            {
                MessageBox.Show("guiliotina OK");
            }
            else
            {
                MessageBox.Show("Erro guiliotina :" + g);
            }
        }
Exemplo n.º 3
0
        private void button2_Click(object sender, EventArgs e)
        {
            int p = Clase_MP2032.IniciaPorta(textBox2.Text);

            if (p == 1)
            {
                MessageBox.Show("Porta OK");
            }
            else
            {
                MessageBox.Show("Erro Porta :" + p);
            }
        }
Exemplo n.º 4
0
        private void button3_Click(object sender, EventArgs e)
        {
            int i = Clase_MP2032.FormataTX(textBox1.Text, 2, 0, 0, 1, 1);

            if (i == 1)
            {
                MessageBox.Show("Imprimido OK");
            }
            else
            {
                MessageBox.Show("Erro txtFormat :" + i);
            }
        }
Exemplo n.º 5
0
        private void button1_Click(object sender, EventArgs e)
        {
            int i = 0;

            int.TryParse(textBox1.Text, out i);
            int m = Clase_MP2032.ConfiguraModeloImpressora(i);

            if (m == 1)
            {
                MessageBox.Show("ConfiguraModeloImpressora OK");
            }
            else
            {
                MessageBox.Show("Erro ConfiguraModeloImpressora :" + m);
            }
        }