public ScannerReturn Open() { //Open device if (Api.openDevice(1)) { //Add QRCODE support, QRCODE format id = 1 if (Api.addCodeFormat((byte)1)) { Api.backlight(true); return(ScannerReturn.SUCCESS); } else { //if cant add QRCODE, disconnet device and return false Api.backlight(false); Api.disConnected(); return(ScannerReturn.ADD_FORMAT_FAIL); } } else { return(ScannerReturn.OPEN_FAIL); } }
public override void Cleanup() { base.Cleanup(); _vbarapi.disConnected(); }