private void SetupDataCaptureView(SettingsManager settings)
        {
            this.dataCaptureView.DataCaptureContext = settings.DataCaptureContext;
            this.dataCaptureView.PointOfInterest    = settings.PointOfInterest;
            this.dataCaptureView.ScanAreaMargins    = settings.ScanAreaMargins;
            this.dataCaptureView.LogoAnchor         = settings.LogoAnchor;
            this.dataCaptureView.LogoOffset         = new PointWithUnit(settings.AnchorXOffset, settings.AnchorYOffset);

            if (settings.TorchButtonEnabled)
            {
                this.dataCaptureView.AddControl(new TorchSwitchControl(this.RequireContext()));
            }

            this.dataCaptureView.FocusGesture = settings.TapToFocusEnabled ? TapToFocus.Create() : null;
            this.dataCaptureView.ZoomGesture  = settings.SwipeToZoomEnalbed ? SwipeToZoom.Create() : null;
        }
 public GesturesDataSource(IDataSourceListener dataSourceListener)
 {
     this.DataSourceListener = dataSourceListener;
     this.Sections           = new[]
     {
         new Section(new[]
         {
             SwitchRow.Create(
                 "Tap to Focus",
                 () => SettingsManager.Instance.TapToFocus != null,
                 enabled => SettingsManager.Instance.TapToFocus = enabled ? TapToFocus.Create() : null
                 ),
             SwitchRow.Create(
                 "Swipe to Zoom",
                 () => SettingsManager.Instance.SwipeToZoom != null,
                 enabled => SettingsManager.Instance.SwipeToZoom = enabled ? SwipeToZoom.Create(): null
                 )
         })
     };
 }