예제 #1
0
        public ZxingSurfaceView(ZxingActivity activity, ZxingScanningOptions options)
            : base(activity)
        {
            this.activity = activity;

            screenResolution = new Size(this.activity.WindowManager.DefaultDisplay.Width, this.activity.WindowManager.DefaultDisplay.Height);

            this.options = options;

            this.reader = new MultiFormatReader {
                Hints = new Hashtable {
                    //Formats to use
                    { DecodeHintType.POSSIBLE_FORMATS, this.options.GetFormats() }
                }
            };

            this.surface_holder = Holder;
            this.surface_holder.AddCallback(this);
            this.surface_holder.SetType(SurfaceType.PushBuffers);



            this.tokenSource = new System.Threading.CancellationTokenSource();
        }
예제 #2
0
		public ZxingSurfaceView (ZxingActivity activity, ZxingScanningOptions options)
			: base (activity)
		{
			this.activity = activity;

			screenResolution = new Size(this.activity.WindowManager.DefaultDisplay.Width, this.activity.WindowManager.DefaultDisplay.Height);

			this.options = options;

			this.reader = new MultiFormatReader {
				Hints = new Hashtable {
					//Formats to use
					{ DecodeHintType.POSSIBLE_FORMATS, this.options.GetFormats() }
				}
			};

			this.surface_holder = Holder;
			this.surface_holder.AddCallback (this);
			this.surface_holder.SetType (SurfaceType.PushBuffers);



			this.tokenSource = new System.Threading.CancellationTokenSource();
		}
예제 #3
0
 public override void Torch(bool on)
 {
     torch = on;
     ZxingActivity.RequestTorch(on);
 }
예제 #4
0
 public override void AutoFocus()
 {
     ZxingActivity.RequestAutoFocus();
 }
예제 #5
0
 public override void StopScanning()
 {
     ZxingActivity.RequestCancel();
 }