private void InitializeScanner() { // Register self as a listener to get informed whenever a new barcode got recognized. this.BarcodeCapture.AddListener(this); // Rectangular viewfinder with an embedded Scandit logo. // The rectangular viewfinder is displayed when the recognition is active and hidden when it is not. this.Viewfinder = new RectangularViewfinder(RectangularViewfinderStyle.Square, RectangularViewfinderLineStyle.Light); }
public ViewfinderType GetCurrentViewfinderType() { IViewfinder viewfinder = this.settingsManager.CurrentViewfinder; return(viewfinder switch { RectangularViewfinder _ => ViewfinderTypeRectangular.FromCurrentViewfinderAndSettings(viewfinder, this.settingsManager), LaserlineViewfinder _ => ViewfinderTypeLaserline.FromCurrentViewfinderAndSettings(viewfinder, this.settingsManager), _ => ViewfinderTypeNone.FromCurrentViewFinder(viewfinder) });
public static ViewfinderTypeNone FromCurrentViewFinder(IViewfinder viewFinder) { return(new ViewfinderTypeNone(viewFinder == null)); }
public ViewfinderKind(int key, string value, IViewfinder viewfinder) : base(key, value) { this.Viewfinder = viewfinder; }