private void btnA8SetMode_Click(object sender, EventArgs e) { int lRet = 0; modeA8.mode_d = 7; modeA8.mode_d_r = 7; modeA8.mode_u = 7; modeA8.mode_u_r = 7; modeA8.atuo_reverse = 0; lRet = A8ScannerReaderImporter.IO_SetScanModeA8(ref modeA8); if (lRet == 0) { MessageBox.Show("Set scan mode OK."); } else { MessageBox.Show("Set scan mode Failed."); } }
private void btnA8OpenDevice_Click(object sender, EventArgs e) { int lRet = 0; bool result = false; lRet = A8ScannerReaderImporter.IO_HasScanner("IVS-600DS"); A8ScannerReaderImporter.Sleep(100); if (lRet == 1) { modeA8.mode_d = 7; modeA8.mode_d_r = 7; modeA8.mode_u = 7; modeA8.mode_u_r = 7; modeA8.atuo_reverse = 0; lRet = A8ScannerReaderImporter.IO_SetScanModeA8(ref modeA8); A8ScannerReaderImporter.Sleep(100); if (lRet == 0) { lRet = A8ScannerReaderImporter.IO_GetCalibData(ref CalibData); if (lRet == 0) { btnA8OpenDevice.Enabled = false; MessageBox.Show("Open Device Success."); } else { A8ScannerReaderImporter.IO_CloseDevice(); MessageBox.Show("Get Calib Status Failed."); } } else { A8ScannerReaderImporter.IO_CloseDevice(); MessageBox.Show("Set Scanmode Error." + lRet.ToString()); } } else { A8ScannerReaderImporter.IO_CloseDevice(); MessageBox.Show("Open Device Failed."); } }