C# Class ZXing.Mobile.ZXingScannerControl

Inheritance: System.Windows.Controls.UserControl, IDisposable, IScannerView
Show file Open project: Redth/ZXing.Net.Mobile

Public Methods

Method Description
AutoFocus ( ) : void
AutoFocus ( int x, int y ) : void
AutoFocusAsync ( int x, int y, bool useCoordinates ) : Task
Cancel ( ) : Task
Dispose ( ) : void
PauseAnalysis ( ) : void
ResumeAnalysis ( ) : void
StartScanning ( Action scanCallback, ZXing.Mobile.MobileBarcodeScanningOptions options = null ) : void
StartScanningAsync ( Action scanCallback, ZXing.Mobile.MobileBarcodeScanningOptions options = null ) : Task
StopScanning ( ) : void
StopScanningAsync ( ) : Task
ToggleTorch ( ) : void
Torch ( bool on ) : void
ZXingScannerControl ( ) : System

Protected Methods

Method Description
OnPointerPressed ( PointerRoutedEventArgs e ) : void
OnTapped ( TappedRoutedEventArgs e ) : void

Private Methods

Method Description
CalculatePreviewRotation ( VideoRotation &sourceRotation, int &rotationDegrees ) : void

Reads the current orientation of the app and calculates the VideoRotation necessary to ensure the preview is rendered in the correct orientation.

ConvertUiTapToPreviewRect ( Point tap, Size size, Rect previewRect ) : Rect

Applies the necessary rotation to a tap on a CaptureElement (with Stretch mode set to Uniform) to account for device orientation

GetFilteredCameraOrDefaultAsync ( ZXing.Mobile.MobileBarcodeScanningOptions options ) : Task
GetPreviewResolution ( IMediaEncodingProperties props ) : Size
GetPreviewStreamRectInControl ( Size previewResolution, CaptureElement previewControl ) : Rect

Calculates the size and location of the rectangle that contains the preview stream within the preview control, when the scaling mode is Uniform

SetPreviewRotationAsync ( IMediaEncodingProperties props ) : Task

Gets the current orientation of the UI in relation to the device and applies a corrective rotation to the preview

SetupAutoFocus ( ) : Task
buttonToggleFlash_Click ( object sender, RoutedEventArgs e ) : void
displayInformation_OrientationChanged ( DisplayInformation sender, object args ) : void

Method Details

AutoFocus() public method

public AutoFocus ( ) : void
return void

AutoFocus() public method

public AutoFocus ( int x, int y ) : void
x int
y int
return void

AutoFocusAsync() public method

public AutoFocusAsync ( int x, int y, bool useCoordinates ) : Task
x int
y int
useCoordinates bool
return Task

Cancel() public method

public Cancel ( ) : Task
return Task

Dispose() public method

public Dispose ( ) : void
return void

OnPointerPressed() protected method

protected OnPointerPressed ( PointerRoutedEventArgs e ) : void
e PointerRoutedEventArgs
return void

OnTapped() protected method

protected OnTapped ( TappedRoutedEventArgs e ) : void
e TappedRoutedEventArgs
return void

PauseAnalysis() public method

public PauseAnalysis ( ) : void
return void

ResumeAnalysis() public method

public ResumeAnalysis ( ) : void
return void

StartScanning() public method

public StartScanning ( Action scanCallback, ZXing.Mobile.MobileBarcodeScanningOptions options = null ) : void
scanCallback Action
options ZXing.Mobile.MobileBarcodeScanningOptions
return void

StartScanningAsync() public method

public StartScanningAsync ( Action scanCallback, ZXing.Mobile.MobileBarcodeScanningOptions options = null ) : Task
scanCallback Action
options ZXing.Mobile.MobileBarcodeScanningOptions
return Task

StopScanning() public method

public StopScanning ( ) : void
return void

StopScanningAsync() public method

public StopScanningAsync ( ) : Task
return Task

ToggleTorch() public method

public ToggleTorch ( ) : void
return void

Torch() public method

public Torch ( bool on ) : void
on bool
return void

ZXingScannerControl() public method

public ZXingScannerControl ( ) : System
return System