2015-08-03 105 views
0

我想掃描Windows Phone應用8.1中的QR碼。我嘗試了很多例子,但沒有人爲我工作。
下面的代碼,我試過,但沒有用如何閱讀Windows Phone 8.1應用程序開發中的QR碼?

xmlns:jwqr="clr-namespace:JeffWilcox.Controls;assembly=JeffWilcox.Controls.QR" 
在XAML

<jwqr:QRCodeScanner 
    ScanComplete="QRCodeScanner_ScanComplete" 
    Error="QRCodeScanner_Error" 
    Width="400" 
    Height="400"/> 

它顯示錯誤,如

「QRCodeScanner」 這個名字並不在命名空間 存在「CLR -namespace:JeffWilcox.Controls; assembly = JeffWilcox.Controls.QR「

並嘗試link這一個也不適合我。但在這臺相機不掃描代碼。
請任何人幫助我。如果您有任何其他鏈接。我正在嘗試這最後3天,但直到現在我沒有得到任何正確的答案。
Plase幫我.......

+0

@Mega Tron請給我任何鏈接,如果你有.. –

+0

你正在使用的庫,可能會導致問題。嘗試使用另一個庫來掃描QR碼。有簡單的方法來掃描QR碼。 –

+0

@Keval Langalia請提供任何鏈接。 –

回答

0

我不推薦,但我用Zxing Library條碼/ QR碼掃描,併爲我工作。

這裏是一個示例如何使用這個庫:

// create a barcode reader instance 
IBarcodeReader reader = new BarcodeReader(); 
// load a bitmap 
var barcodeBitmap = (Bitmap)Bitmap.LoadFrom("C:\\sample-barcode-image.png"); 
// detect and decode the barcode inside the bitmap 
var result = reader.Decode(barcodeBitmap); 
// do something with the result 
if (result != null) 
{ 
    txtDecoderType.Text = result.BarcodeFormat.ToString(); 
    txtDecoderContent.Text = result.Text; 
} 

文檔和其他demoClient可here

詢問是否需要更多的代碼。希望幫助..!

+0

謝謝。我會檢查並告訴你 –

+0

我沒有在該鏈接中找到任何代碼,請提供示例代碼。 –

+0

請任何人幫助我。 –

相關問題