private void OnStopCommandExecute(ICamMethods camMethods) { try { camMethods.Stop(); IsCamStarted = false; } catch (Exception) { } }
private void OnStartCommandExecute(ICamMethods camMethods) { try { camMethods.Start(); IsCamStarted = true; } catch (Exception ex) { IsCamStarted = false; } }
private void OnScanCommandExecute(ICamMethods camMethods) { try { ScannedCode = string.Empty; using (Bitmap bitmap = camMethods.GetBitmap()) { ScannedCode = barcodeReader.Decode(bitmap).Text; UpdateRequest(); } } catch (Exception ex) { ScannedCode = AppConstants.ERROR; } }
public bool CanExecuteStopCommand(ICamMethods camMethods) { return(IsCamStarted); }
private void OnRefreshCommandExecute(ICamMethods camMethods) { OnStopCommandExecute(camMethods); OnStartCommandExecute(camMethods); }