Esempio n. 1
0
        private void getPrinterStatusButton_Click(object sender, EventArgs e)
        {
            long lResult = LKPrint.PrinterSts();

            switch (lResult)
            {
            case LKPrint.LK_STS_NORMAL:
                MessageBox.Show("No Error", "OK", MessageBoxButtons.OK);
                break;

            case LKPrint.LK_STS_COVEROPEN:
                MessageBox.Show("Cover Open", "ERROR", MessageBoxButtons.OK);
                break;

            case LKPrint.LK_STS_PAPERNEAREMPTY:
                MessageBox.Show("Paper Near Empty", "ERROR", MessageBoxButtons.OK);
                break;

            case LKPrint.LK_STS_PAPEREMPTY:
                MessageBox.Show("Paper Empty", "ERROR", MessageBoxButtons.OK);
                break;

            case LKPrint.LK_STS_POWEROFF:
                MessageBox.Show("Power Off", "ERROR", MessageBoxButtons.OK);
                break;
            }
        }