private void BarcodeScanned(WP7_Barcode_Library.BarcodeCaptureResult e)
 {
     //otpauth://totp/[email protected]?secret=samplesample
     if (e.State == WP7_Barcode_Library.CaptureState.Success)
     {
         string str = e.BarcodeText;
         str = str.Replace("otpauth://totp/", "");
         string[] splitString = str.Split(Convert.ToChar("?"));
         splitString[1] = splitString[1].Replace("secret=", "");
         AddToAccountDB(splitString[0], splitString[1]);
         NavigationService.GoBack();
     }
 }
Example #2
0
 /// <summary>
 /// Callback method that processes results returned by the WP7BarcodeManager. Results are also stored at WP7BarcodeManager.LastCaptureResults.
 /// </summary>
 /// <param name="BCResults">Object that holds all the results of processing the barcode. Results are also stored at WP7BarcodeManager.LastCaptureResults.</param>
 public void Barcode_Results(WP7_Barcode_Library.BarcodeCaptureResult Results)
 {
     if (Results.BarcodeImage != null)
     {
         imgCapture.Source = Results.BarcodeImage; //Display image
     }
     else
     {
         //No image captured
     }
     if (Results.State == CaptureState.Success)
     {
         txtResults.Text = Results.BarcodeText; //Use results
     }
     else //Error occured
     {
         txtResults.Text = Results.ErrorMessage;
     }
     stop_progress();
 }
Example #3
0
        public void Barcode_Results(WP7_Barcode_Library.BarcodeCaptureResult Results)
        {
            if (Results.State == WP7_Barcode_Library.CaptureState.Success)
            {

            }
            else //Error occured
            {

            }
        }