private void cashDrawerOpenButton_Click(object sender, EventArgs e) { long lResult; if (useprinterdriver) { // Text Box 로 부터 받음 m_strPrinter = pDriverNameTextBox.Text.ToString(); lResult = LKPrint.OpenPort(m_strPrinter, 1); if (lResult != 0) { MessageBox.Show("OpenPrinter Failed", "Error", MessageBoxButtons.OK); return; } } LKPrint.OpenDrawer(LKPrint.LK_CD_PIN_TWO, 400, 400); if (useprinterdriver) { lResult = LKPrint.ClosePort(); if (lResult != 0) { MessageBox.Show("ClosePrinter Failed!!!", "Error", MessageBoxButtons.OK); } } }