Missing resources

Dec 20, 2010 at 1:24 AM

It looks like these resources haven't been checked in:

                    new BarcodeSampleItem {isEnabled = true, Text="WP Sample 1", FilePath = "/Samples/WP_000004.jpg"},
                    new BarcodeSampleItem {isEnabled = true, Text="WP Sample 2", FilePath = "/Samples/WP_000005.jpg"},
                    new BarcodeSampleItem {isEnabled = true, Text="WP Sample 3", FilePath = "/Samples/WP_000006.jpg"},
                    new BarcodeSampleItem {isEnabled = true, Text="WP Sample 4", FilePath = "/Samples/WP_000009.jpg"},
                    new BarcodeSampleItem {isEnabled = true, Text="WP Sample 5", FilePath = "/Samples/WP_000019.jpg"},

Also, \bin and \obj folders should not be checked in (they are).  Likewise, .suo files should not be checked in.



Dec 27, 2010 at 8:43 PM

Thanks for the tip. Those were sample files I used during testing and forgot to remove. I ended up changing it to use an XML file for configuring the sample images instead, as these need to be easy to change by the parent application. The files them self need to be stored as content files in the parent application so that they are included in the ZAP. Here is a example of the SampleImages.XML file that I'm currently using:

<?xml version="1.0" encoding="utf-8" ?>
<!--Set sample images for BarcodePhotoChooser.xaml list
  These files should be stored as content files not resource files and should always start with a /
  Text can use &#13;&#10; for a new line, but will start wrapping automatically after 15 characters and should not be more than 3 lines long.
  Also keep the file sizes and number of samples small to enable quick load times.-->
  <!--ZXing Sample images from SVN at core\test\data\benchmark-->
  <Sample isEnabled="true" Text="ZXing Sample&#13;&#10;QR Code - MECARD" FilePath="/Samples/qrcode-1.jpg"/>
    <Sample isEnabled="true" Text="ZXing Sample&#13;&#10;QR Code - 2" FilePath="/Samples/qrcode-2.jpg"/>
    <Sample isEnabled="true" Text="ZXing Sample&#13;&#10;QR Code - 3" FilePath="/Samples/qrcode-3.jpg"/>
    <Sample isEnabled="true" Text="ZXing Sample&#13;&#10;QR Code - 4" FilePath="/Samples/qrcode-4.jpg"/>
    Data Matrix barcodes not working <Sample isEnabled="true" Text="ZXing Sample&#13;&#10;Data Matrix - 1" FilePath="/Samples/datamatrix-1.png"/>
  <Sample isEnabled="true" Text="ZXing Sample&#13;&#10;UPC-A" FilePath="/Samples/upca-1.png"/>
  <Sample isEnabled="true" Text="ZXing Sample&#13;&#10;EAN-13" FilePath="/Samples/ean13-1.png"/>
  <Sample isEnabled="true" Text="ZXing Sample&#13;&#10;Code 39 - 1" FilePath="/Samples/code39-1.png"/>
  <Sample isEnabled="true" Text="ZXing Sample&#13;&#10;Code 128 - 1" FilePath="/Samples/code128-1.png"/>
  <Sample isEnabled="true" Text="ZXing Sample&#13;&#10;ITF - 1" FilePath="/Samples/ITF-1.png"/>
  <Sample isEnabled="true" Text="ZXing Sample&#13;&#10;Fail - 1" FilePath="/Samples/fail-1.png"/>
  <Sample isEnabled="true" Text="ZXing Sample&#13;&#10;Fail - 2" FilePath="/Samples/fail-2.png"/>
  <Sample isEnabled="true" Text="ZXing Sample&#13;&#10;Fail - 3" FilePath="/Samples/fail-3.png"/>
  <!--Doesn't fail... actually works<Sample isEnabled="true" Text="ZXing Sample&#13;&#10;Fail - 4" FilePath="/Samples/fail-4.jpg "/>-->

I still have a lot of cleanup to do and need to add a sample app, but hopefully this will help get you started.

Jan 6, 2011 at 2:20 PM

With regards to these sample files...I am trying to test using them in Windows Phone 7 but so far the only sample file that shows its picture in the barcode chooser page is the UPC code. The rest of the sample files show up as labels without pictures and trying to select them gives me an error of:

Error processing sample image.
System.ArgumentException: Cannot load selected image. Please make sure URI path is correct.

Do you have any insight for why this would happen or what I can do to make sure these images work correctly?


Jan 12, 2011 at 9:15 AM

Hii gbrayut, I am having some problem... For me also only image is showing of UPC and even in that when I scan it, I get the following error: Error: "Cannot decode barcode image. Please try again or enter manually in textbox"


Can you tell me why its unable to scan the same image for me?? :(

Jan 19, 2011 at 6:46 AM

I just updated the source code with a new version that includes a full sample app. Give that a try and open up a new thread if you have any more issues.

As a side note: If the sample images are not showing up that usually is because they are stored as resource files instead of content files. The code is configured by default to use content files (stored in the XAP) instead of resource files (stored in the assembly) since that is the recommended practice for bulk media. The new BarcodeSampleItemManager code makes this more clear (see source here)