public void BarcodeScannerCallback(string value, string error) { //MessageBox.Show("BarcodeScannerCallback"); if (string.IsNullOrEmpty(error)) { // Fill value to the textbox CSCallJS.InvokeScript(_web, "updateNRICTextValue", value.Trim()); // Execute authentication NRICAuthentication(value.Trim()); } else { LogManager.Error("BarcodeScannerCallback ERROR: " + error); //CSCallJS.ShowMessageAsync(_web, "BarcodeScanner ERROR", error); } }
private void BarcodeScannerCallback(string value, string error) { try { LogManager.Debug("BarcodeScannerCallback value: " + value + ", error: " + error); if (string.IsNullOrEmpty(error)) { // Fill value to the textbox //CSCallJS.ShowMessage(_web, value); CSCallJS.InvokeScript(_web, "updateLoginNRICTextValue", value.Trim()); //CSCallJS.UpdateLoginNRICTextValue(_web, value); } else { LogManager.Error("BarcodeScannerCallback ERROR: " + error); //CSCallJS.ShowMessageAsync(_web, "Manual Login ERROR", error); } } finally { LogManager.Debug("BarcodeScannerCallback Disconnect"); BarcodeScannerUtil.Instance.Disconnect(); } }