From 4fb2f5b06dfbc5598b5b6bb704e8ef3e1cb08149 Mon Sep 17 00:00:00 2001 From: stubbfel Date: Tue, 15 Oct 2013 15:18:27 +0200 Subject: [PATCH] fix #243 --- CampusAppWP8/CampusAppWP8/Pages/Dev/QRScanner.xaml.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CampusAppWP8/CampusAppWP8/Pages/Dev/QRScanner.xaml.cs b/CampusAppWP8/CampusAppWP8/Pages/Dev/QRScanner.xaml.cs index 00fc417d..d0740f3a 100644 --- a/CampusAppWP8/CampusAppWP8/Pages/Dev/QRScanner.xaml.cs +++ b/CampusAppWP8/CampusAppWP8/Pages/Dev/QRScanner.xaml.cs @@ -27,6 +27,7 @@ namespace CampusAppWP8.Pages.Dev using Microsoft.Devices; using Microsoft.Phone.Controls; using ZXing; + using System.Windows.Navigation; /// QR Code scanner. /// fiedlchr, 15.10.2013. @@ -86,6 +87,11 @@ namespace CampusAppWP8.Pages.Dev this.resultAppStoreKey = NavigationContext.QueryString[Constants.ParamQRResultKey]; } + if (e.NavigationMode == NavigationMode.Back) + { + this.captureThreadExit = false; + } + this.isInAutofocus = true; this.cam = new PhotoCamera(CameraType.Primary); this.cam.Initialized += new EventHandler(this.Cam_Initialized); @@ -93,6 +99,8 @@ namespace CampusAppWP8.Pages.Dev this.bit = new WriteableBitmap((int)this.cam.PreviewResolution.Width, (int)this.cam.PreviewResolution.Height); this.camViewBrush.SetSource(this.cam); + + } else {