diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..0f8bb3c76 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,104 @@ +# Suppress: EC112 +# top-most EditorConfig file +root = true + +[*] +indent_style = tabs +# (Please don't specify an indent_size here; that has too many unintended consequences.) + +# Code files +[*.{cs,csx,vb,vbx}] +indent_size = 4 + +# Code files +[*.sln] +indent_size = 4 + +# Xml project files +[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}] +indent_size = 2 + +# Xml config files +[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}] +indent_size = 2 + +# JSON files +[*.json] +indent_size = 2 + +# XML files +[*.xml] +indent_size = 2 + +# Dotnet code style settings: +[*.{cs,vb}] +# Sort using and Import directives with System.* appearing first +dotnet_sort_system_directives_first = true +# Avoid "this." and "Me." if not necessary +dotnet_style_qualification_for_field = false:suggestion +dotnet_style_qualification_for_property = false:suggestion +dotnet_style_qualification_for_method = false:suggestion +dotnet_style_qualification_for_event = false:suggestion + +# Use language keywords instead of framework type names for type references +dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion +dotnet_style_predefined_type_for_member_access = true:suggestion +dotnet_style_require_accessibility_modifiers = omit_if_default:warning + +# Suggest more modern language features when available +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_explicit_tuple_names = true:suggestion + +# Naming Conventions: +# Pascal Casing +dotnet_naming_symbols.method_and_property_symbols.applicable_kinds= method,property,enum +dotnet_naming_symbols.method_and_property_symbols.applicable_accessibilities = * +dotnet_naming_style.pascal_case_style.capitalization = pascal_case + +dotnet_naming_rule.methods_and_properties_must_be_pascal_case.severity = warning +dotnet_naming_rule.methods_and_properties_must_be_pascal_case.symbols = method_and_property_symbols +dotnet_naming_rule.methods_and_properties_must_be_pascal_case.style = pascal_case_style + +# Non-public members must be lower-case +dotnet_naming_symbols.non_public_symbols.applicable_kinds = field +dotnet_naming_symbols.non_public_symbols.applicable_accessibilities = private +dotnet_naming_style.all_lower_case_style.capitalization = camel_case + +dotnet_naming_rule.non_public_members_must_be_lower_case.severity = warning +dotnet_naming_rule.non_public_members_must_be_lower_case.symbols = non_public_symbols +dotnet_naming_rule.non_public_members_must_be_lower_case.style = all_lower_case_style + +# CSharp code style settings: +[*.cs] +# Do not prefer "var" everywhere +csharp_style_var_for_built_in_types = true:error +csharp_style_var_when_type_is_apparent = true:error +csharp_style_var_elsewhere = true:error + +# Prefer method-like constructs to have a block body +csharp_style_expression_bodied_methods = true:suggestion +csharp_style_expression_bodied_constructors = true:suggestion +csharp_style_expression_bodied_operators = true:suggestion + +# Prefer property-like constructs to have an expression-body +csharp_style_expression_bodied_properties = true:suggestion +csharp_style_expression_bodied_indexers = true:suggestion +csharp_style_expression_bodied_accessors = true:suggestion + +# Suggest more modern language features when available +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion +csharp_style_throw_expression = true:suggestion +csharp_style_conditional_delegate_call = true:suggestion + +# Newline settings +csharp_new_line_before_open_brace = all +csharp_new_line_before_else = true +csharp_new_line_before_catch = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_members_in_anonymous_types = true diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..94ce11f04 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,76 @@ +name: Build + +on: + push: + release: + types: [published] + +jobs: + build: + name: Build + env: + NUPKG_MAJOR: 3.0 + runs-on: macos-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Define CI Version + run: echo ::set-env name=NUPKG_VER::$NUPKG_MAJOR-pre$GITHUB_RUN_ID + - name: Define Release Version + if: github.event_name == 'release' + run: echo ::set-env name=NUPKG_VER::${GITHUB_REF/refs\/tags\//} + - name: Setup Environment + run: mkdir ./artifacts + - name: NuGet Restore ZXing.Net.Mobile + run: msbuild /t:Restore /p:Configuration=Release ./ZXing.Net.Mobile.sln + - name: Build ZXing.Net.Mobile + run: msbuild /t:Build /p:Configuration=Release ./ZXing.Net.Mobile.sln + - name: NuGet Pack ZXing.Net.Mobile + run: msbuild /t:Pack /p:Configuration=Release /p:PackageOutputPath=../artifacts /p:PackageVersion=$NUPKG_VER /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg ./ZXing.Net.Mobile/ZXing.Net.Mobile.csproj + - name: NuGet Pack ZXing.Net.Mobile.Forms + run: msbuild /t:Pack /p:Configuration=Release /p:PackageOutputPath=../artifacts /p:PackageVersion=$NUPKG_VER /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg ./ZXing.Net.Mobile.Forms/ZXing.Net.Mobile.Forms.csproj + - name: Upload Artifacts + uses: actions/upload-artifact@v1 + with: + name: NuGet + path: ./artifacts + + publish-gh: + name: Publish to GitHub Packages + needs: build + runs-on: windows-latest + if: github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'release') + steps: + - name: Download Artifacts + uses: actions/download-artifact@v1 + with: + name: NuGet + - name: Setup NuGet + uses: nuget/setup-nuget@v1 + with: + nuget-api-key: ${{ secrets.NUGET_API_KEY }} + nuget-version: 'latest' + - name: Push NuGet + run: | + nuget sources add -Name "GPR" -Source "https://nuget.pkg.github.com/Redth/index.json" -UserName Redth -Password ${{ secrets.GITHUB_TOKEN }} + nuget setApiKey ${{ secrets.NUGET_API_KEY }} -Source "GPR" + nuget push NuGet\*.nupkg -Source "GPR" + + publish-nugetorg: + name: Publish to NuGet.org + needs: build + runs-on: windows-latest + if: github.event_name == 'release' + steps: + - name: Download Artifacts + uses: actions/download-artifact@v1 + with: + name: NuGet + - name: Setup NuGet + uses: nuget/setup-nuget@v1 + with: + nuget-api-key: ${{ secrets.NUGET_API_KEY }} + nuget-version: 'latest' + - name: Push NuGet + run: | + nuget push NuGet\*.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey ${{ secrets.NUGET_ORG_API_KEY }} diff --git a/Component-Forms/Banner.png b/Component-Forms/Banner.png deleted file mode 100644 index ac1b0580d..000000000 Binary files a/Component-Forms/Banner.png and /dev/null differ diff --git a/Component-Forms/Details.md b/Component-Forms/Details.md deleted file mode 100644 index a8cab7970..000000000 --- a/Component-Forms/Details.md +++ /dev/null @@ -1,13 +0,0 @@ -ZXing.Net.Mobile for Forms is a C#/.NET library based on the open source Barcode Library: ZXing (Zebra Crossing), using the ZXing.Net Port. It works with Xamarin.iOS, Xamarin.Android, Windows Phone Silverlight, and Windows Universal in Xamarin.Forms apps. - -The goal of ZXing.Net.Mobile is to make scanning barcodes as effortless and painless as possible in your own applications! - - -## Features - -- Xamarin.Forms Page and Views -- Custom Overlays in XAML or C# -- Xamarin.iOS -- Xamarin.Android -- Windows Phone (Silverlight) -- Windows Universal (UAP 10) diff --git a/Component-Forms/GettingStarted.md b/Component-Forms/GettingStarted.md deleted file mode 100644 index 5ea23709c..000000000 --- a/Component-Forms/GettingStarted.md +++ /dev/null @@ -1,234 +0,0 @@ -# Getting Started - -ZXing.Net.Mobile for Forms is meant to be used in your Xamarin.Forms apps. It comes with Forms controls and pages for scanning and displaying barcodes. - -If you are looking for barcode scanning functionality in your non-Forms Xamarin / Windows apps, check out the original [ZXing.Net.Mobile Component](https://components.xamarin.com/view/zxing.net.mobile). - -# Usage - -The easiest way to use scanner is to create an instance of the `ZXingScannerPage`: - -```csharp -var scanPage = new ZXingScannerPage (); - -scanPage.OnScanResult += (result) => { - // Stop scanning - scanPage.IsScanning = false; - - // Pop the page and show the result - Device.BeginInvokeOnMainThread (() => { - Navigation.PopAsync (); - DisplayAlert("Scanned Barcode", result.Text, "OK"); - }); -}; - -// Navigate to our scanner page -await Navigation.PushAsync (scanPage); -``` - - -## Additional Setup Required - -For each platform there is some additional setup required: - -### Android - -On Android, in your main `Activity`'s `OnCreate (..)` implementation, call: - -```csharp -ZXing.Net.Mobile.Forms.Android.Platform.Init(); -``` - -ZXing.Net.Mobile for Xamarin.Forms also handles the new Android permission request model for you, but you will need to add the following override implementation to your main `Activity` as well: - -```csharp -public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Permission[] grantResults) -{ - global::ZXing.Net.Mobile.Forms.Android.PermissionsHandler.OnRequestPermissionsResult (requestCode, permissions, grantResults); -} -``` - -The `Camera` permission should be automatically included for you in the `AndroidManifest.xml` however if you would like to use the Torch API's you will still need to add the `Flashlight` permission yourself. You can do this by using the following assembly level attribute: - -```csharp -[assembly: UsesPermission (Android.Manifest.Permission.Flashlight)] -``` - -### iOS - -In your `AppDelegate`'s `FinishedLaunching (..)` implementation, call: - -```csharp -ZXing.Net.Mobile.Forms.Android.Platform.Init(); -``` - - -### Windows Phone -In your main `Page`'s constructor, you should add: - -```csharp -ZXing.Net.Mobile.Forms.WindowsPhone.ZXingScannerViewRenderer.Init(); -``` - -### Windows Universal UWP - -In your main `Page`'s constructor, you should add: - -```csharp -ZXing.Net.Mobile.Forms.WindowsUniversal.ZXingScannerViewRenderer.Init(); -``` - - - -# Scanning in a View - -If you need more customization, or do not want the scanner to take up its own Page, you can also use the `ZXingScannerView` in your own custom page: - -```csharp -using Xamarin.Forms; -using ZXing.Net.Mobile.Forms; - -namespace FormsSample -{ - public class CustomScanPage : ContentPage - { - ZXingScannerView zxing; - ZXingDefaultOverlay overlay; - - public CustomScanPage () : base () - { - zxing = new ZXingScannerView - { - HorizontalOptions = LayoutOptions.FillAndExpand, - VerticalOptions = LayoutOptions.FillAndExpand - }; - zxing.OnScanResult += (result) => - Device.BeginInvokeOnMainThread (async () => { - - // Stop analysis until we navigate away so we don't keep reading barcodes - zxing.IsAnalyzing = false; - - // Show an alert - await DisplayAlert ("Scanned Barcode", result.Text, "OK"); - - // Navigate away - await Navigation.PopAsync (); - }); - - overlay = new ZXingDefaultOverlay - { - TopText = "Hold your phone up to the barcode", - BottomText = "Scanning will happen automatically", - ShowFlashButton = zxing.HasTorch, - }; - overlay.FlashButtonClicked += (sender, e) => { - zxing.IsTorchOn = !zxing.IsTorchOn; - }; - var grid = new Grid - { - VerticalOptions = LayoutOptions.FillAndExpand, - HorizontalOptions = LayoutOptions.FillAndExpand, - }; - grid.Children.Add(zxing); - grid.Children.Add(overlay); - - // The root page of your application - Content = grid; - } - - protected override void OnAppearing() - { - base.OnAppearing(); - - zxing.IsScanning = true; - } - - protected override void OnDisappearing() - { - zxing.IsScanning = false; - - base.OnDisappearing(); - } - } -} -``` - - -## Custom Overlays - -It's very simple to use a custom overlay. If you are using the `ZXingScannerPage` you can pass in any `View` for the `customOverlay` parameter in the constructor. - -```csharp -// Create our custom overlay -var customOverlay = new StackLayout { - HorizontalOptions = LayoutOptions.FillAndExpand, - VerticalOptions = LayoutOptions.FillAndExpand -}; -var torch = new Button { - Text = "Toggle Torch" -}; -torch.Clicked += delegate { - scanPage.ToggleTorch (); -}; -customOverlay.Children.Add (torch); - -// Pass in the custom overlay -scanPage = new ZXingScannerPage (customOverlay: customOverlay); -scanPage.OnScanResult += (result) => { - scanPage.IsScanning = false; - - Device.BeginInvokeOnMainThread(() => - { - Navigation.PopAsync(); - DisplayAlert("Scanned Barcode", result.Text, "OK"); - }); -}; -await Navigation.PushAsync (scanPage); -``` - -If you are using `ZXingScannerView` on your own page, of course you are responsible for adding your own overlay. - - -## Barcode Formats - -By default, all barcode formats are monitored while scanning. You can change which formats to check for by passing a `MobileBarcodeScanningOptions` instance into the `ZXingScannerPage`'s constructor. - -```csharp -var options = new ZXing.Mobile.MobileBarcodeScanningOptions(); -options.PossibleFormats = new List() { - ZXing.BarcodeFormat.Ean8, ZXing.BarcodeFormat.Ean13 -}; - -var scanPage = new ZXingScannerPage (options); - -// ... -``` - -You can also set the `Options` property if you are using the `ZXingScannerView` control directly. - - -## Displaying / Generating Barcodes - -There is also a `ZXingBarcodeImageView` control available that can be used within any Xamarin.Forms page: - -```csharp -public class BarcodePage : ContentPage -{ - ZXingBarcodeImageView barcode; - - public BarcodePage () - { - barcode = new ZXingBarcodeImageView { - HorizontalOptions = LayoutOptions.FillAndExpand, - VerticalOptions = LayoutOptions.FillAndExpand, - }; - barcode.BarcodeFormat = ZXing.BarcodeFormat.QR_CODE; - barcode.BarcodeOptions.Width = 300; - barcode.BarcodeOptions.Height = 300; - barcode.BarcodeOptions.Margin = 10; - barcode.BarcodeValue = "ZXing.Net.Mobile"; - - Content = barcode; - } -} -``` diff --git a/Component-Forms/License.md b/Component-Forms/License.md deleted file mode 100644 index f4f87bd4e..000000000 --- a/Component-Forms/License.md +++ /dev/null @@ -1,203 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - \ No newline at end of file diff --git a/Component-Forms/component.template.yaml b/Component-Forms/component.template.yaml deleted file mode 100644 index e2df8347f..000000000 --- a/Component-Forms/component.template.yaml +++ /dev/null @@ -1,69 +0,0 @@ -version: {VERSION} -name: ZXing.Net.Mobile for Forms -id: zxing.net.mobile.forms -publisher: Redth -license: License.md -skip_docs: true -icons: - - ./icons/zxing.net.mobile.forms_128x128.png - - ./icons/zxing.net.mobile.forms_512x512.png -publisher-url: "https://github.com/Redth/ZXing.Net.Mobile" -libraries: - ios-unified: - - ../Build/Forms/Release/ios-unified/ZXing.Net.Mobile.Forms.dll - - ../Build/Forms/Release/ios-unified/ZXing.Net.Mobile.Forms.iOS.dll - android: - - ../Build/Forms/Release/android/ZXing.Net.Mobile.Forms.dll - - ../Build/Forms/Release/android/ZXing.Net.Mobile.Forms.Android.dll - winuniversal-10.0: - - ../Build/Forms/Release/uwp/ZXing.Net.Mobile.Forms.dll - - ../Build/Forms/Release/uwp/ZXing.Net.Mobile.Forms.WindowsUniversal.dll - pcl: - - ../Build/Forms/Release/portable/ZXing.Net.Mobile.Forms.dll -is_shell: true -packages: - android: - - ZXing.Net.Mobile.Forms, Version={VERSION} - ios-unified: - - ZXing.Net.Mobile.Forms, Version={VERSION} - winuniversal-10.0: - - ZXing.Net.Mobile.Forms, Version={VERSION} -summary: "ZXing.Net.Mobile is a C#/.NET Barcode Scanning Library for Xamarin.Forms" -details: ./Details.md -getting-started: ./GettingStarted.md -samples: - - name: Forms Sample - path: "../Samples/Forms/Sample.Forms.sln" - removeProjects: - - zxing.portable - - ZXing.Net.Mobile.Core - - ZXing.Net.Mobile.Portable - - ZXing.Net.Mobile.WindowsRT - - ZXing.Net.Mobile.iOS - - ZXing.Net.Mobile.Android - - ZXing.Net.Mobile.WindowsUniversal - - ZXing.Net.Mobile.Forms - - ZXing.Net.Mobile.Forms.iOS - - ZXing.Net.Mobile.Forms.Android - - ZXing.Net.Mobile.Forms.WindowsUniversal - installNuGets: - - project: FormsSample - packages: - - ZXing.Net.Mobile - - ZXing.Net.Mobile.Forms - - project: FormsSample.iOS - packages: - - ZXing.Net.Mobile - - ZXing.Net.Mobile.Forms - - project: FormsSample.Droid - packages: - - ZXing.Net.Mobile - - ZXing.Net.Mobile.Forms - - project: FormsSample.WindowsUniversal - packages: - - ZXing.Net.Mobile - - ZXing.Net.Mobile.Forms - no_build: true - skip_docs: true -local-nuget-repo: ../output -no_build: true diff --git a/Component-Forms/icons/zxing.net.mobile.forms_128x128.png b/Component-Forms/icons/zxing.net.mobile.forms_128x128.png deleted file mode 100644 index f1965654d..000000000 Binary files a/Component-Forms/icons/zxing.net.mobile.forms_128x128.png and /dev/null differ diff --git a/Component-Forms/icons/zxing.net.mobile.forms_512x512.png b/Component-Forms/icons/zxing.net.mobile.forms_512x512.png deleted file mode 100644 index 9ddbb7ade..000000000 Binary files a/Component-Forms/icons/zxing.net.mobile.forms_512x512.png and /dev/null differ diff --git a/Component/Banner.png b/Component/Banner.png deleted file mode 100644 index ac1b0580d..000000000 Binary files a/Component/Banner.png and /dev/null differ diff --git a/Component/Details.md b/Component/Details.md deleted file mode 100644 index d9db906be..000000000 --- a/Component/Details.md +++ /dev/null @@ -1,14 +0,0 @@ -ZXing.Net.Mobile is a C#/.NET library based on the open source Barcode Library: ZXing (Zebra Crossing), using the ZXing.Net Port. It works with Xamarin.iOS, Xamarin.Android, Windows Phone (Silverlight) and Windows Universal. The goal of ZXing.Net.Mobile is to make scanning barcodes as effortless and painless as possible in your own applications! - - - -## Features - -- Xamarin.iOS -- Xamarin.Android -- Windows Phone (Silverlight) -- Windows Universal (UAP 10) -- Simple API - Scan in as little as 2 lines of code! -- Scanner as a View - UIView (iOS) / Fragment (Android) / Control (WP) -- Custom Overlays -- AVCaptureSession Detection optional support for iOS diff --git a/Component/GettingStarted.md b/Component/GettingStarted.md deleted file mode 100644 index 618585820..000000000 --- a/Component/GettingStarted.md +++ /dev/null @@ -1,121 +0,0 @@ -# Getting Started # - -You can use ZXing.Net.Mobile for Forms in your iOS, Android, Windows Phone (Silverlight) and Windows Universal Forms projects. - -### Usage - -The simplest example of using ZXing.Net.Mobile looks something like this: - -```csharp -buttonScan.Click += (sender, e) => { - - var scanner = new ZXing.Mobile.MobileBarcodeScanner(); - var result = await scanner.Scan(); - - if (result != null) - Console.WriteLine("Scanned Barcode: " + result.Text); -}; -``` - -NOTE: On Android you must call the platform specific initializer sometime before trying to scan: - -```csharp -// Somewhere in your app, call the initialization code: -MobileBarcodeScanner.Initialize (Application); -``` - -### Android Versions -The component should work on Android 2.2 or higher. In Xamarin.Android there are 3 places in the project settings relating to Android version. YOU ***MUST*** set the Project Options -> Build -> General -> Target Framework to ***2.3*** or higher. If you still want to use 2.2, you can set the Project Options -> Build -> Android Application -> Minimum Android version to 2.2, but be sure to set the Target Android version in this section to 2.3 or higher. - -You must also add a reference to the Component `Android Support Library v4` https://components.xamarin.com/view/xamandroidsupportv4-18 from the Component Store. - -### Android Permissions - -The `Camera` permission should automatically be added to your `AndroidManifest.xml` for you (it's required for barcode scanning), however the `Flashlight` permission needs to be manually added if you would like to use Torch API's. You can add it by adding the following assembly level attribute to your app: - -```csharp -ssembly: UsesPermission (Android.Manifest.Permission.Flashlight)] -``` - -###Custom Overlays -By default, ZXing.Net.Mobile provides a very simple overlay for your barcode scanning interface. This overlay consists of a horizontal red line centered in the scanning 'window' and semi-transparent borders on the top and bottom of the non-scanning area. You also have the opportunity to customize the top and bottom text that appears in this overlay. - -If you want to customize the overlay, you must create your own View for each platform. You can customize your overlay like this: - -```csharp -var scanner = new ZXing.Mobile.MobileBarcodeScanner(); -scanner.UseCustomOverlay = true; -scanner.CustomOverlay = myCustomOverlayInstance; -var result = await scanner.Scan(); -//Handle result -``` - -Keep in mind that when using a Custom Overlay, you are responsible for the entire overlay (you cannot mix and match custom elements with the default overlay). The *ZxingScanner* instance has a *CustomOverlay* property, however on each platform this property is of a different type: - -- Xamarin.iOS => **UIView** -- Xamarin.Android => **View** -- Windows Phone => **UIElement** - -All of the platform samples have examples of custom overlays. - -###Barcode Formats -By default, all barcode formats are monitored while scanning. You can change which formats to check for by passing a ZxingScanningOptions instance into the StartScanning method: - -```csharp -var options = new ZXing.Mobile.MobileBarcodeScanningOptions(); -options.PossibleFormats = new List() { - ZXing.BarcodeFormat.Ean8, ZXing.BarcodeFormat.Ean13 -}; - -var scanner = new ZXing.Mobile.MobileBarcodeScanner(); -var result = await scanner.Scan(options); -//Handle result -``` - -###Using the ZXingScanner View / Fragment / Control -On each platform, the ZXing scanner has been implemented as a reusable component (view, fragment, or control), and it is possible to use the reusable component directly without using the MobileBarcodeScanner class at all. On each platform, the instance of the view/fragment/control contains the necessary properties and methods required to control your scanner. By default, the default overlay is automatically used, unless you set the CustomOverlay property as well as the UseCustomOverlay property on the instance of the view/fragment/control. You can use methods such as ToggleTorch() or StopScanning() on the view/fragment/control, however you are responsible for calling StartScanning(...) with a callback and an instance of MobileBarcodeScanningOptions when you are ready for the view's scanning to begin. You are also responsible for stopping scanning if you want to cancel at any point. - -The view/fragment/control classes for each platform are: - - - iOS: ZXingScannerView (UIView) - See ZXingScannerViewController.cs View Controller for an example of how to use this view - - iOS: AVCaptureScannerView (UIView) - This is API equivalent to ZXingScannerView, but uses Apple's AVCaptureSession Metadata engine to scan the barcodes instead of ZXing.Net. See AVCaptureScannerViewController.cs View Controller for an example of how to use this view - - Android: ZXingScannerFragment (Fragment) - See ZXingActivity.cs Activity for an example of how to use this fragment - - Windows Phone: ZXingScannerControl (UserControl) - See ScanPage.xaml Page for an example of how to use this Control - - -###Using Apple's AVCaptureSession (iOS7 Built in) Barcode Scanning -In iOS7, Apple added some API's to allow for scanning of barcodes in an AVCaptureSession. The latest version of ZXing.Net.Mobile gives you the option of using this instead of the ZXing scanning engine. You can use the `AVCaptureScannerView` or the `AVCaptureScannerViewController` classes directly just the same as you would use their ZXing* equivalents. Or, in your `MobileBarcodeScanner`, there is now an overload to use the AV Capture Engine: - -```csharp -//Scan(MobileBarcodeScanningOptions options, bool useAVCaptureEngine) -scanner.Scan(options, true); -``` -In the MobileBarcodeScanner, even if you specify to use the AVCaptureSession scanning, it will gracefully degrade to using ZXing if the device doesn't support this (eg: if it's not iOS7 or newer), or if you specify a barcode format in your scanning options which the AVCaptureSession does not support for detection. The AVCaptureSession can only decode the following barcodes: - -- Aztec -- Code 128 -- Code 39 -- Code 93 -- EAN13 -- EAN8 -- PDF417 -- QR -- UPC-E - -###License -Apache ZXing.Net.Mobile Copyright 2012 The Apache Software Foundation -This product includes software developed at The Apache Software Foundation (http://www.apache.org/). - -### ZXing.Net -ZXing.Net is released under the Apache 2.0 license. -ZXing.Net can be found here: http://zxingnet.codeplex.com/ -A copy of the Apache 2.0 license can be found here: http://www.apache.org/licenses/LICENSE-2.0 - -### ZXing -ZXing is released under the Apache 2.0 license. -ZXing can be found here: https://github.com/zxing/zxing -A copy of the Apache 2.0 license can be found here: http://www.apache.org/licenses/LICENSE-2.0 - -### System.Drawing -The System.Drawing classes included are from the mono source code which is property of Novell. -Copyright notice is intact in source code files. diff --git a/Component/License.md b/Component/License.md deleted file mode 100644 index f4f87bd4e..000000000 --- a/Component/License.md +++ /dev/null @@ -1,203 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - \ No newline at end of file diff --git a/Component/component.template.yaml b/Component/component.template.yaml deleted file mode 100644 index 3dd6864ad..000000000 --- a/Component/component.template.yaml +++ /dev/null @@ -1,74 +0,0 @@ -version: {VERSION} -name: ZXing.Net.Mobile -id: zxing.net.mobile -publisher: Redth -license: License.md -skip_docs: true -icons: - - ./icons/zxing.net.mobile_128x128.png - - ./icons/zxing.net.mobile_512x512.png -publisher-url: "https://github.com/Redth/ZXing.Net.Mobile" -libraries: - ios-unified: - - ../Build/Release/ios-unified/zxing.portable.dll - - ../Build/Release/ios-unified/ZXingNetMobile.dll - android: - - ../Build/Release/android/zxing.portable.dll - - ../Build/Release/android/ZXingNetMobile.dll - winuniversal-10.0: - - ../Build/Release/uwp/zxing.portable.dll - - ../Build/Release/uwp/ZXingNetMobile.dll - pcl: - - ../Build/Release/portable/zxing.portable.dll - - ../Build/Release/portable/ZXingNetMobile.dll -is_shell: true -packages: - android: - - ZXing.Net.Mobile, Version={VERSION} - - Xamarin.Android.Support.v4, Version=23.0.1.3 - ios-unified: - - ZXing.Net.Mobile, Version={VERSION} - winuniversal-10.0: - - ZXing.Net.Mobile, Version={VERSION} -summary: "ZXing.Net.Mobile is a C#/.NET Barcode Scanning Library" -details: ./Details.md -getting-started: ./GettingStarted.md -samples: - - name: Xamarin.iOS Unified API Sample - path: "../Samples/iOS/Sample.iOS.sln" - removeProjects: - - ZXing.Net.Mobile.iOS - - ZXing.Net.Mobile.Core - - zxing.portable - installNuGets: - - project: Sample.iOS - packages: - - ZXing.Net.Mobile - no_build: true - skip_docs: true - - name: Xamarin.Android Sample - path: "../Samples/Android/Sample.Android.sln" - removeProjects: - - ZXing.Net.Mobile.Android - - ZXing.Net.Mobile.Core - - zxing.portable - installNuGets: - - project: Sample.Android - packages: - - ZXing.Net.Mobile - no_build: true - skip_docs: true - - name: Windows Universal Sample - path: "../Samples/WindowsUniversal/Sample.WindowsUniversal.sln" - removeProjects: - - ZXing.Net.Mobile.WindowsUniversal - - ZXing.Net.Mobile.Core - - zxing.portable - installNuGets: - - project: Sample.WindowsUniversal - packages: - - ZXing.Net.Mobile - no_build: true - skip_docs: true -local-nuget-repo: ../output -no_build: true diff --git a/Component/icons/zxing.net.mobile_128x128.png b/Component/icons/zxing.net.mobile_128x128.png deleted file mode 100644 index 10d79ea3f..000000000 Binary files a/Component/icons/zxing.net.mobile_128x128.png and /dev/null differ diff --git a/Component/icons/zxing.net.mobile_512x512.png b/Component/icons/zxing.net.mobile_512x512.png deleted file mode 100644 index 2c47771b1..000000000 Binary files a/Component/icons/zxing.net.mobile_512x512.png and /dev/null differ diff --git a/Samples/Android/Sample.Android.sln b/Samples/Android/Sample.Android.sln deleted file mode 100644 index ef8161cd1..000000000 --- a/Samples/Android/Sample.Android.sln +++ /dev/null @@ -1,41 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26228.9 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.Android", "Sample.Android\Sample.Android.csproj", "{660D9346-D70B-4C54-8402-E5F6DF48E9AC}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Android", "..\..\Source\ZXing.Net.Mobile.Android\ZXing.Net.Mobile.Android.csproj", "{AC17589E-C817-4FA8-B3EC-CCEB25E55E59}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Core", "..\..\Source\ZXing.Net.Mobile.Core\ZXing.Net.Mobile.Core.csproj", "{7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "zxing.portable", "..\..\Source\ZXing.Net\Source\lib\zxing.portable.csproj", "{24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|Any CPU.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|Any CPU.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|Any CPU.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Samples/Android/Sample.Android/Assets/AboutAssets.txt b/Samples/Android/Sample.Android/Assets/AboutAssets.txt deleted file mode 100644 index ee3988629..000000000 --- a/Samples/Android/Sample.Android/Assets/AboutAssets.txt +++ /dev/null @@ -1,19 +0,0 @@ -Any raw assets you want to be deployed with your application can be placed in -this directory (and child directories) and given a Build Action of "AndroidAsset". - -These files will be deployed with you package and will be accessible using Android's -AssetManager, like this: - -public class ReadAsset : Activity -{ - protected override void OnCreate (Bundle bundle) - { - base.OnCreate (bundle); - - InputStream input = Assets.Open ("my_asset.txt"); - } -} - -Additionally, some Android functions will automatically load asset files: - -Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); \ No newline at end of file diff --git a/Samples/Android/Sample.Android/FragmentActivity.cs b/Samples/Android/Sample.Android/FragmentActivity.cs deleted file mode 100644 index cb363ce2c..000000000 --- a/Samples/Android/Sample.Android/FragmentActivity.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using System.Collections.Generic; -using ZXing.Mobile; -using Android.OS; - -using Android.App; -using Android.Widget; -using Android.Content.PM; - -namespace Sample.Android -{ - [Activity (Label = "ZXing.Net.Mobile", Theme="@android:style/Theme.Holo.Light", ConfigurationChanges=ConfigChanges.Orientation|ConfigChanges.KeyboardHidden)] - public class FragmentActivity : global::Android.Support.V4.App.FragmentActivity - { - ZXingScannerFragment scanFragment; - - protected override void OnCreate (Bundle savedInstanceState) - { - base.OnCreate (savedInstanceState); - - SetContentView (Resource.Layout.FragmentActivity); - } - - protected override void OnResume () - { - base.OnResume (); - - var needsPermissionRequest = ZXing.Net.Mobile.Android.PermissionsHandler.NeedsPermissionRequest(this); - - if (needsPermissionRequest) - ZXing.Net.Mobile.Android.PermissionsHandler.RequestPermissionsAsync(this); - - if (scanFragment == null) - { - scanFragment = new ZXingScannerFragment(); - - SupportFragmentManager.BeginTransaction() - .Replace(Resource.Id.fragment_container, scanFragment) - .Commit(); - } - - if (!needsPermissionRequest) - scan(); - } - - public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Permission[] grantResults) - { - ZXing.Net.Mobile.Android.PermissionsHandler.OnRequestPermissionsResult(requestCode, permissions, grantResults); - } - - protected override void OnPause () - { - scanFragment?.StopScanning (); - - base.OnPause (); - } - - void scan () - { - var opts = new MobileBarcodeScanningOptions { - PossibleFormats = new List { - ZXing.BarcodeFormat.QR_CODE - }, - CameraResolutionSelector = availableResolutions => { - - foreach (var ar in availableResolutions) { - Console.WriteLine ("Resolution: " + ar.Width + "x" + ar.Height); - } - return null; - } - }; - - scanFragment.StartScanning (result => { - - // Null result means scanning was cancelled - if (result == null || string.IsNullOrEmpty (result.Text)) { - Toast.MakeText (this, "Scanning Cancelled", ToastLength.Long).Show (); - return; - } - - // Otherwise, proceed with result - RunOnUiThread (() => Toast.MakeText (this, "Scanned: " + result.Text, ToastLength.Short).Show ()); - }, opts); - } - } -} - diff --git a/Samples/Android/Sample.Android/ImageActivity.cs b/Samples/Android/Sample.Android/ImageActivity.cs deleted file mode 100644 index 27bdcc94a..000000000 --- a/Samples/Android/Sample.Android/ImageActivity.cs +++ /dev/null @@ -1,42 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -using Android.App; -using Android.Content; -using Android.OS; -using Android.Runtime; -using Android.Views; -using Android.Widget; - -namespace Sample.Android -{ - [Activity (Label = "ImageActivity")] - public class ImageActivity : Activity - { - ImageView imageBarcode; - - protected override void OnCreate (Bundle bundle) - { - base.OnCreate (bundle); - - SetContentView (Resource.Layout.ImageActivity); - - imageBarcode = FindViewById (Resource.Id.imageBarcode); - - var barcodeWriter = new ZXing.Mobile.BarcodeWriter { - Format = ZXing.BarcodeFormat.QR_CODE, - Options = new ZXing.Common.EncodingOptions { - Width = 300, - Height = 300 - } - }; - var barcode = barcodeWriter.Write ("ZXing.Net.Mobile"); - - imageBarcode.SetImageBitmap (barcode); - } - } -} - diff --git a/Samples/Android/Sample.Android/MainActivity.cs b/Samples/Android/Sample.Android/MainActivity.cs deleted file mode 100644 index 4541bff48..000000000 --- a/Samples/Android/Sample.Android/MainActivity.cs +++ /dev/null @@ -1,168 +0,0 @@ -using System.Collections.Generic; -using Android.App; -using Android.Content.PM; -using Android.Views; -using Android.Widget; -using Android.OS; -using ZXing; -using ZXing.Mobile; -using System; - -namespace Sample.Android -{ - [Activity (Label = "ZXing.Net.Mobile", MainLauncher = true, Theme="@android:style/Theme.Holo.Light", ConfigurationChanges=ConfigChanges.Orientation|ConfigChanges.KeyboardHidden)] - public class Activity1 : Activity - { - Button buttonScanCustomView; - Button buttonScanDefaultView; - Button buttonContinuousScan; - Button buttonFragmentScanner; - Button buttonGenerate; - - MobileBarcodeScanner scanner; - - protected override void OnCreate (Bundle bundle) - { - base.OnCreate (bundle); - - // Initialize the scanner first so we can track the current context - MobileBarcodeScanner.Initialize (Application); - - // Set our view from the "main" layout resource - SetContentView (Resource.Layout.Main); - - //Create a new instance of our Scanner - scanner = new MobileBarcodeScanner(); - - buttonScanDefaultView = this.FindViewById + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Samples/Sample.Uwp/MainPage.xaml.cs b/Samples/Sample.Uwp/MainPage.xaml.cs new file mode 100644 index 000000000..3c9b8e72a --- /dev/null +++ b/Samples/Sample.Uwp/MainPage.xaml.cs @@ -0,0 +1,153 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using System.Threading.Tasks; +using Sample.WindowsUniversal; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Popups; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; +using ZXing.Mobile; + +// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409 + +namespace Sample.Uwp +{ + /// + /// An empty page that can be used on its own or navigated to within a Frame. + /// + public sealed partial class MainPage : Page + { + UIElement customOverlayElement = null; + MobileBarcodeScanner scanner; + + public MainPage() + { + InitializeComponent(); + + //Create a new instance of our scanner + scanner = new MobileBarcodeScanner(this.Dispatcher); + scanner.RootFrame = this.Frame; + scanner.Dispatcher = this.Dispatcher; + scanner.OnCameraError += Scanner_OnCameraError; + scanner.OnCameraInitialized += Scanner_OnCameraInitialized; ; + } + + void Scanner_OnCameraInitialized() + { + //handle initialization + } + + void Scanner_OnCameraError(IEnumerable errors) + { + if (errors != null) + { + errors.ToList().ForEach(async e => await MessageBox(e)); + } + } + + + void buttonScanDefault_Click(object sender, RoutedEventArgs e) + { + //Tell our scanner to use the default overlay + scanner.UseCustomOverlay = false; + //We can customize the top and bottom text of our default overlay + scanner.TopText = "Hold camera up to barcode"; + scanner.BottomText = "Camera will automatically scan barcode\r\n\r\nPress the 'Back' button to Cancel"; + //Start scanning + scanner.Scan().ContinueWith(t => + { + if (t.Result != null) + HandleScanResult(t.Result); + }); + } + + void buttonScanContinuously_Click(object sender, RoutedEventArgs e) + { + //Tell our scanner to use the default overlay + scanner.UseCustomOverlay = false; + //We can customize the top and bottom text of our default overlay + scanner.TopText = "Hold camera up to barcode"; + scanner.BottomText = "Camera will automatically scan barcode\r\n\r\nPress the 'Back' button to Cancel"; + + //Start scanning + scanner.ScanContinuously(new MobileBarcodeScanningOptions { DelayBetweenContinuousScans = 3000 }, async (result) => + { + var msg = "Found Barcode: " + result.Text; + + await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, async () => + { + await MessageBox(msg); + }); + }); + } + + private void buttonScanCustom_Click(object sender, RoutedEventArgs e) + { + //Get our UIElement from the MainPage.xaml (this) file + // to use as our custom overlay + if (customOverlayElement == null) + { + customOverlayElement = this.customOverlay.Children[0]; + customOverlay.Children.RemoveAt(0); + } + + //Wireup our buttons from the custom overlay + buttonCancel.Click += (s, e2) => + { + scanner.Cancel(); + }; + buttonFlash.Click += (s, e2) => + { + scanner.ToggleTorch(); + }; + + //Set our custom overlay and enable it + scanner.CustomOverlay = customOverlayElement; + scanner.UseCustomOverlay = true; + + //Start scanning + scanner.Scan(new MobileBarcodeScanningOptions { AutoRotate = true }).ContinueWith(t => + { + if (t.Result != null) + HandleScanResult(t.Result); + }); + } + + async void HandleScanResult(ZXing.Result result) + { + var msg = ""; + + if (result != null && !string.IsNullOrEmpty(result.Text)) + msg = "Found Barcode: " + result.Text; + else + msg = "Scanning Canceled!"; + + await MessageBox(msg); + + } + + private void buttonGenerate_Click(object sender, RoutedEventArgs e) + { + //Go back to the main page + Frame.Navigate(typeof(ImagePage)); + } + + async Task MessageBox(string text) + { + await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, async () => + { + var dialog = new MessageDialog(text); + await dialog.ShowAsync(); + }); + } + } +} diff --git a/Samples/Sample.Uwp/Package.appxmanifest b/Samples/Sample.Uwp/Package.appxmanifest new file mode 100644 index 000000000..017ee919c --- /dev/null +++ b/Samples/Sample.Uwp/Package.appxmanifest @@ -0,0 +1,52 @@ + + + + + + + + + + Sample.Uwp + jondi + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.Forms.WindowsUniversal/Properties/AssemblyInfo.cs b/Samples/Sample.Uwp/Properties/AssemblyInfo.cs similarity index 82% rename from Source/ZXing.Net.Mobile.Forms.WindowsUniversal/Properties/AssemblyInfo.cs rename to Samples/Sample.Uwp/Properties/AssemblyInfo.cs index c0e2eb224..7ae101b83 100644 --- a/Source/ZXing.Net.Mobile.Forms.WindowsUniversal/Properties/AssemblyInfo.cs +++ b/Samples/Sample.Uwp/Properties/AssemblyInfo.cs @@ -5,12 +5,12 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("ZXing.Net.Mobile.Forms.WindowsUniversal")] +[assembly: AssemblyTitle("Sample.Uwp")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ZXing.Net.Mobile.Forms.WindowsUniversal")] -[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyProduct("Sample.Uwp")] +[assembly: AssemblyCopyright("Copyright © 2020")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/Samples/Sample.Uwp/Properties/Default.rd.xml b/Samples/Sample.Uwp/Properties/Default.rd.xml new file mode 100644 index 000000000..af00722cd --- /dev/null +++ b/Samples/Sample.Uwp/Properties/Default.rd.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/Forms/WindowsUniversal/FormsSample.WindowsUniversal.csproj b/Samples/Sample.Uwp/Sample.Uwp.csproj similarity index 69% rename from Samples/Forms/WindowsUniversal/FormsSample.WindowsUniversal.csproj rename to Samples/Sample.Uwp/Sample.Uwp.csproj index caf166e1f..3467210d6 100644 --- a/Samples/Forms/WindowsUniversal/FormsSample.WindowsUniversal.csproj +++ b/Samples/Sample.Uwp/Sample.Uwp.csproj @@ -1,22 +1,23 @@  - + Debug x86 - {69094754-B453-4BFA-9609-3DE9C9185157} + {2D97B30F-94A0-4631-9276-3ED17F392184} AppContainerExe Properties - WindowsUniversal - WindowsUniversal + Sample.Uwp + Sample.Uwp en-US UAP - 10.0.14393.0 - 10.0.10240.0 + 10.0.18362.0 + 10.0.17763.0 14 512 {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - WindowsUniversal_TemporaryKey.pfx + true + false true @@ -51,7 +52,6 @@ false prompt true - true bin\ARM\Release\ @@ -65,6 +65,30 @@ true true + + true + bin\ARM64\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + ARM64 + false + prompt + true + true + + + bin\ARM64\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + ARM64 + false + prompt + true + true + true bin\x64\Debug\ @@ -88,17 +112,16 @@ true true - - - - PreserveNewest - - - + + PackageReference + App.xaml + + ImagePage.xaml + MainPage.xaml @@ -108,7 +131,6 @@ Designer - @@ -125,39 +147,34 @@ MSBuild:Compile Designer + + MSBuild:Compile + Designer + MSBuild:Compile Designer - - {7528dd0a-1781-47f4-adbf-eeddb011f6bb} - ZXing.Net.Mobile.Core - - - {c785f56e-0d1d-492c-850b-4d882314f29b} - ZXing.Net.Mobile.Forms.WindowsUniversal - - - {8e54db74-c094-4016-859a-d1c7f2509a58} - ZXing.Net.Mobile.Forms - - - {1b000bca-4895-4acf-a0c6-3adf3a9bedf2} - ZXing.Net.Mobile.WindowsUniversal - - - {24b441f2-cbe9-4405-9fd0-72ebcbea0ec3} - zxing.portable - - - {0daf97ca-02db-4e4f-9163-b8f14eae2d90} - FormsSample + + 6.2.9 + + + 1.5.1 + + + + + {8b7a8ab6-35a4-4c9c-83e1-96ba8be3c941} + ZXing.Net.Mobile - + + False + ..\..\ZXing.Net\zxing.dll + 14.0 diff --git a/Samples/WindowsUniversal/Sample.WindowsUniversal/App.xaml b/Samples/Sample.WindowsUniversalOld/App.xaml similarity index 100% rename from Samples/WindowsUniversal/Sample.WindowsUniversal/App.xaml rename to Samples/Sample.WindowsUniversalOld/App.xaml diff --git a/Samples/WindowsUniversal/Sample.WindowsUniversal/App.xaml.cs b/Samples/Sample.WindowsUniversalOld/App.xaml.cs similarity index 93% rename from Samples/WindowsUniversal/Sample.WindowsUniversal/App.xaml.cs rename to Samples/Sample.WindowsUniversalOld/App.xaml.cs index d69343a6b..55e4b4041 100644 --- a/Samples/WindowsUniversal/Sample.WindowsUniversal/App.xaml.cs +++ b/Samples/Sample.WindowsUniversalOld/App.xaml.cs @@ -29,9 +29,6 @@ sealed partial class App : Application /// public App() { - Microsoft.ApplicationInsights.WindowsAppInitializer.InitializeAsync( - Microsoft.ApplicationInsights.WindowsCollectors.Metadata | - Microsoft.ApplicationInsights.WindowsCollectors.Session); this.InitializeComponent(); this.Suspending += OnSuspending; } @@ -51,7 +48,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs e) } #endif - Frame rootFrame = Window.Current.Content as Frame; + var rootFrame = Window.Current.Content as Frame; // Do not repeat app initialization when the Window already has content, // just ensure that the window is active @@ -96,7 +93,7 @@ private void OnNavigated(object sender, NavigationEventArgs e) private void OnBackRequested(object sender, BackRequestedEventArgs e) { - Frame rootFrame = Window.Current.Content as Frame; + var rootFrame = Window.Current.Content as Frame; if (rootFrame.CanGoBack) { diff --git a/Samples/WindowsUniversal/Sample.WindowsUniversal/Assets/LockScreenLogo.scale-200.png b/Samples/Sample.WindowsUniversalOld/Assets/LockScreenLogo.scale-200.png similarity index 100% rename from Samples/WindowsUniversal/Sample.WindowsUniversal/Assets/LockScreenLogo.scale-200.png rename to Samples/Sample.WindowsUniversalOld/Assets/LockScreenLogo.scale-200.png diff --git a/Samples/WindowsUniversal/Sample.WindowsUniversal/Assets/SplashScreen.scale-200.png b/Samples/Sample.WindowsUniversalOld/Assets/SplashScreen.scale-200.png similarity index 100% rename from Samples/WindowsUniversal/Sample.WindowsUniversal/Assets/SplashScreen.scale-200.png rename to Samples/Sample.WindowsUniversalOld/Assets/SplashScreen.scale-200.png diff --git a/Samples/WindowsUniversal/Sample.WindowsUniversal/Assets/Square150x150Logo.scale-200.png b/Samples/Sample.WindowsUniversalOld/Assets/Square150x150Logo.scale-200.png similarity index 100% rename from Samples/WindowsUniversal/Sample.WindowsUniversal/Assets/Square150x150Logo.scale-200.png rename to Samples/Sample.WindowsUniversalOld/Assets/Square150x150Logo.scale-200.png diff --git a/Samples/WindowsUniversal/Sample.WindowsUniversal/Assets/Square44x44Logo.scale-200.png b/Samples/Sample.WindowsUniversalOld/Assets/Square44x44Logo.scale-200.png similarity index 100% rename from Samples/WindowsUniversal/Sample.WindowsUniversal/Assets/Square44x44Logo.scale-200.png rename to Samples/Sample.WindowsUniversalOld/Assets/Square44x44Logo.scale-200.png diff --git a/Samples/WindowsUniversal/Sample.WindowsUniversal/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/Samples/Sample.WindowsUniversalOld/Assets/Square44x44Logo.targetsize-24_altform-unplated.png similarity index 100% rename from Samples/WindowsUniversal/Sample.WindowsUniversal/Assets/Square44x44Logo.targetsize-24_altform-unplated.png rename to Samples/Sample.WindowsUniversalOld/Assets/Square44x44Logo.targetsize-24_altform-unplated.png diff --git a/Samples/WindowsUniversal/Sample.WindowsUniversal/Assets/StoreLogo.png b/Samples/Sample.WindowsUniversalOld/Assets/StoreLogo.png similarity index 100% rename from Samples/WindowsUniversal/Sample.WindowsUniversal/Assets/StoreLogo.png rename to Samples/Sample.WindowsUniversalOld/Assets/StoreLogo.png diff --git a/Samples/WindowsUniversal/Sample.WindowsUniversal/Assets/Wide310x150Logo.scale-200.png b/Samples/Sample.WindowsUniversalOld/Assets/Wide310x150Logo.scale-200.png similarity index 100% rename from Samples/WindowsUniversal/Sample.WindowsUniversal/Assets/Wide310x150Logo.scale-200.png rename to Samples/Sample.WindowsUniversalOld/Assets/Wide310x150Logo.scale-200.png diff --git a/Samples/WindowsUniversal/Sample.WindowsUniversal/ImagePage.xaml b/Samples/Sample.WindowsUniversalOld/ImagePage.xaml similarity index 100% rename from Samples/WindowsUniversal/Sample.WindowsUniversal/ImagePage.xaml rename to Samples/Sample.WindowsUniversalOld/ImagePage.xaml diff --git a/Samples/WindowsUniversal/Sample.WindowsUniversal/ImagePage.xaml.cs b/Samples/Sample.WindowsUniversalOld/ImagePage.xaml.cs similarity index 100% rename from Samples/WindowsUniversal/Sample.WindowsUniversal/ImagePage.xaml.cs rename to Samples/Sample.WindowsUniversalOld/ImagePage.xaml.cs diff --git a/Samples/WindowsUniversal/Sample.WindowsUniversal/MainPage.xaml b/Samples/Sample.WindowsUniversalOld/MainPage.xaml similarity index 100% rename from Samples/WindowsUniversal/Sample.WindowsUniversal/MainPage.xaml rename to Samples/Sample.WindowsUniversalOld/MainPage.xaml diff --git a/Samples/WindowsUniversal/Sample.WindowsUniversal/MainPage.xaml.cs b/Samples/Sample.WindowsUniversalOld/MainPage.xaml.cs similarity index 91% rename from Samples/WindowsUniversal/Sample.WindowsUniversal/MainPage.xaml.cs rename to Samples/Sample.WindowsUniversalOld/MainPage.xaml.cs index 5dbcebb64..0ec73ea62 100644 --- a/Samples/WindowsUniversal/Sample.WindowsUniversal/MainPage.xaml.cs +++ b/Samples/Sample.WindowsUniversalOld/MainPage.xaml.cs @@ -39,12 +39,12 @@ public MainPage() scanner.OnCameraInitialized += Scanner_OnCameraInitialized; ; } - private void Scanner_OnCameraInitialized() + void Scanner_OnCameraInitialized() { //handle initialization } - private void Scanner_OnCameraError(IEnumerable errors) + void Scanner_OnCameraError(IEnumerable errors) { if(errors != null) { @@ -53,7 +53,7 @@ private void Scanner_OnCameraError(IEnumerable errors) } - private void buttonScanDefault_Click(object sender, RoutedEventArgs e) + void buttonScanDefault_Click(object sender, RoutedEventArgs e) { //Tell our scanner to use the default overlay scanner.UseCustomOverlay = false; @@ -68,7 +68,7 @@ private void buttonScanDefault_Click(object sender, RoutedEventArgs e) }); } - private void buttonScanContinuously_Click(object sender, RoutedEventArgs e) + void buttonScanContinuously_Click(object sender, RoutedEventArgs e) { //Tell our scanner to use the default overlay scanner.UseCustomOverlay = false; @@ -99,11 +99,11 @@ private void buttonScanCustom_Click(object sender, RoutedEventArgs e) } //Wireup our buttons from the custom overlay - this.buttonCancel.Click += (s, e2) => + buttonCancel.Click += (s, e2) => { scanner.Cancel(); }; - this.buttonFlash.Click += (s, e2) => + buttonFlash.Click += (s, e2) => { scanner.ToggleTorch(); }; @@ -122,7 +122,7 @@ private void buttonScanCustom_Click(object sender, RoutedEventArgs e) async void HandleScanResult(ZXing.Result result) { - string msg = ""; + var msg = ""; if (result != null && !string.IsNullOrEmpty(result.Text)) msg = "Found Barcode: " + result.Text; diff --git a/Samples/WindowsUniversal/Sample.WindowsUniversal/Package.appxmanifest b/Samples/Sample.WindowsUniversalOld/Package.appxmanifest similarity index 100% rename from Samples/WindowsUniversal/Sample.WindowsUniversal/Package.appxmanifest rename to Samples/Sample.WindowsUniversalOld/Package.appxmanifest diff --git a/Samples/WindowsUniversal/Sample.WindowsUniversal/Properties/AssemblyInfo.cs b/Samples/Sample.WindowsUniversalOld/Properties/AssemblyInfo.cs similarity index 100% rename from Samples/WindowsUniversal/Sample.WindowsUniversal/Properties/AssemblyInfo.cs rename to Samples/Sample.WindowsUniversalOld/Properties/AssemblyInfo.cs diff --git a/Samples/Forms/WindowsUniversal/Properties/Default.rd.xml b/Samples/Sample.WindowsUniversalOld/Properties/Default.rd.xml similarity index 100% rename from Samples/Forms/WindowsUniversal/Properties/Default.rd.xml rename to Samples/Sample.WindowsUniversalOld/Properties/Default.rd.xml diff --git a/Samples/WindowsUniversal/Sample.WindowsUniversal/Sample.WindowsUniversal.csproj b/Samples/Sample.WindowsUniversalOld/Sample.WindowsUniversal.csproj similarity index 86% rename from Samples/WindowsUniversal/Sample.WindowsUniversal/Sample.WindowsUniversal.csproj rename to Samples/Sample.WindowsUniversalOld/Sample.WindowsUniversal.csproj index d68a8b095..354367ad2 100644 --- a/Samples/WindowsUniversal/Sample.WindowsUniversal/Sample.WindowsUniversal.csproj +++ b/Samples/Sample.WindowsUniversalOld/Sample.WindowsUniversal.csproj @@ -11,12 +11,13 @@ Sample.WindowsUniversal en-US UAP - 10.0.14393.0 - 10.0.10240.0 + 10.0.16299.0 + 10.0.16299.0 14 512 {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} Sample.WindowsUniversal_TemporaryKey.pfx + win10-arm;win10-arm-aot;win10-x86;win10-x86-aot;win10-x64;win10-x64-aot true @@ -93,13 +94,6 @@ true true - - - - PreserveNewest - - - App.xaml @@ -143,17 +137,14 @@ - - {7528dd0a-1781-47f4-adbf-eeddb011f6bb} - ZXing.Net.Mobile.Core - - - {1b000bca-4895-4acf-a0c6-3adf3a9bedf2} - ZXing.Net.Mobile.WindowsUniversal - - - {24b441f2-cbe9-4405-9fd0-72ebcbea0ec3} - zxing.portable + + 6.1.9 + + + + + {8b7a8ab6-35a4-4c9c-83e1-96ba8be3c941} + ZXing.Net.Mobile diff --git a/Samples/WindowsUniversal/Sample.WindowsUniversal/Sample.WindowsUniversal_TemporaryKey.pfx b/Samples/Sample.WindowsUniversalOld/Sample.WindowsUniversal_TemporaryKey.pfx similarity index 100% rename from Samples/WindowsUniversal/Sample.WindowsUniversal/Sample.WindowsUniversal_TemporaryKey.pfx rename to Samples/Sample.WindowsUniversalOld/Sample.WindowsUniversal_TemporaryKey.pfx diff --git a/Samples/iOS/Sample.iOS/AppDelegate.cs b/Samples/Sample.iOS/AppDelegate.cs similarity index 71% rename from Samples/iOS/Sample.iOS/AppDelegate.cs rename to Samples/Sample.iOS/AppDelegate.cs index fbe0a6283..d1472fe3c 100644 --- a/Samples/iOS/Sample.iOS/AppDelegate.cs +++ b/Samples/Sample.iOS/AppDelegate.cs @@ -15,7 +15,7 @@ namespace Sample.iOS // The UIApplicationDelegate for the application. This class is responsible for launching the // User Interface of the application, as well as listening (and optionally responding) to // application events from iOS. - [Register ("AppDelegate")] + [Register("AppDelegate")] public partial class AppDelegate : UIApplicationDelegate { // class-level declarations @@ -30,12 +30,12 @@ public partial class AppDelegate : UIApplicationDelegate // // You have 17 seconds to return from this method, or iOS will terminate your application. // - public override bool FinishedLaunching (UIApplication app, NSDictionary options) + public override bool FinishedLaunching(UIApplication app, NSDictionary options) { - Xamarin.Calabash.Start (); + Xamarin.Calabash.Start(); // create a new window instance based on the screen size - window = new UIWindow (UIScreen.MainScreen.Bounds); + window = new UIWindow(UIScreen.MainScreen.Bounds); homeViewController = new HomeViewController(); @@ -46,18 +46,18 @@ public override bool FinishedLaunching (UIApplication app, NSDictionary options) //window.AddSubview(navController.View); // make the window visible - window.MakeKeyAndVisible (); + window.MakeKeyAndVisible(); return true; } - [Export ("UITestBackdoorScan:")] // notice the colon at the end of the method name - public NSString UITestBackdoorScan (NSString value) - { - homeViewController.UITestBackdoorScan (value.ToString ()); + [Export("UITestBackdoorScan:")] // notice the colon at the end of the method name + public NSString UITestBackdoorScan(NSString value) + { + homeViewController.UITestBackdoorScan(value.ToString()); - return new NSString (); - } + return new NSString(); + } } } diff --git a/Samples/Sample.iOS/CustomOverlayView.cs b/Samples/Sample.iOS/CustomOverlayView.cs new file mode 100644 index 000000000..0f15a08e7 --- /dev/null +++ b/Samples/Sample.iOS/CustomOverlayView.cs @@ -0,0 +1,39 @@ +using System; + +using Foundation; +using CoreFoundation; +using CoreGraphics; +using UIKit; + +namespace Sample.iOS +{ + public class CustomOverlayView : UIView + { + public UIButton ButtonTorch; + public UIButton ButtonCancel; + + public CustomOverlayView() : base() + { + ButtonTorch = UIButton.FromType(UIButtonType.RoundedRect); + ButtonTorch.Frame = new CGRect(Frame.Width / 2 + 5, Frame.Height - 60, Frame.Width / 2 - 10, 34); + ButtonTorch.AutoresizingMask = UIViewAutoresizing.FlexibleTopMargin | UIViewAutoresizing.FlexibleLeftMargin; + ButtonTorch.SetTitle("Torch", UIControlState.Normal); + AddSubview(ButtonTorch); + + + ButtonCancel = UIButton.FromType(UIButtonType.RoundedRect); + ButtonCancel.Frame = new CGRect(0, Frame.Height - 60, Frame.Width / 2 - 10, 34); + ButtonCancel.AutoresizingMask = UIViewAutoresizing.FlexibleTopMargin | UIViewAutoresizing.FlexibleRightMargin; + ButtonCancel.SetTitle("Cancel", UIControlState.Normal); + AddSubview(ButtonCancel); + } + + public override void LayoutSubviews() + { + ButtonTorch.Frame = new CGRect(Frame.Width / 2 + 5, Frame.Height - 60, Frame.Width / 2 - 10, 34); + ButtonCancel.Frame = new CGRect(0, Frame.Height - 60, Frame.Width / 2 - 10, 34); + } + + } +} + diff --git a/Samples/Sample.iOS/HomeViewController.cs b/Samples/Sample.iOS/HomeViewController.cs new file mode 100644 index 000000000..7287c6950 --- /dev/null +++ b/Samples/Sample.iOS/HomeViewController.cs @@ -0,0 +1,148 @@ +using System; +using MonoTouch.Dialog; + +using Foundation; +using CoreGraphics; +using UIKit; + +using ZXing; +using ZXing.Mobile; +using System.Collections.Generic; + +namespace Sample.iOS +{ + public class HomeViewController : DialogViewController + { + public HomeViewController() : base(UITableViewStyle.Grouped, new RootElement("ZXing.Net.Mobile"), false) + { + } + + MobileBarcodeScanner scanner; + CustomOverlayView customOverlay; + + public override void ViewDidLoad() + { + //Create a new instance of our scanner + scanner = new MobileBarcodeScanner(this.NavigationController); + + Root = new RootElement("ZXing.Net.Mobile") { + new Section { + + new StyledStringElement ("Scan with Default View", async () => { + //Tell our scanner to use the default overlay + scanner.UseCustomOverlay = false; + //We can customize the top and bottom text of the default overlay + scanner.TopText = "Hold camera up to barcode to scan"; + scanner.BottomText = "Barcode will automatically scan"; + + //Start scanning + var result = await scanner.Scan (); + + HandleScanResult(result); + }), + + new StyledStringElement ("Scan Continuously", () => { + //Tell our scanner to use the default overlay + scanner.UseCustomOverlay = false; + + //Tell our scanner to use our custom overlay + scanner.UseCustomOverlay = true; + scanner.CustomOverlay = customOverlay; + + + var opt = new MobileBarcodeScanningOptions (); + opt.DelayBetweenContinuousScans = 3000; + + //Start scanning + scanner.ScanContinuously (opt, false, HandleScanResult); + }), + + new StyledStringElement ("Scan with Custom View", async () => { + //Create an instance of our custom overlay + customOverlay = new CustomOverlayView(); + //Wireup the buttons from our custom overlay + customOverlay.ButtonTorch.TouchUpInside += delegate { + scanner.ToggleTorch(); + }; + customOverlay.ButtonCancel.TouchUpInside += delegate { + scanner.Cancel(); + }; + + //Tell our scanner to use our custom overlay + scanner.UseCustomOverlay = true; + scanner.CustomOverlay = customOverlay; + + var result = await scanner.Scan (new MobileBarcodeScanningOptions { AutoRotate = true }); + + HandleScanResult(result); + }), + + new StyledStringElement ("Scan with AVCapture Engine", async () => { + //Tell our scanner to use the default overlay + scanner.UseCustomOverlay = false; + //We can customize the top and bottom text of the default overlay + scanner.TopText = "Hold camera up to barcode to scan"; + scanner.BottomText = "Barcode will automatically scan"; + + //Start scanning + var result = await scanner.Scan (true); + + HandleScanResult (result); + }), + + new StyledStringElement ("Generate Barcode", () => { + NavigationController.PushViewController (new ImageViewController (), true); + }) + } + }; + } + + void HandleScanResult(ZXing.Result result) + { + var msg = ""; + + if (result != null && !string.IsNullOrEmpty(result.Text)) + msg = "Found Barcode: " + result.Text; + else + msg = "Scanning Canceled!"; + + this.InvokeOnMainThread(() => + { + var av = new UIAlertView("Barcode Result", msg, null, "OK", null); + av.Show(); + }); + } + + public void UITestBackdoorScan(string param) + { + var expectedFormat = BarcodeFormat.QR_CODE; + Enum.TryParse(param, out expectedFormat); + var opts = new MobileBarcodeScanningOptions + { + PossibleFormats = new List { expectedFormat } + }; + + //Create a new instance of our scanner + scanner = new MobileBarcodeScanner(this.NavigationController); + scanner.UseCustomOverlay = false; + + Console.WriteLine("Scanning " + expectedFormat); + + //Start scanning + scanner.Scan(opts).ContinueWith(t => + { + var result = t.Result; + + var format = result?.BarcodeFormat.ToString() ?? string.Empty; + var value = result?.Text ?? string.Empty; + + BeginInvokeOnMainThread(() => + { + var av = UIAlertController.Create("Barcode Result", format + "|" + value, UIAlertControllerStyle.Alert); + av.AddAction(UIAlertAction.Create("OK", UIAlertActionStyle.Cancel, null)); + PresentViewController(av, true, null); + }); + }); + } + } +} diff --git a/Samples/Sample.iOS/ImageViewController.cs b/Samples/Sample.iOS/ImageViewController.cs new file mode 100644 index 000000000..ae7b174c7 --- /dev/null +++ b/Samples/Sample.iOS/ImageViewController.cs @@ -0,0 +1,44 @@ +using System; +using ZXing.Mobile; +using UIKit; +using CoreGraphics; + +namespace Sample.iOS +{ + public class ImageViewController : UIViewController + { + public ImageViewController() : base() + { + } + + UIImageView imageBarcode; + + public override void ViewDidLoad() + { + base.ViewDidLoad(); + + NavigationItem.Title = "Generate Barcode"; + View.BackgroundColor = UIColor.White; + + imageBarcode = new UIImageView(new CGRect(20, 80, View.Frame.Width - 40, View.Frame.Height - 120)); + + View.AddSubview(imageBarcode); + + var barcodeWriter = new BarcodeWriter + { + Format = ZXing.BarcodeFormat.QR_CODE, + Options = new ZXing.Common.EncodingOptions + { + Width = 300, + Height = 300, + Margin = 30 + } + }; + + var barcode = barcodeWriter.Write("ZXing.Net.Mobile"); + + imageBarcode.Image = barcode; + } + } +} + diff --git a/Samples/iOS/Sample.iOS/Info.plist b/Samples/Sample.iOS/Info.plist similarity index 100% rename from Samples/iOS/Sample.iOS/Info.plist rename to Samples/Sample.iOS/Info.plist diff --git a/Samples/iOS/Sample.iOS/LaunchScreen.xib b/Samples/Sample.iOS/LaunchScreen.xib similarity index 100% rename from Samples/iOS/Sample.iOS/LaunchScreen.xib rename to Samples/Sample.iOS/LaunchScreen.xib diff --git a/Samples/iOS/Sample.iOS/Main.cs b/Samples/Sample.iOS/Main.cs similarity index 67% rename from Samples/iOS/Sample.iOS/Main.cs rename to Samples/Sample.iOS/Main.cs index 867b1db95..7225b5dd4 100644 --- a/Samples/iOS/Sample.iOS/Main.cs +++ b/Samples/Sample.iOS/Main.cs @@ -1,25 +1,19 @@ using System; using System.Collections.Generic; using System.Linq; - -#if __UNIFIED__ using Foundation; using UIKit; -#else -using MonoTouch.Foundation; -using MonoTouch.UIKit; -#endif namespace ZxingSharp.MonoTouch.Sample { public class Application { // This is the main entry point of the application. - static void Main (string[] args) + static void Main(string[] args) { // if you want to use a different Application Delegate class from "AppDelegate" // you can specify it here. - UIApplication.Main (args, null, "AppDelegate"); + UIApplication.Main(args, null, "AppDelegate"); } } } diff --git a/Samples/Sample.iOS/Resources/Icon.png b/Samples/Sample.iOS/Resources/Icon.png new file mode 100644 index 000000000..492d90e7c Binary files /dev/null and b/Samples/Sample.iOS/Resources/Icon.png differ diff --git a/Samples/Sample.iOS/Resources/Icon@2x.png b/Samples/Sample.iOS/Resources/Icon@2x.png new file mode 100644 index 000000000..492d90e7c Binary files /dev/null and b/Samples/Sample.iOS/Resources/Icon@2x.png differ diff --git a/Samples/iOS/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Contents.json b/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Contents.json similarity index 100% rename from Samples/iOS/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Contents.json rename to Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Contents.json diff --git a/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-40.png b/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-40.png new file mode 100644 index 000000000..b251f6b87 Binary files /dev/null and b/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-40.png differ diff --git a/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-40@2x.png b/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-40@2x.png new file mode 100644 index 000000000..d9efeae09 Binary files /dev/null and b/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-40@2x.png differ diff --git a/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-40@3x.png b/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-40@3x.png new file mode 100644 index 000000000..9db4b0330 Binary files /dev/null and b/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-40@3x.png differ diff --git a/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-60@2x.png b/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-60@2x.png new file mode 100644 index 000000000..9db4b0330 Binary files /dev/null and b/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-60@2x.png differ diff --git a/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-60@3x.png b/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-60@3x.png new file mode 100644 index 000000000..f68534bbd Binary files /dev/null and b/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-60@3x.png differ diff --git a/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-76.png b/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-76.png new file mode 100644 index 000000000..d2ba58512 Binary files /dev/null and b/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-76.png differ diff --git a/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-76@2x.png b/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-76@2x.png new file mode 100644 index 000000000..9921adf71 Binary files /dev/null and b/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-76@2x.png differ diff --git a/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-83.5@2x.png b/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-83.5@2x.png new file mode 100644 index 000000000..c2e804463 Binary files /dev/null and b/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-83.5@2x.png differ diff --git a/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-Small.png b/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-Small.png new file mode 100644 index 000000000..206e9c4f8 Binary files /dev/null and b/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-Small.png differ diff --git a/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-Small@2x.png b/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-Small@2x.png new file mode 100644 index 000000000..7e1c623d7 Binary files /dev/null and b/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-Small@2x.png differ diff --git a/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-Small@3x.png b/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-Small@3x.png new file mode 100644 index 000000000..6b8baa227 Binary files /dev/null and b/Samples/Sample.iOS/Resources/Images.xcassets/AppIcons.appiconset/Icon-Small@3x.png differ diff --git a/Samples/iOS/Sample.iOS/Resources/Images.xcassets/LaunchImage.launchimage/Contents.json b/Samples/Sample.iOS/Resources/Images.xcassets/LaunchImage.launchimage/Contents.json similarity index 100% rename from Samples/iOS/Sample.iOS/Resources/Images.xcassets/LaunchImage.launchimage/Contents.json rename to Samples/Sample.iOS/Resources/Images.xcassets/LaunchImage.launchimage/Contents.json diff --git a/Samples/iOS/Sample.iOS/Sample.iOS.csproj b/Samples/Sample.iOS/Sample.iOS.csproj similarity index 84% rename from Samples/iOS/Sample.iOS/Sample.iOS.csproj rename to Samples/Sample.iOS/Sample.iOS.csproj index d116c2804..facb488e2 100644 --- a/Samples/iOS/Sample.iOS/Sample.iOS.csproj +++ b/Samples/Sample.iOS/Sample.iOS.csproj @@ -22,6 +22,7 @@ True None obj\$(Platform)\$(Configuration)\ + i386, x86_64 none @@ -30,8 +31,9 @@ prompt 4 False - None + SdkOnly obj\$(Platform)\$(Configuration)\ + i386, x86_64 True @@ -95,8 +97,15 @@ + + False + ..\..\ZXing.Net\zxing.dll + + + 1.5.1 + @@ -109,62 +118,46 @@ - - - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB} - ZXing.Net.Mobile.Core - - - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A} - ZXing.Net.Mobile.iOS - False - False - - - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3} - zxing.portable - - - false + false - false + false - false + false - false + false - false + false - false + false - false + false - false + false - false + false - false + false - false + false - false + false - false + false @@ -173,4 +166,10 @@ + + + {8b7a8ab6-35a4-4c9c-83e1-96ba8be3c941} + ZXing.Net.Mobile + + \ No newline at end of file diff --git a/Samples/WindowsPhone/Sample.WindowsPhone.sln b/Samples/WindowsPhone/Sample.WindowsPhone.sln deleted file mode 100644 index a0c40e219..000000000 --- a/Samples/WindowsPhone/Sample.WindowsPhone.sln +++ /dev/null @@ -1,82 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.24720.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "zxing.portable", "..\..\Source\ZXing.Net\Source\lib\zxing.portable.csproj", "{24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Core", "..\..\Source\ZXing.Net.Mobile.Core\ZXing.Net.Mobile.Core.csproj", "{7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.WindowsPhone", "..\..\Source\ZXing.Net.Mobile.WindowsPhone\ZXing.Net.Mobile.WindowsPhone.csproj", "{C9EFC2F6-AC4C-446C-8FBF-91824B00431D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.WindowsPhone", "Sample.WindowsPhone\Sample.WindowsPhone.csproj", "{BC6808C6-5CEF-4D29-A23B-D2155334243D}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|ARM = Debug|ARM - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|ARM = Release|ARM - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|ARM.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|ARM.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|x86.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|x86.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|Any CPU.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|ARM.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|ARM.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|x86.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|x86.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|ARM.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|ARM.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|x86.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|x86.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|Any CPU.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|ARM.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|ARM.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|x86.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|x86.Build.0 = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Debug|ARM.ActiveCfg = Debug|ARM - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Debug|ARM.Build.0 = Debug|ARM - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Debug|x86.ActiveCfg = Debug|x86 - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Debug|x86.Build.0 = Debug|x86 - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Release|Any CPU.Build.0 = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Release|ARM.ActiveCfg = Release|ARM - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Release|ARM.Build.0 = Release|ARM - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Release|x86.ActiveCfg = Release|x86 - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Release|x86.Build.0 = Release|x86 - {BC6808C6-5CEF-4D29-A23B-D2155334243D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BC6808C6-5CEF-4D29-A23B-D2155334243D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BC6808C6-5CEF-4D29-A23B-D2155334243D}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {BC6808C6-5CEF-4D29-A23B-D2155334243D}.Debug|ARM.ActiveCfg = Debug|ARM - {BC6808C6-5CEF-4D29-A23B-D2155334243D}.Debug|ARM.Build.0 = Debug|ARM - {BC6808C6-5CEF-4D29-A23B-D2155334243D}.Debug|ARM.Deploy.0 = Debug|ARM - {BC6808C6-5CEF-4D29-A23B-D2155334243D}.Debug|x86.ActiveCfg = Debug|x86 - {BC6808C6-5CEF-4D29-A23B-D2155334243D}.Debug|x86.Build.0 = Debug|x86 - {BC6808C6-5CEF-4D29-A23B-D2155334243D}.Debug|x86.Deploy.0 = Debug|x86 - {BC6808C6-5CEF-4D29-A23B-D2155334243D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BC6808C6-5CEF-4D29-A23B-D2155334243D}.Release|Any CPU.Build.0 = Release|Any CPU - {BC6808C6-5CEF-4D29-A23B-D2155334243D}.Release|Any CPU.Deploy.0 = Release|Any CPU - {BC6808C6-5CEF-4D29-A23B-D2155334243D}.Release|ARM.ActiveCfg = Release|ARM - {BC6808C6-5CEF-4D29-A23B-D2155334243D}.Release|ARM.Build.0 = Release|ARM - {BC6808C6-5CEF-4D29-A23B-D2155334243D}.Release|ARM.Deploy.0 = Release|ARM - {BC6808C6-5CEF-4D29-A23B-D2155334243D}.Release|x86.ActiveCfg = Release|x86 - {BC6808C6-5CEF-4D29-A23B-D2155334243D}.Release|x86.Build.0 = Release|x86 - {BC6808C6-5CEF-4D29-A23B-D2155334243D}.Release|x86.Deploy.0 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Samples/WindowsPhone/Sample.WindowsPhone/App.xaml b/Samples/WindowsPhone/Sample.WindowsPhone/App.xaml deleted file mode 100644 index 27ba99249..000000000 --- a/Samples/WindowsPhone/Sample.WindowsPhone/App.xaml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/Samples/WindowsPhone/Sample.WindowsPhone/App.xaml.cs b/Samples/WindowsPhone/Sample.WindowsPhone/App.xaml.cs deleted file mode 100644 index 17d453370..000000000 --- a/Samples/WindowsPhone/Sample.WindowsPhone/App.xaml.cs +++ /dev/null @@ -1,144 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Navigation; -using System.Windows.Shapes; -using Microsoft.Phone.Controls; -using Microsoft.Phone.Shell; - -namespace ZxingSharp.WindowsPhone.Sample -{ - public partial class App : Application - { - /// - /// Provides easy access to the root frame of the Phone Application. - /// - /// The root frame of the Phone Application. - public PhoneApplicationFrame RootFrame { get; private set; } - - /// - /// Constructor for the Application object. - /// - public App() - { - // Global handler for uncaught exceptions. - UnhandledException += Application_UnhandledException; - - // Standard Silverlight initialization - InitializeComponent(); - - // Phone-specific initialization - InitializePhoneApplication(); - - // Show graphics profiling information while debugging. - if (System.Diagnostics.Debugger.IsAttached) - { - // Display the current frame rate counters. - Application.Current.Host.Settings.EnableFrameRateCounter = true; - - // Show the areas of the app that are being redrawn in each frame. - //Application.Current.Host.Settings.EnableRedrawRegions = true; - - // Enable non-production analysis visualization mode, - // which shows areas of a page that are handed off to GPU with a colored overlay. - //Application.Current.Host.Settings.EnableCacheVisualization = true; - - // Disable the application idle detection by setting the UserIdleDetectionMode property of the - // application's PhoneApplicationService object to Disabled. - // Caution:- Use this under debug mode only. Application that disables user idle detection will continue to run - // and consume battery power when the user is not using the phone. - PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled; - } - - } - - // Code to execute when the application is launching (eg, from Start) - // This code will not execute when the application is reactivated - private void Application_Launching(object sender, LaunchingEventArgs e) - { - } - - // Code to execute when the application is activated (brought to foreground) - // This code will not execute when the application is first launched - private void Application_Activated(object sender, ActivatedEventArgs e) - { - } - - // Code to execute when the application is deactivated (sent to background) - // This code will not execute when the application is closing - private void Application_Deactivated(object sender, DeactivatedEventArgs e) - { - System.Diagnostics.Debug.WriteLine("Deactivated..."); - } - - // Code to execute when the application is closing (eg, user hit Back) - // This code will not execute when the application is deactivated - private void Application_Closing(object sender, ClosingEventArgs e) - { - System.Diagnostics.Debug.WriteLine("Closing..."); - } - - // Code to execute if a navigation fails - private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e) - { - if (System.Diagnostics.Debugger.IsAttached) - { - // A navigation has failed; break into the debugger - System.Diagnostics.Debugger.Break(); - } - } - - // Code to execute on Unhandled Exceptions - private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e) - { - if (System.Diagnostics.Debugger.IsAttached) - { - // An unhandled exception has occurred; break into the debugger - System.Diagnostics.Debugger.Break(); - } - } - - #region Phone application initialization - - // Avoid double-initialization - private bool phoneApplicationInitialized = false; - - // Do not add any additional code to this method - private void InitializePhoneApplication() - { - if (phoneApplicationInitialized) - return; - - // Create the frame but don't set it as RootVisual yet; this allows the splash - // screen to remain active until the application is ready to render. - RootFrame = new PhoneApplicationFrame(); - RootFrame.Navigated += CompleteInitializePhoneApplication; - - // Handle navigation failures - RootFrame.NavigationFailed += RootFrame_NavigationFailed; - - // Ensure we don't initialize again - phoneApplicationInitialized = true; - } - - // Do not add any additional code to this method - private void CompleteInitializePhoneApplication(object sender, NavigationEventArgs e) - { - // Set the root visual to allow the application to render - if (RootVisual != RootFrame) - RootVisual = RootFrame; - - // Remove this handler since it is no longer needed - RootFrame.Navigated -= CompleteInitializePhoneApplication; - } - - #endregion - } -} \ No newline at end of file diff --git a/Samples/WindowsPhone/Sample.WindowsPhone/ApplicationIcon.png b/Samples/WindowsPhone/Sample.WindowsPhone/ApplicationIcon.png deleted file mode 100644 index 5859393ca..000000000 Binary files a/Samples/WindowsPhone/Sample.WindowsPhone/ApplicationIcon.png and /dev/null differ diff --git a/Samples/WindowsPhone/Sample.WindowsPhone/Background.png b/Samples/WindowsPhone/Sample.WindowsPhone/Background.png deleted file mode 100644 index e46f21d94..000000000 Binary files a/Samples/WindowsPhone/Sample.WindowsPhone/Background.png and /dev/null differ diff --git a/Samples/WindowsPhone/Sample.WindowsPhone/ImagePage.xaml b/Samples/WindowsPhone/Sample.WindowsPhone/ImagePage.xaml deleted file mode 100644 index 32ccf5b94..000000000 --- a/Samples/WindowsPhone/Sample.WindowsPhone/ImagePage.xaml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Samples/WindowsPhone/Sample.WindowsPhone/ImagePage.xaml.cs b/Samples/WindowsPhone/Sample.WindowsPhone/ImagePage.xaml.cs deleted file mode 100644 index b4b4e73e2..000000000 --- a/Samples/WindowsPhone/Sample.WindowsPhone/ImagePage.xaml.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Navigation; -using Microsoft.Phone.Controls; -using Microsoft.Phone.Shell; -using ZXing.Mobile; - -namespace ZxingSharp.WindowsPhone.Sample -{ - public partial class ImagePage : PhoneApplicationPage - { - public ImagePage() - { - InitializeComponent(); - } - - protected override void OnNavigatedTo(NavigationEventArgs e) - { - base.OnNavigatedTo(e); - - var barcodeWriter = new BarcodeWriter - { - Format = ZXing.BarcodeFormat.QR_CODE, - Options = new ZXing.Common.EncodingOptions - { - Width = 300, - Height = 300, - Margin = 30 - } - }; - - var image = barcodeWriter.Write("ZXing.Net.Mobile"); - - imageBarcode.Source = image; - } - } -} \ No newline at end of file diff --git a/Samples/WindowsPhone/Sample.WindowsPhone/MainPage.xaml b/Samples/WindowsPhone/Sample.WindowsPhone/MainPage.xaml deleted file mode 100644 index 69423259b..000000000 --- a/Samples/WindowsPhone/Sample.WindowsPhone/MainPage.xaml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Samples/WindowsPhone/Sample.WindowsPhone/MainPage.xaml.cs b/Samples/WindowsPhone/Sample.WindowsPhone/MainPage.xaml.cs deleted file mode 100644 index 64bc41304..000000000 --- a/Samples/WindowsPhone/Sample.WindowsPhone/MainPage.xaml.cs +++ /dev/null @@ -1,128 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using System.Linq; -using System.Net; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Shapes; -using Microsoft.Phone.Controls; -using ZXing.Mobile; - -namespace ZxingSharp.WindowsPhone.Sample -{ - public partial class MainPage : PhoneApplicationPage - { - UIElement customOverlayElement = null; - MobileBarcodeScanner scanner; - - // Constructor - public MainPage() - { - InitializeComponent(); - - //Create a new instance of our scanner - scanner = new MobileBarcodeScanner(this.Dispatcher); - scanner.Dispatcher = this.Dispatcher; - } - - private void buttonScanDefault_Click(object sender, RoutedEventArgs e) - { - //Tell our scanner to use the default overlay - scanner.UseCustomOverlay = false; - //We can customize the top and bottom text of our default overlay - scanner.TopText = "Hold camera up to barcode"; - scanner.BottomText = "Camera will automatically scan barcode\r\n\r\nPress the 'Back' button to Cancel"; - - //Start scanning - scanner.Scan().ContinueWith(t => - { - if (t.Result != null) - HandleScanResult(t.Result); - }); - } - - private void buttonScanContinuously_Click(object sender, RoutedEventArgs e) - { - //Tell our scanner to use the default overlay - scanner.UseCustomOverlay = false; - //We can customize the top and bottom text of our default overlay - scanner.TopText = "Hold camera up to barcode"; - scanner.BottomText = "Camera will automatically scan barcode\r\n\r\nPress the 'Back' button to Cancel"; - - //Start scanning - scanner.ScanContinuously(result => - { - var msg = "Found Barcode: " + result.Text; - - this.Dispatcher.BeginInvoke(() => - { - MessageBox.Show(msg); - }); - }); - } - - private void buttonScanCustom_Click(object sender, RoutedEventArgs e) - { - //Get our UIElement from the MainPage.xaml (this) file - // to use as our custom overlay - if (customOverlayElement == null) - { - customOverlayElement = this.customOverlay.Children[0]; - this.customOverlay.Children.RemoveAt(0); - } - - //Wireup our buttons from the custom overlay - this.buttonCancel.Click += (s, e2) => - { - scanner.Cancel(); - }; - this.buttonFlash.Click += (s, e2) => - { - scanner.ToggleTorch(); - }; - - //Set our custom overlay and enable it - scanner.CustomOverlay = customOverlayElement; - scanner.UseCustomOverlay = true; - - //Start scanning - scanner.Scan().ContinueWith(t => - { - if (t.Result != null) - HandleScanResult(t.Result); - }); - } - - void HandleScanResult(ZXing.Result result) - { - string msg = ""; - - if (result != null && !string.IsNullOrEmpty(result.Text)) - msg = "Found Barcode: " + result.Text; - else - msg = "Scanning Canceled!"; - - this.Dispatcher.BeginInvoke(() => - { - MessageBox.Show(msg); - - //Go back to the main page - NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative)); - - //Don't allow to navigate back to the scanner with the back button - NavigationService.RemoveBackEntry(); - }); - } - - private void buttonGenerate_Click(object sender, RoutedEventArgs e) - { - //Go back to the main page - NavigationService.Navigate(new Uri("/ImagePage.xaml", UriKind.Relative)); - } - } -} \ No newline at end of file diff --git a/Samples/WindowsPhone/Sample.WindowsPhone/Properties/AppManifest.xml b/Samples/WindowsPhone/Sample.WindowsPhone/Properties/AppManifest.xml deleted file mode 100644 index 6712a1178..000000000 --- a/Samples/WindowsPhone/Sample.WindowsPhone/Properties/AppManifest.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - diff --git a/Samples/WindowsPhone/Sample.WindowsPhone/Properties/WMAppManifest.xml b/Samples/WindowsPhone/Sample.WindowsPhone/Properties/WMAppManifest.xml deleted file mode 100644 index ddad79a80..000000000 --- a/Samples/WindowsPhone/Sample.WindowsPhone/Properties/WMAppManifest.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - ApplicationIcon.png - - - - - - - - - - - - - - - - - - - - - - - - - Background.png - 0 - Background.png - ZxingSharp.WindowsPhone.Sample - - - - - false - - - - - - - - - - \ No newline at end of file diff --git a/Samples/WindowsPhone/Sample.WindowsPhone/Sample.WindowsPhone.csproj b/Samples/WindowsPhone/Sample.WindowsPhone/Sample.WindowsPhone.csproj deleted file mode 100644 index 2f3f6f98f..000000000 --- a/Samples/WindowsPhone/Sample.WindowsPhone/Sample.WindowsPhone.csproj +++ /dev/null @@ -1,175 +0,0 @@ - - - - Debug - AnyCPU - {BC6808C6-5CEF-4D29-A23B-D2155334243D} - {C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - ZxingSharp.WindowsPhone.Sample - ZxingSharp.WindowsPhone.Sample - v8.0 - - - - - WindowsPhone - true - - - true - true - WindowsPhone8.Sample_$(Configuration)_$(Platform).xap - Properties\AppManifest.xml - ZxingSharp.WindowsPhone.Sample.App - true - true - 11.0 - - - true - full - false - Bin\Debug - DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE - true - true - prompt - 4 - false - - - pdbonly - true - Bin\Release - TRACE;SILVERLIGHT;WINDOWS_PHONE - true - true - prompt - 4 - false - - - true - Bin\x86\Debug - DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE - true - full - - - prompt - MinimumRecommendedRules.ruleset - false - - - Bin\x86\Release - TRACE;SILVERLIGHT;WINDOWS_PHONE - true - true - pdbonly - - - prompt - MinimumRecommendedRules.ruleset - - - true - Bin\ARM\Debug - DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE - true - full - - - prompt - MinimumRecommendedRules.ruleset - false - - - Bin\ARM\Release - TRACE;SILVERLIGHT;WINDOWS_PHONE - true - true - pdbonly - - - prompt - MinimumRecommendedRules.ruleset - - - - App.xaml - - - ImagePage.xaml - - - MainPage.xaml - - - - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - - - - - Designer - - - - - PreserveNewest - - - PreserveNewest - - - - - - {7528dd0a-1781-47f4-adbf-eeddb011f6bb} - ZXing.Net.Mobile.Core - - - {c9efc2f6-ac4c-446c-8fbf-91824b00431d} - ZXing.Net.Mobile.WindowsPhone - - - {24b441f2-cbe9-4405-9fd0-72ebcbea0ec3} - zxing.portable - - - - - ..\packages\WriteableBitmapEx.1.5.0.0\lib\WindowsPhone8\WriteableBitmapExWinPhone.dll - True - - - ..\packages\WriteableBitmapEx.1.5.0.0\lib\WindowsPhone8\WriteableBitmapExWinPhoneXnaDependant.dll - True - - - - - - - \ No newline at end of file diff --git a/Samples/WindowsPhone/Sample.WindowsPhone/SplashScreenImage.jpg b/Samples/WindowsPhone/Sample.WindowsPhone/SplashScreenImage.jpg deleted file mode 100644 index 353b1927b..000000000 Binary files a/Samples/WindowsPhone/Sample.WindowsPhone/SplashScreenImage.jpg and /dev/null differ diff --git a/Samples/WindowsPhone/Sample.WindowsPhone/packages.config b/Samples/WindowsPhone/Sample.WindowsPhone/packages.config deleted file mode 100644 index 8bb6466fa..000000000 --- a/Samples/WindowsPhone/Sample.WindowsPhone/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/Samples/WindowsUniversal/Sample.WindowsUniversal.sln b/Samples/WindowsUniversal/Sample.WindowsUniversal.sln deleted file mode 100644 index b0058060e..000000000 --- a/Samples/WindowsUniversal/Sample.WindowsUniversal.sln +++ /dev/null @@ -1,100 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26228.9 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "zxing.portable", "..\..\Source\ZXing.Net\Source\lib\zxing.portable.csproj", "{24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Core", "..\..\Source\ZXing.Net.Mobile.Core\ZXing.Net.Mobile.Core.csproj", "{7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.WindowsUniversal", "..\..\Source\ZXing.Net.Mobile.WindowsUniversal\ZXing.Net.Mobile.WindowsUniversal.csproj", "{1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.WindowsUniversal", "Sample.WindowsUniversal\Sample.WindowsUniversal.csproj", "{67ADB9A5-9F5E-4D4A-9B31-9BEFB91EE5F1}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|ARM = Debug|ARM - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|ARM = Release|ARM - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|ARM.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|ARM.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|x64.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|x64.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|x86.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|x86.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|Any CPU.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|ARM.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|ARM.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|x64.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|x64.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|x86.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|x86.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|ARM.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|ARM.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|x64.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|x64.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|x86.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|x86.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|Any CPU.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|ARM.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|ARM.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|x64.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|x64.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|x86.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|x86.Build.0 = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|ARM.ActiveCfg = Debug|ARM - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|ARM.Build.0 = Debug|ARM - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|x64.ActiveCfg = Debug|x64 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|x64.Build.0 = Debug|x64 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|x86.ActiveCfg = Debug|x86 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|x86.Build.0 = Debug|x86 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|Any CPU.Build.0 = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|ARM.ActiveCfg = Release|ARM - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|ARM.Build.0 = Release|ARM - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|x64.ActiveCfg = Release|x64 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|x64.Build.0 = Release|x64 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|x86.ActiveCfg = Release|x86 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|x86.Build.0 = Release|x86 - {67ADB9A5-9F5E-4D4A-9B31-9BEFB91EE5F1}.Debug|Any CPU.ActiveCfg = Debug|x86 - {67ADB9A5-9F5E-4D4A-9B31-9BEFB91EE5F1}.Debug|Any CPU.Build.0 = Debug|x86 - {67ADB9A5-9F5E-4D4A-9B31-9BEFB91EE5F1}.Debug|Any CPU.Deploy.0 = Debug|x86 - {67ADB9A5-9F5E-4D4A-9B31-9BEFB91EE5F1}.Debug|ARM.ActiveCfg = Debug|ARM - {67ADB9A5-9F5E-4D4A-9B31-9BEFB91EE5F1}.Debug|ARM.Build.0 = Debug|ARM - {67ADB9A5-9F5E-4D4A-9B31-9BEFB91EE5F1}.Debug|ARM.Deploy.0 = Debug|ARM - {67ADB9A5-9F5E-4D4A-9B31-9BEFB91EE5F1}.Debug|x64.ActiveCfg = Debug|x64 - {67ADB9A5-9F5E-4D4A-9B31-9BEFB91EE5F1}.Debug|x64.Build.0 = Debug|x64 - {67ADB9A5-9F5E-4D4A-9B31-9BEFB91EE5F1}.Debug|x64.Deploy.0 = Debug|x64 - {67ADB9A5-9F5E-4D4A-9B31-9BEFB91EE5F1}.Debug|x86.ActiveCfg = Debug|x86 - {67ADB9A5-9F5E-4D4A-9B31-9BEFB91EE5F1}.Debug|x86.Build.0 = Debug|x86 - {67ADB9A5-9F5E-4D4A-9B31-9BEFB91EE5F1}.Debug|x86.Deploy.0 = Debug|x86 - {67ADB9A5-9F5E-4D4A-9B31-9BEFB91EE5F1}.Release|Any CPU.ActiveCfg = Release|x86 - {67ADB9A5-9F5E-4D4A-9B31-9BEFB91EE5F1}.Release|ARM.ActiveCfg = Release|ARM - {67ADB9A5-9F5E-4D4A-9B31-9BEFB91EE5F1}.Release|ARM.Build.0 = Release|ARM - {67ADB9A5-9F5E-4D4A-9B31-9BEFB91EE5F1}.Release|ARM.Deploy.0 = Release|ARM - {67ADB9A5-9F5E-4D4A-9B31-9BEFB91EE5F1}.Release|x64.ActiveCfg = Release|x64 - {67ADB9A5-9F5E-4D4A-9B31-9BEFB91EE5F1}.Release|x64.Build.0 = Release|x64 - {67ADB9A5-9F5E-4D4A-9B31-9BEFB91EE5F1}.Release|x64.Deploy.0 = Release|x64 - {67ADB9A5-9F5E-4D4A-9B31-9BEFB91EE5F1}.Release|x86.ActiveCfg = Release|x86 - {67ADB9A5-9F5E-4D4A-9B31-9BEFB91EE5F1}.Release|x86.Build.0 = Release|x86 - {67ADB9A5-9F5E-4D4A-9B31-9BEFB91EE5F1}.Release|x86.Deploy.0 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Samples/WindowsUniversal/Sample.WindowsUniversal/ApplicationInsights.config b/Samples/WindowsUniversal/Sample.WindowsUniversal/ApplicationInsights.config deleted file mode 100644 index cb2a232da..000000000 --- a/Samples/WindowsUniversal/Sample.WindowsUniversal/ApplicationInsights.config +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Samples/WindowsUniversal/Sample.WindowsUniversal/project.json b/Samples/WindowsUniversal/Sample.WindowsUniversal/project.json deleted file mode 100644 index d6a2d50f4..000000000 --- a/Samples/WindowsUniversal/Sample.WindowsUniversal/project.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "dependencies": { - "Microsoft.ApplicationInsights": "2.3.0", - "Microsoft.ApplicationInsights.PersistenceChannel": "1.2.3", - "Microsoft.ApplicationInsights.WindowsApps": "1.1.1", - "Microsoft.NETCore.UniversalWindowsPlatform": "5.3.3" - }, - "frameworks": { - "uap10.0": {} - }, - "runtimes": { - "win10-arm": {}, - "win10-arm-aot": {}, - "win10-x86": {}, - "win10-x86-aot": {}, - "win10-x64": {}, - "win10-x64-aot": {} - } -} \ No newline at end of file diff --git a/Samples/iOS/Sample.iOS.sln b/Samples/iOS/Sample.iOS.sln deleted file mode 100644 index cce3f9301..000000000 --- a/Samples/iOS/Sample.iOS.sln +++ /dev/null @@ -1,129 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26228.9 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.iOS", "Sample.iOS\Sample.iOS.csproj", "{D119965B-BA8F-40D7-86B4-E9654E1014E2}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "zxing.portable", "..\..\Source\ZXing.Net\Source\lib\zxing.portable.csproj", "{24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Core", "..\..\Source\ZXing.Net.Mobile.Core\ZXing.Net.Mobile.Core.csproj", "{7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.iOS", "..\..\Source\ZXing.Net.Mobile.iOS\ZXing.Net.Mobile.iOS.csproj", "{6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Ad-Hoc|Any CPU = Ad-Hoc|Any CPU - Ad-Hoc|iPhone = Ad-Hoc|iPhone - Ad-Hoc|iPhoneSimulator = Ad-Hoc|iPhoneSimulator - AppStore|Any CPU = AppStore|Any CPU - AppStore|iPhone = AppStore|iPhone - AppStore|iPhoneSimulator = AppStore|iPhoneSimulator - Debug|Any CPU = Debug|Any CPU - Debug|iPhone = Debug|iPhone - Debug|iPhoneSimulator = Debug|iPhoneSimulator - Release|Any CPU = Release|Any CPU - Release|iPhone = Release|iPhone - Release|iPhoneSimulator = Release|iPhoneSimulator - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Ad-Hoc|Any CPU.ActiveCfg = Ad-Hoc|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Ad-Hoc|Any CPU.Build.0 = Ad-Hoc|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.AppStore|Any CPU.ActiveCfg = AppStore|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.AppStore|Any CPU.Build.0 = AppStore|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.AppStore|iPhone.ActiveCfg = AppStore|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.AppStore|iPhone.Build.0 = AppStore|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.AppStore|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.AppStore|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|iPhone.ActiveCfg = Debug|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|iPhone.Build.0 = Debug|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|Any CPU.ActiveCfg = Release|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|Any CPU.Build.0 = Release|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|iPhone.ActiveCfg = Release|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|iPhone.Build.0 = Release|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|Any CPU.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|iPhone.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|iPhone.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|iPhone.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|Any CPU.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|iPhone.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|iPhone.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|Any CPU.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|iPhone.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|iPhone.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|iPhone.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|Any CPU.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|iPhone.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|iPhone.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|Any CPU.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|Any CPU.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|iPhone.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|iPhone.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|Any CPU.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|Any CPU.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|iPhone.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|iPhone.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|iPhoneSimulator.Build.0 = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|Any CPU.ActiveCfg = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|iPhone.ActiveCfg = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|iPhone.Build.0 = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|Any CPU.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|Any CPU.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|iPhone.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|iPhone.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Samples/iOS/Sample.iOS/CustomOverlayView.cs b/Samples/iOS/Sample.iOS/CustomOverlayView.cs deleted file mode 100644 index ca0beedee..000000000 --- a/Samples/iOS/Sample.iOS/CustomOverlayView.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; - -#if __UNIFIED__ -using Foundation; -using CoreFoundation; -using CoreGraphics; -using UIKit; -#else -using MonoTouch.Foundation; -using MonoTouch.CoreFoundation; -using MonoTouch.UIKit; - -using System.Drawing; -using CGRect = global::System.Drawing.RectangleF; -using CGPoint = global::System.Drawing.PointF; -#endif - -namespace Sample.iOS -{ - public class CustomOverlayView : UIView - { - public UIButton ButtonTorch; - public UIButton ButtonCancel; - - public CustomOverlayView () : base() - { - ButtonTorch = UIButton.FromType(UIButtonType.RoundedRect); - ButtonTorch.Frame = new CGRect(this.Frame.Width / 2 + 5, this.Frame.Height - 60, this.Frame.Width / 2 - 10, 34); - ButtonTorch.AutoresizingMask = UIViewAutoresizing.FlexibleTopMargin | UIViewAutoresizing.FlexibleLeftMargin; - ButtonTorch.SetTitle("Torch", UIControlState.Normal); - this.AddSubview(ButtonTorch); - - - ButtonCancel = UIButton.FromType(UIButtonType.RoundedRect); - ButtonCancel.Frame = new CGRect(0, this.Frame.Height - 60, this.Frame.Width / 2 - 10, 34); - ButtonCancel.AutoresizingMask = UIViewAutoresizing.FlexibleTopMargin | UIViewAutoresizing.FlexibleRightMargin; - ButtonCancel.SetTitle("Cancel", UIControlState.Normal); - this.AddSubview(ButtonCancel); - - } - - public override void LayoutSubviews () - { - ButtonTorch.Frame = new CGRect(this.Frame.Width / 2 + 5, this.Frame.Height - 60, this.Frame.Width / 2 - 10, 34); - ButtonCancel.Frame = new CGRect(0, this.Frame.Height - 60, this.Frame.Width / 2 - 10, 34); - } - - } -} - diff --git a/Samples/iOS/Sample.iOS/HomeViewController.cs b/Samples/iOS/Sample.iOS/HomeViewController.cs deleted file mode 100644 index ebb1c6093..000000000 --- a/Samples/iOS/Sample.iOS/HomeViewController.cs +++ /dev/null @@ -1,145 +0,0 @@ -using System; -using MonoTouch.Dialog; - -using Foundation; -using CoreGraphics; -using UIKit; - -using ZXing; -using ZXing.Mobile; -using System.Collections.Generic; - -namespace Sample.iOS -{ - public class HomeViewController : DialogViewController - { - public HomeViewController () : base (UITableViewStyle.Grouped, new RootElement ("ZXing.Net.Mobile"), false) - { - } - - MobileBarcodeScanner scanner; - CustomOverlayView customOverlay; - - public override void ViewDidLoad () - { - //Create a new instance of our scanner - scanner = new MobileBarcodeScanner(this.NavigationController); - - Root = new RootElement ("ZXing.Net.Mobile") { - new Section { - - new StyledStringElement ("Scan with Default View", async () => { - //Tell our scanner to use the default overlay - scanner.UseCustomOverlay = false; - //We can customize the top and bottom text of the default overlay - scanner.TopText = "Hold camera up to barcode to scan"; - scanner.BottomText = "Barcode will automatically scan"; - - //Start scanning - var result = await scanner.Scan (); - - HandleScanResult(result); - }), - - new StyledStringElement ("Scan Continuously", () => { - //Tell our scanner to use the default overlay - scanner.UseCustomOverlay = false; - - //Tell our scanner to use our custom overlay - scanner.UseCustomOverlay = true; - scanner.CustomOverlay = customOverlay; - - - var opt = new MobileBarcodeScanningOptions (); - opt.DelayBetweenContinuousScans = 3000; - - //Start scanning - scanner.ScanContinuously (opt, false, HandleScanResult); - }), - - new StyledStringElement ("Scan with Custom View", async () => { - //Create an instance of our custom overlay - customOverlay = new CustomOverlayView(); - //Wireup the buttons from our custom overlay - customOverlay.ButtonTorch.TouchUpInside += delegate { - scanner.ToggleTorch(); - }; - customOverlay.ButtonCancel.TouchUpInside += delegate { - scanner.Cancel(); - }; - - //Tell our scanner to use our custom overlay - scanner.UseCustomOverlay = true; - scanner.CustomOverlay = customOverlay; - - var result = await scanner.Scan (new MobileBarcodeScanningOptions { AutoRotate = true }); - - HandleScanResult(result); - }), - - new StyledStringElement ("Scan with AVCapture Engine", async () => { - //Tell our scanner to use the default overlay - scanner.UseCustomOverlay = false; - //We can customize the top and bottom text of the default overlay - scanner.TopText = "Hold camera up to barcode to scan"; - scanner.BottomText = "Barcode will automatically scan"; - - //Start scanning - var result = await scanner.Scan (true); - - HandleScanResult (result); - }), - - new StyledStringElement ("Generate Barcode", () => { - NavigationController.PushViewController (new ImageViewController (), true); - }) - } - }; - } - - void HandleScanResult(ZXing.Result result) - { - string msg = ""; - - if (result != null && !string.IsNullOrEmpty(result.Text)) - msg = "Found Barcode: " + result.Text; - else - msg = "Scanning Canceled!"; - - this.InvokeOnMainThread(() => { - var av = new UIAlertView("Barcode Result", msg, null, "OK", null); - av.Show(); - }); - } - - public void UITestBackdoorScan (string param) - { - var expectedFormat = BarcodeFormat.QR_CODE; - Enum.TryParse (param, out expectedFormat); - var opts = new MobileBarcodeScanningOptions { - PossibleFormats = new List { expectedFormat } - }; - - //Create a new instance of our scanner - scanner = new MobileBarcodeScanner (this.NavigationController); - scanner.UseCustomOverlay = false; - - Console.WriteLine ("Scanning " + expectedFormat); - - //Start scanning - scanner.Scan (opts).ContinueWith (t => { - var result = t.Result; - - var format = result?.BarcodeFormat.ToString () ?? string.Empty; - var value = result?.Text ?? string.Empty; - - BeginInvokeOnMainThread (() => { - var av = UIAlertController.Create ("Barcode Result", format + "|" + value, UIAlertControllerStyle.Alert); - av.AddAction (UIAlertAction.Create ("OK", UIAlertActionStyle.Cancel, null)); - PresentViewController (av, true, null); - }); - }); - } - } -} - diff --git a/Samples/iOS/Sample.iOS/ImageViewController.cs b/Samples/iOS/Sample.iOS/ImageViewController.cs deleted file mode 100644 index 8f526374e..000000000 --- a/Samples/iOS/Sample.iOS/ImageViewController.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using ZXing.Mobile; - -#if __UNIFIED__ -using UIKit; -using CoreGraphics; -#else -using MonoTouch.UIKit; -using CGRect = System.Drawing.RectangleF; -#endif - -namespace Sample.iOS -{ - public class ImageViewController : UIViewController - { - public ImageViewController () : base () - { - } - - UIImageView imageBarcode; - - public override void ViewDidLoad () - { - base.ViewDidLoad (); - - NavigationItem.Title = "Generate Barcode"; - View.BackgroundColor = UIColor.White; - - imageBarcode = new UIImageView (new CGRect (20, 80, View.Frame.Width - 40, View.Frame.Height - 120)); - - View.AddSubview (imageBarcode); - - var barcodeWriter = new BarcodeWriter { - Format = ZXing.BarcodeFormat.QR_CODE, - Options = new ZXing.Common.EncodingOptions { - Width = 300, - Height = 300, - Margin = 30 - } - }; - - var barcode = barcodeWriter.Write ("ZXing.Net.Mobile"); - - imageBarcode.Image = barcode; - } - } -} - diff --git a/Source/ZXing.Net b/Source/ZXing.Net deleted file mode 160000 index 14f3f07b7..000000000 --- a/Source/ZXing.Net +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 14f3f07b740b0332ae27508039a801537d8ce9a0 diff --git a/Source/ZXing.Net.Mobile.Android/ActivityLifecycleContextListener.cs b/Source/ZXing.Net.Mobile.Android/ActivityLifecycleContextListener.cs deleted file mode 100644 index aea3a444f..000000000 --- a/Source/ZXing.Net.Mobile.Android/ActivityLifecycleContextListener.cs +++ /dev/null @@ -1,50 +0,0 @@ -using Android.App; -using Android.Content; - -namespace ZXing.Mobile -{ - public class ActivityLifecycleContextListener : Java.Lang.Object, Application.IActivityLifecycleCallbacks - { - public ActivityLifecycleContextListener () - { - } - - Activity currentActivity = null; - - public Context Context { - get { - return currentActivity ?? Application.Context; - } - } - - public void OnActivityCreated (Activity activity, Android.OS.Bundle savedInstanceState) - { - } - - public void OnActivityDestroyed (Activity activity) - { - } - - public void OnActivityPaused (Activity activity) - { - } - - public void OnActivityResumed (Activity activity) - { - currentActivity = activity; - } - - public void OnActivitySaveInstanceState (Activity activity, Android.OS.Bundle outState) - { - } - - public void OnActivityStarted (Activity activity) - { - } - - public void OnActivityStopped (Activity activity) - { - } - } -} - diff --git a/Source/ZXing.Net.Mobile.Android/AssemblyInfo.cs b/Source/ZXing.Net.Mobile.Android/AssemblyInfo.cs deleted file mode 100644 index 44ce54b44..000000000 --- a/Source/ZXing.Net.Mobile.Android/AssemblyInfo.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -// Information about this assembly is defined by the following attributes. -// Change them to the values specific to your project. - -[assembly: AssemblyTitle("ZXing.Net.Mobile.Android")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("redth")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". -// The form "{Major}.{Minor}.*" will automatically update the build and revision, -// and "{Major}.{Minor}.{Build}.*" will update just the revision. - -[assembly: AssemblyVersion("1.0.*")] - -// The following attributes are used to specify the signing key for the assembly, -// if desired. See the Mono documentation for more information about signing. - -//[assembly: AssemblyDelaySign(false)] -//[assembly: AssemblyKeyFile("")] - diff --git a/Source/ZXing.Net.Mobile.Android/BitmapRenderer.cs b/Source/ZXing.Net.Mobile.Android/BitmapRenderer.cs deleted file mode 100644 index 9e0af13fc..000000000 --- a/Source/ZXing.Net.Mobile.Android/BitmapRenderer.cs +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2012 ZXing.Net authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -using Android.Graphics; - -using ZXing.Common; -using ZXing.Rendering; - -namespace ZXing.Mobile -{ - /// - /// Renders a to a image - /// - public class BitmapRenderer : IBarcodeRenderer - { - /// - /// Gets or sets the foreground color. - /// - /// The foreground color. - public Color Foreground { get; set; } - - /// - /// Gets or sets the background color. - /// - /// The background color. - public Color Background { get; set; } - - /// - /// Initializes a new instance of the class. - /// - public BitmapRenderer() - { - Foreground = Color.Black; - Background = Color.White; - } - - /// - /// Renders the specified matrix. - /// - /// The matrix. - /// The format. - /// The content. - /// - public Bitmap Render(BitMatrix matrix, BarcodeFormat format, string content) - { - return Render(matrix, format, content, new EncodingOptions()); - } - - /// - /// Renders the specified matrix. - /// - /// The matrix. - /// The format. - /// The content. - /// The options. - /// - public Bitmap Render(BitMatrix matrix, BarcodeFormat format, string content, EncodingOptions options) - { - var width = matrix.Width; - var height = matrix.Height; - var pixels = new int[width * height]; - var outputIndex = 0; - var fColor = Foreground.ToArgb(); - var bColor = Background.ToArgb(); - - for (var y = 0; y < height; y++) - { - for (var x = 0; x < width; x++) - { - pixels[outputIndex] = matrix[x, y] ? fColor : bColor; - outputIndex++; - } - } - - var bitmap = Bitmap.CreateBitmap(width, height, Bitmap.Config.Argb8888); - bitmap.SetPixels(pixels, 0, width, 0, 0, width, height); - return bitmap; - } - } -} \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.Android/CameraAccess/CameraAnalyzer.cs b/Source/ZXing.Net.Mobile.Android/CameraAccess/CameraAnalyzer.cs deleted file mode 100644 index 326e145a6..000000000 --- a/Source/ZXing.Net.Mobile.Android/CameraAccess/CameraAnalyzer.cs +++ /dev/null @@ -1,165 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Android.Views; -using ApxLabs.FastAndroidCamera; - -namespace ZXing.Mobile.CameraAccess -{ - public class CameraAnalyzer - { - private readonly CameraController _cameraController; - private readonly CameraEventsListener _cameraEventListener; - private Task _processingTask; - private DateTime _lastPreviewAnalysis = DateTime.UtcNow; - private bool _wasScanned; - IScannerSessionHost _scannerHost; - - public CameraAnalyzer(SurfaceView surfaceView, IScannerSessionHost scannerHost) - { - _scannerHost = scannerHost; - _cameraEventListener = new CameraEventsListener(); - _cameraController = new CameraController(surfaceView, _cameraEventListener, scannerHost); - Torch = new Torch(_cameraController, surfaceView.Context); - } - - public Action BarcodeFound; - - public Torch Torch { get; } - - public bool IsAnalyzing { get; private set; } - - public void PauseAnalysis() - { - IsAnalyzing = false; - } - - public void ResumeAnalysis() - { - IsAnalyzing = true; - } - - public void ShutdownCamera() - { - IsAnalyzing = false; - _cameraEventListener.OnPreviewFrameReady -= HandleOnPreviewFrameReady; - _cameraController.ShutdownCamera(); - } - - public void SetupCamera() - { - _cameraEventListener.OnPreviewFrameReady += HandleOnPreviewFrameReady; - _cameraController.SetupCamera(); - } - - public void AutoFocus() - { - _cameraController.AutoFocus(); - } - - public void AutoFocus(int x, int y) - { - _cameraController.AutoFocus(x, y); - } - - public void RefreshCamera() - { - _cameraController.RefreshCamera(); - } - - private bool CanAnalyzeFrame - { - get - { - if (!IsAnalyzing) - return false; - - //Check and see if we're still processing a previous frame - // todo: check if we can run as many as possible or mby run two analyzers at once (Vision + ZXing) - if (_processingTask != null && !_processingTask.IsCompleted) - return false; - - var elapsedTimeMs = (DateTime.UtcNow - _lastPreviewAnalysis).TotalMilliseconds; - if (elapsedTimeMs < _scannerHost.ScanningOptions.DelayBetweenAnalyzingFrames) - return false; - - // Delay a minimum between scans - if (_wasScanned && elapsedTimeMs < _scannerHost.ScanningOptions.DelayBetweenContinuousScans) - return false; - - return true; - } - } - - private void HandleOnPreviewFrameReady(object sender, FastJavaByteArray fastArray) - { - if (!CanAnalyzeFrame) - return; - - _wasScanned = false; - _lastPreviewAnalysis = DateTime.UtcNow; - - _processingTask = Task.Run(() => - { - try - { - DecodeFrame(fastArray); - } catch (Exception ex) { - Console.WriteLine(ex); - } - }).ContinueWith(task => - { - if (task.IsFaulted) - Android.Util.Log.Debug(MobileBarcodeScanner.TAG, "DecodeFrame exception occurs"); - }, TaskContinuationOptions.OnlyOnFaulted); - } - - private void DecodeFrame(FastJavaByteArray fastArray) - { - var cameraParameters = _cameraController.Camera.GetParameters(); - var width = cameraParameters.PreviewSize.Width; - var height = cameraParameters.PreviewSize.Height; - - var barcodeReader = _scannerHost.ScanningOptions.BuildBarcodeReader(); - - var rotate = false; - var newWidth = width; - var newHeight = height; - - // use last value for performance gain - var cDegrees = _cameraController.LastCameraDisplayOrientationDegree; - - if (cDegrees == 90 || cDegrees == 270) - { - rotate = true; - newWidth = height; - newHeight = width; - } - - ZXing.Result result = null; - var start = PerformanceCounter.Start(); - - LuminanceSource fast = new FastJavaByteArrayYUVLuminanceSource(fastArray, width, height, 0, 0, width, height); // _area.Left, _area.Top, _area.Width, _area.Height); - if (rotate) - fast = fast.rotateCounterClockwise(); - - result = barcodeReader.Decode(fast); - - fastArray.Dispose(); - fastArray = null; - - PerformanceCounter.Stop(start, - "Decode Time: {0} ms (width: " + width + ", height: " + height + ", degrees: " + cDegrees + ", rotate: " + - rotate + ")"); - - if (result != null) - { - Android.Util.Log.Debug(MobileBarcodeScanner.TAG, "Barcode Found"); - - _wasScanned = true; - BarcodeFound?.Invoke(result); - return; - } - } - } -} \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.Android/CameraAccess/CameraController.cs b/Source/ZXing.Net.Mobile.Android/CameraAccess/CameraController.cs deleted file mode 100644 index 61f7b8e3b..000000000 --- a/Source/ZXing.Net.Mobile.Android/CameraAccess/CameraController.cs +++ /dev/null @@ -1,435 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Android.Content; -using Android.Graphics; -using Android.Hardware; -using Android.OS; -using Android.Runtime; -using Android.Views; -using ApxLabs.FastAndroidCamera; -using Camera = Android.Hardware.Camera; - -namespace ZXing.Mobile.CameraAccess -{ - public class CameraController - { - private readonly Context _context; - private readonly ISurfaceHolder _holder; - private readonly SurfaceView _surfaceView; - private readonly CameraEventsListener _cameraEventListener; - private int _cameraId; - IScannerSessionHost _scannerHost; - - public CameraController(SurfaceView surfaceView, CameraEventsListener cameraEventListener, IScannerSessionHost scannerHost) - { - _context = surfaceView.Context; - _holder = surfaceView.Holder; - _surfaceView = surfaceView; - _cameraEventListener = cameraEventListener; - _scannerHost = scannerHost; - } - - public Camera Camera { get; private set; } - - public int LastCameraDisplayOrientationDegree { get; private set; } - - public void RefreshCamera() - { - if (_holder == null) return; - - ApplyCameraSettings(); - - try - { - Camera.SetPreviewDisplay(_holder); - Camera.StartPreview(); - } - catch (Exception ex) - { - Android.Util.Log.Debug(MobileBarcodeScanner.TAG, ex.ToString()); - } - } - - public void SetupCamera() - { - if (Camera != null) return; - - ZXing.Net.Mobile.Android.PermissionsHandler.CheckCameraPermissions(_context); - - var perf = PerformanceCounter.Start(); - OpenCamera(); - PerformanceCounter.Stop(perf, "Setup Camera took {0}ms"); - - if (Camera == null) return; - - perf = PerformanceCounter.Start(); - ApplyCameraSettings(); - - try - { - Camera.SetPreviewDisplay(_holder); - - - var previewParameters = Camera.GetParameters(); - var previewSize = previewParameters.PreviewSize; - var bitsPerPixel = ImageFormat.GetBitsPerPixel(previewParameters.PreviewFormat); - - - int bufferSize = (previewSize.Width * previewSize.Height * bitsPerPixel) / 8; - const int NUM_PREVIEW_BUFFERS = 5; - for (uint i = 0; i < NUM_PREVIEW_BUFFERS; ++i) - { - using (var buffer = new FastJavaByteArray(bufferSize)) - Camera.AddCallbackBuffer(buffer); - } - - - - Camera.StartPreview(); - - Camera.SetNonMarshalingPreviewCallback(_cameraEventListener); - } - catch (Exception ex) - { - Android.Util.Log.Debug(MobileBarcodeScanner.TAG, ex.ToString()); - return; - } - finally - { - PerformanceCounter.Stop(perf, "Setup Camera Parameters took {0}ms"); - } - - // Docs suggest if Auto or Macro modes, we should invoke AutoFocus at least once - var currentFocusMode = Camera.GetParameters().FocusMode; - if (currentFocusMode == Camera.Parameters.FocusModeAuto - || currentFocusMode == Camera.Parameters.FocusModeMacro) - AutoFocus(); - } - - public void AutoFocus() - { - AutoFocus(0, 0, false); - } - - public void AutoFocus(int x, int y) - { - // The bounds for focus areas are actually -1000 to 1000 - // So we need to translate the touch coordinates to this scale - var focusX = x / _surfaceView.Width * 2000 - 1000; - var focusY = y / _surfaceView.Height * 2000 - 1000; - - // Call the autofocus with our coords - AutoFocus(focusX, focusY, true); - } - - public void ShutdownCamera() - { - if (Camera == null) return; - - // camera release logic takes about 0.005 sec so there is no need in async releasing - var perf = PerformanceCounter.Start(); - try - { - try - { - Camera.StopPreview(); - Camera.SetNonMarshalingPreviewCallback(null); - - //Camera.SetPreviewCallback(null); - - Android.Util.Log.Debug(MobileBarcodeScanner.TAG, $"Calling SetPreviewDisplay: null"); - Camera.SetPreviewDisplay(null); - } - catch (Exception ex) - { - Android.Util.Log.Error(MobileBarcodeScanner.TAG, ex.ToString()); - } - Camera.Release(); - Camera = null; - } - catch (Exception e) - { - Android.Util.Log.Error(MobileBarcodeScanner.TAG, e.ToString()); - } - - PerformanceCounter.Stop(perf, "Shutdown camera took {0}ms"); - } - - private void OpenCamera() - { - try - { - var version = Build.VERSION.SdkInt; - - if (version >= BuildVersionCodes.Gingerbread) - { - Android.Util.Log.Debug(MobileBarcodeScanner.TAG, "Checking Number of cameras..."); - - var numCameras = Camera.NumberOfCameras; - var camInfo = new Camera.CameraInfo(); - var found = false; - Android.Util.Log.Debug(MobileBarcodeScanner.TAG, "Found " + numCameras + " cameras..."); - - var whichCamera = CameraFacing.Back; - - if (_scannerHost.ScanningOptions.UseFrontCameraIfAvailable.HasValue && - _scannerHost.ScanningOptions.UseFrontCameraIfAvailable.Value) - whichCamera = CameraFacing.Front; - - for (var i = 0; i < numCameras; i++) - { - Camera.GetCameraInfo(i, camInfo); - if (camInfo.Facing == whichCamera) - { - Android.Util.Log.Debug(MobileBarcodeScanner.TAG, - "Found " + whichCamera + " Camera, opening..."); - Camera = Camera.Open(i); - _cameraId = i; - found = true; - break; - } - } - - if (!found) - { - Android.Util.Log.Debug(MobileBarcodeScanner.TAG, - "Finding " + whichCamera + " camera failed, opening camera 0..."); - Camera = Camera.Open(0); - _cameraId = 0; - } - } - else - { - Camera = Camera.Open(); - } - - //if (Camera != null) - // Camera.SetPreviewCallback(_cameraEventListener); - //else - // MobileBarcodeScanner.LogWarn(MobileBarcodeScanner.TAG, "Camera is null :("); - } - catch (Exception ex) - { - ShutdownCamera(); - MobileBarcodeScanner.LogError("Setup Error: {0}", ex); - } - } - - private void ApplyCameraSettings() - { - if (Camera == null) - { - OpenCamera(); - } - - // do nothing if something wrong with camera - if (Camera == null) return; - - var parameters = Camera.GetParameters(); - parameters.PreviewFormat = ImageFormatType.Nv21; - - var supportedFocusModes = parameters.SupportedFocusModes; - if (_scannerHost.ScanningOptions.DisableAutofocus) - parameters.FocusMode = Camera.Parameters.FocusModeFixed; - else if (Build.VERSION.SdkInt >= BuildVersionCodes.IceCreamSandwich && - supportedFocusModes.Contains(Camera.Parameters.FocusModeContinuousPicture)) - parameters.FocusMode = Camera.Parameters.FocusModeContinuousPicture; - else if (supportedFocusModes.Contains(Camera.Parameters.FocusModeContinuousVideo)) - parameters.FocusMode = Camera.Parameters.FocusModeContinuousVideo; - else if (supportedFocusModes.Contains(Camera.Parameters.FocusModeAuto)) - parameters.FocusMode = Camera.Parameters.FocusModeAuto; - else if (supportedFocusModes.Contains(Camera.Parameters.FocusModeFixed)) - parameters.FocusMode = Camera.Parameters.FocusModeFixed; - - var selectedFps = parameters.SupportedPreviewFpsRange.FirstOrDefault(); - if (selectedFps != null) - { - // This will make sure we select a range with the lowest minimum FPS - // and maximum FPS which still has the lowest minimum - // This should help maximize performance / support for hardware - foreach (var fpsRange in parameters.SupportedPreviewFpsRange) - { - if (fpsRange[0] <= selectedFps[0] && fpsRange[1] > selectedFps[1]) - selectedFps = fpsRange; - } - parameters.SetPreviewFpsRange(selectedFps[0], selectedFps[1]); - } - - CameraResolution resolution = null; - var supportedPreviewSizes = parameters.SupportedPreviewSizes; - if (supportedPreviewSizes != null) - { - var availableResolutions = supportedPreviewSizes.Select(sps => new CameraResolution - { - Width = sps.Width, - Height = sps.Height - }); - - // Try and get a desired resolution from the options selector - resolution = _scannerHost.ScanningOptions.GetResolution(availableResolutions.ToList()); - - // If the user did not specify a resolution, let's try and find a suitable one - if (resolution == null) - { - foreach (var sps in supportedPreviewSizes) - { - if (sps.Width >= 640 && sps.Width <= 1000 && sps.Height >= 360 && sps.Height <= 1000) - { - resolution = new CameraResolution - { - Width = sps.Width, - Height = sps.Height - }; - break; - } - } - } - } - - // Google Glass requires this fix to display the camera output correctly - if (Build.Model.Contains("Glass")) - { - resolution = new CameraResolution - { - Width = 640, - Height = 360 - }; - // Glass requires 30fps - parameters.SetPreviewFpsRange(30000, 30000); - } - - // Hopefully a resolution was selected at some point - if (resolution != null) - { - Android.Util.Log.Debug(MobileBarcodeScanner.TAG, - "Selected Resolution: " + resolution.Width + "x" + resolution.Height); - parameters.SetPreviewSize(resolution.Width, resolution.Height); - } - - Camera.SetParameters(parameters); - - SetCameraDisplayOrientation(); - } - - private void AutoFocus(int x, int y, bool useCoordinates) - { - if (Camera == null) return; - - if (_scannerHost.ScanningOptions.DisableAutofocus) - { - Android.Util.Log.Debug(MobileBarcodeScanner.TAG, "AutoFocus Disabled"); - return; - } - - var cameraParams = Camera.GetParameters(); - - Android.Util.Log.Debug(MobileBarcodeScanner.TAG, "AutoFocus Requested"); - - // Cancel any previous requests - Camera.CancelAutoFocus(); - - try - { - // If we want to use coordinates - // Also only if our camera supports Auto focus mode - // Since FocusAreas only really work with FocusModeAuto set - if (useCoordinates - && cameraParams.SupportedFocusModes.Contains(Camera.Parameters.FocusModeAuto)) - { - // Let's give the touched area a 20 x 20 minimum size rect to focus on - // So we'll offset -10 from the center of the touch and then - // make a rect of 20 to give an area to focus on based on the center of the touch - x = x - 10; - y = y - 10; - - // Ensure we don't go over the -1000 to 1000 limit of focus area - if (x >= 1000) - x = 980; - if (x < -1000) - x = -1000; - if (y >= 1000) - y = 980; - if (y < -1000) - y = -1000; - - // Explicitly set FocusModeAuto since Focus areas only work with this setting - cameraParams.FocusMode = Camera.Parameters.FocusModeAuto; - // Add our focus area - cameraParams.FocusAreas = new List - { - new Camera.Area(new Rect(x, y, x + 20, y + 20), 1000) - }; - Camera.SetParameters(cameraParams); - } - - // Finally autofocus (weather we used focus areas or not) - Camera.AutoFocus(_cameraEventListener); - } - catch (Exception ex) - { - Android.Util.Log.Debug(MobileBarcodeScanner.TAG, "AutoFocus Failed: {0}", ex); - } - } - - private void SetCameraDisplayOrientation() - { - var degrees = GetCameraDisplayOrientation(); - LastCameraDisplayOrientationDegree = degrees; - - Android.Util.Log.Debug(MobileBarcodeScanner.TAG, "Changing Camera Orientation to: " + degrees); - - try - { - Camera.SetDisplayOrientation(degrees); - } - catch (Exception ex) - { - Android.Util.Log.Error(MobileBarcodeScanner.TAG, ex.ToString()); - } - } - - private int GetCameraDisplayOrientation() - { - int degrees; - var windowManager = _context.GetSystemService(Context.WindowService).JavaCast(); - var display = windowManager.DefaultDisplay; - var rotation = display.Rotation; - - switch (rotation) - { - case SurfaceOrientation.Rotation0: - degrees = 0; - break; - case SurfaceOrientation.Rotation90: - degrees = 90; - break; - case SurfaceOrientation.Rotation180: - degrees = 180; - break; - case SurfaceOrientation.Rotation270: - degrees = 270; - break; - default: - throw new ArgumentOutOfRangeException(); - } - - var info = new Camera.CameraInfo(); - Camera.GetCameraInfo(_cameraId, info); - - int correctedDegrees; - if (info.Facing == CameraFacing.Front) - { - correctedDegrees = (info.Orientation + degrees)%360; - correctedDegrees = (360 - correctedDegrees)%360; // compensate the mirror - } - else - { - // back-facing - correctedDegrees = (info.Orientation - degrees + 360)%360; - } - - return correctedDegrees; - } - } -} \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.Android/CameraAccess/CameraEventsListener.cs b/Source/ZXing.Net.Mobile.Android/CameraAccess/CameraEventsListener.cs deleted file mode 100644 index fcf0c224f..000000000 --- a/Source/ZXing.Net.Mobile.Android/CameraAccess/CameraEventsListener.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using Android.Hardware; -using ApxLabs.FastAndroidCamera; - -namespace ZXing.Mobile.CameraAccess -{ - public class CameraEventsListener : Java.Lang.Object, INonMarshalingPreviewCallback, Camera.IAutoFocusCallback - { - public event EventHandler OnPreviewFrameReady; - - //public void OnPreviewFrame(byte[] data, Camera camera) - //{ - // OnPreviewFrameReady?.Invoke(this, data); - //} - - public void OnPreviewFrame(IntPtr data, Camera camera) - { - using (var fastArray = new FastJavaByteArray(data)) - { - OnPreviewFrameReady?.Invoke(this, fastArray); - - camera.AddCallbackBuffer(fastArray); - } - } - - public void OnAutoFocus(bool success, Camera camera) - { - Android.Util.Log.Debug(MobileBarcodeScanner.TAG, "AutoFocus {0}", success ? "Succeeded" : "Failed"); - } - } -} \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.Android/CameraAccess/Torch.cs b/Source/ZXing.Net.Mobile.Android/CameraAccess/Torch.cs deleted file mode 100644 index 2ec8c9c5d..000000000 --- a/Source/ZXing.Net.Mobile.Android/CameraAccess/Torch.cs +++ /dev/null @@ -1,103 +0,0 @@ -using Android.Content; -using Android.Content.PM; -using Android.Hardware; - -namespace ZXing.Mobile.CameraAccess -{ - public class Torch - { - private readonly CameraController _cameraController; - private readonly Context _context; - private bool? _hasTorch; - - public Torch(CameraController cameraController, Context context) - { - _cameraController = cameraController; - _context = context; - } - - public bool IsSupported - { - get - { - if (_hasTorch.HasValue) - return _hasTorch.Value; - - if (!_context.PackageManager.HasSystemFeature(PackageManager.FeatureCameraFlash)) - { - Android.Util.Log.Info(MobileBarcodeScanner.TAG, "Flash not supported on this device"); - return false; - } - - if (_cameraController.Camera == null) - { - Android.Util.Log.Info(MobileBarcodeScanner.TAG, "Run camera first"); - return false; - } - - var p = _cameraController.Camera.GetParameters(); - var supportedFlashModes = p.SupportedFlashModes; - - if ((supportedFlashModes != null) - && (supportedFlashModes.Contains(Camera.Parameters.FlashModeTorch) - || supportedFlashModes.Contains(Camera.Parameters.FlashModeOn))) - _hasTorch = ZXing.Net.Mobile.Android.PermissionsHandler.CheckTorchPermissions(_context, false); - - return _hasTorch != null && _hasTorch.Value; - } - } - - public bool IsEnabled { get; private set; } - - public void TurnOn() - { - Enable(true); - } - - public void TurnOff() - { - Enable(false); - } - - public void Toggle() - { - Enable(!IsEnabled); - } - - private void Enable(bool state) - { - if (!IsSupported || IsEnabled == state) - return; - - if (_cameraController.Camera == null) - { - Android.Util.Log.Info(MobileBarcodeScanner.TAG, "NULL Camera, cannot toggle torch"); - return; - } - - var parameters = _cameraController.Camera.GetParameters(); - var supportedFlashModes = parameters.SupportedFlashModes; - - var flashMode = string.Empty; - if (state) - { - if (supportedFlashModes.Contains(Camera.Parameters.FlashModeTorch)) - flashMode = Camera.Parameters.FlashModeTorch; - else if (supportedFlashModes.Contains(Camera.Parameters.FlashModeOn)) - flashMode = Camera.Parameters.FlashModeOn; - } - else - { - if (supportedFlashModes != null && supportedFlashModes.Contains(Camera.Parameters.FlashModeOff)) - flashMode = Camera.Parameters.FlashModeOff; - } - - if (!string.IsNullOrEmpty(flashMode)) - { - parameters.FlashMode = flashMode; - _cameraController.Camera.SetParameters(parameters); - IsEnabled = state; - } - } - } -} \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.Android/FastJavaArrayEx.cs b/Source/ZXing.Net.Mobile.Android/FastJavaArrayEx.cs deleted file mode 100644 index 504663da2..000000000 --- a/Source/ZXing.Net.Mobile.Android/FastJavaArrayEx.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using ApxLabs.FastAndroidCamera; - -namespace ZXing.Mobile -{ - public static class FastJavaArrayEx - { - public static void BlockCopyTo(this FastJavaByteArray self, int sourceIndex, byte[] array, int arrayIndex, int length) - { - unsafe - { - Marshal.Copy(new IntPtr(self.Raw + sourceIndex), array, arrayIndex, Math.Min(length, Math.Min(self.Count, array.Length - arrayIndex))); - } - } - } -} \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.Android/FastJavaByteArrayYUVLuminanceSource.cs b/Source/ZXing.Net.Mobile.Android/FastJavaByteArrayYUVLuminanceSource.cs deleted file mode 100644 index d802959b2..000000000 --- a/Source/ZXing.Net.Mobile.Android/FastJavaByteArrayYUVLuminanceSource.cs +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright 2009 ZXing authors - * Modifications copyright 2016 kasper@byolimit.com - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -using ApxLabs.FastAndroidCamera; - -using System; - -namespace ZXing.Mobile -{ - /// - /// This object extends LuminanceSource around an array of YUV data returned from the camera driver, - /// with the option to crop to a rectangle within the full data. This can be used to exclude - /// superfluous pixels around the perimeter and speed up decoding. - /// It works for any pixel format where the Y channel is planar and appears first, including - /// YCbCr_420_SP and YCbCr_422_SP. - /// - /// - /// Builds upon PlanarYUVLuminanceSource from ZXing.NET, which is a .Net port of ZXing. The original code - /// was authored by - /// @author dswitkin@google.com (Daniel Switkin) - /// - public sealed class FastJavaByteArrayYUVLuminanceSource : BaseLuminanceSource - { - private readonly FastJavaByteArray _yuv; - private readonly int _dataWidth; - private readonly int _dataHeight; - private readonly int _left; - private readonly int _top; - - /// - /// Initializes a new instance of the class. - /// - /// The yuv data. - /// Width of the data. - /// Height of the data. - /// The left. - /// The top. - /// The width. - /// The height. - /// if set to true [reverse horiz]. - public FastJavaByteArrayYUVLuminanceSource(FastJavaByteArray yuv, - int dataWidth, - int dataHeight, - int left, - int top, - int width, - int height) - : base(width, height) - { - if (left < 0) - throw new ArgumentException("Negative value", nameof(left)); - - if (top < 0) - throw new ArgumentException("Negative value", nameof(top)); - - if (width < 0) - throw new ArgumentException("Negative value", nameof(width)); - - if (height < 0) - throw new ArgumentException("Negative value", nameof(height)); - - if (left + width > dataWidth || top + height > dataHeight) - { - throw new ArgumentException("Crop rectangle does not fit within image data."); - } - - _yuv = yuv; - _dataWidth = dataWidth; - _dataHeight = dataHeight; - _left = left; - _top = top; - } - - /// - /// Fetches one row of luminance data from the underlying platform's bitmap. Values range from - /// 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have - /// to bitwise and with 0xff for each value. It is preferable for implementations of this method - /// to only fetch this row rather than the whole image, since no 2D Readers may be installed and - /// getMatrix() may never be called. - /// - /// The row to fetch, 0 <= y < Height. - /// An optional preallocated array. If null or too small, it will be ignored. - /// Always use the returned object, and ignore the .length of the array. - /// - /// An array containing the luminance data of the requested row. - /// - override public byte[] getRow(int y, byte[] row) - { - if (y < 0 || y >= Height) - throw new ArgumentException("Requested row is outside the image: " + y, nameof(y)); - - int width = Width; - if (row == null || row.Length < width) - row = new byte[width]; // ensure we have room for the row - - int offset = (y + _top) * _dataWidth + _left; - _yuv.BlockCopyTo(offset, row, 0, width); - return row; - } - - override public byte[] Matrix - { - get - { - int width = Width; - int height = Height; - - int area = width * height; - byte[] matrix = new byte[area]; - int inputOffset = _top * _dataWidth + _left; - - // If the width matches the full width of the underlying data, perform a single copy. - if (width == _dataWidth) - { - _yuv.BlockCopyTo(inputOffset, matrix, 0, area); - return matrix; - } - - // Otherwise copy one cropped row at a time. - for (int y = 0; y < height; y++) - { - int outputOffset = y * width; - _yuv.BlockCopyTo(inputOffset, matrix, outputOffset, width); - inputOffset += _dataWidth; - } - return matrix; - } - } - - /// Whether this subclass supports cropping. - override public bool CropSupported - { - get { return true; } - } - - /// - /// Returns a new object with cropped image data. Implementations may keep a reference to the - /// original data rather than a copy. Only callable if CropSupported is true. - /// - /// The left coordinate, 0 <= left < Width. - /// The top coordinate, 0 <= top <= Height. - /// The width of the rectangle to crop. - /// The height of the rectangle to crop. - /// - /// A cropped version of this object. - /// - override public LuminanceSource crop(int left, int top, int width, int height) - { - return new FastJavaByteArrayYUVLuminanceSource(_yuv, - _dataWidth, - _dataHeight, - _left + left, - _top + top, - width, - height); - } - - protected override LuminanceSource CreateLuminanceSource(byte[] newLuminances, int width, int height) - { - // Called when rotating. - // todo: This partially defeats the purpose as we traffic in byte[] luminances - return new PlanarYUVLuminanceSource(newLuminances, width, height, 0, 0, width, height, false); - } - } -} \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.Android/MobileBarcodeScanner.cs b/Source/ZXing.Net.Mobile.Android/MobileBarcodeScanner.cs deleted file mode 100644 index c1771b9d7..000000000 --- a/Source/ZXing.Net.Mobile.Android/MobileBarcodeScanner.cs +++ /dev/null @@ -1,180 +0,0 @@ -using System; -using System.Threading.Tasks; -using Android.Content; -using ZXing; -using Android.OS; - -namespace ZXing.Mobile -{ - - public class MobileBarcodeScanner : MobileBarcodeScannerBase - { - public const string TAG = "ZXing.Net.Mobile"; - - static ActivityLifecycleContextListener lifecycleListener; - - public static void Initialize (Android.App.Application app) - { - var version = Build.VERSION.SdkInt; - - if (version >= BuildVersionCodes.IceCreamSandwich) { - lifecycleListener = new ActivityLifecycleContextListener (); - app.RegisterActivityLifecycleCallbacks (lifecycleListener); - } - } - - public static void Uninitialize (Android.App.Application app) - { - var version = Build.VERSION.SdkInt; - - if (version >= BuildVersionCodes.IceCreamSandwich) - app.UnregisterActivityLifecycleCallbacks (lifecycleListener); - } - - public Android.Views.View CustomOverlay { get; set; } - //public int CaptureSound { get;set; } - - bool torch = false; - - Context GetContext (Context context) - { - if (context != null) - return context; - - var version = Build.VERSION.SdkInt; - - if (version >= BuildVersionCodes.IceCreamSandwich) - return lifecycleListener.Context; - else - return Android.App.Application.Context; - } - - public override void ScanContinuously (MobileBarcodeScanningOptions options, Action scanHandler) - { - ScanContinuously (null, options, scanHandler); - } - - public void ScanContinuously (Context context, MobileBarcodeScanningOptions options, Action scanHandler) - { - var ctx = GetContext (context); - var scanIntent = new Intent(ctx, typeof(ZxingActivity)); - - scanIntent.AddFlags(ActivityFlags.NewTask); - - ZxingActivity.UseCustomOverlayView = this.UseCustomOverlay; - ZxingActivity.CustomOverlayView = this.CustomOverlay; - ZxingActivity.ScanningOptions = options; - ZxingActivity.ScanContinuously = true; - ZxingActivity.TopText = TopText; - ZxingActivity.BottomText = BottomText; - - ZxingActivity.ScanCompletedHandler = (Result result) => - { - if (scanHandler != null) - scanHandler (result); - }; - - ctx.StartActivity(scanIntent); - } - - public override Task Scan (MobileBarcodeScanningOptions options) - { - return Scan (null, options); - } - public Task Scan (Context context, MobileBarcodeScanningOptions options) - { - var ctx = GetContext (context); - - var task = Task.Factory.StartNew(() => { - - var waitScanResetEvent = new System.Threading.ManualResetEvent(false); - - var scanIntent = new Intent(ctx, typeof(ZxingActivity)); - - scanIntent.AddFlags(ActivityFlags.NewTask); - - ZxingActivity.UseCustomOverlayView = this.UseCustomOverlay; - ZxingActivity.CustomOverlayView = this.CustomOverlay; - ZxingActivity.ScanningOptions = options; - ZxingActivity.ScanContinuously = false; - ZxingActivity.TopText = TopText; - ZxingActivity.BottomText = BottomText; - - Result scanResult = null; - - ZxingActivity.CanceledHandler = () => - { - waitScanResetEvent.Set(); - }; - - ZxingActivity.ScanCompletedHandler = (Result result) => - { - scanResult = result; - waitScanResetEvent.Set(); - }; - - ctx.StartActivity (scanIntent); - - waitScanResetEvent.WaitOne(); - - return scanResult; - }); - - return task; - } - - public override void Cancel() - { - ZxingActivity.RequestCancel(); - } - - public override void AutoFocus () - { - ZxingActivity.RequestAutoFocus(); - } - - public override void Torch (bool on) - { - torch = on; - ZxingActivity.RequestTorch(on); - } - - public override void ToggleTorch () - { - Torch (!torch); - } - - public override void PauseAnalysis () - { - ZxingActivity.RequestPauseAnalysis (); - } - - public override void ResumeAnalysis () - { - ZxingActivity.RequestResumeAnalysis (); - } - - public override bool IsTorchOn { - get { - return torch; - } - } - - internal static void LogDebug (string format, params object [] args) - { - Android.Util.Log.Debug ("ZXING", format, args); - } - internal static void LogError (string format, params object [] args) - { - Android.Util.Log.Error ("ZXING", format, args); - } - internal static void LogInfo (string format, params object [] args) - { - Android.Util.Log.Info ("ZXING", format, args); - } - internal static void LogWarn (string format, params object [] args) - { - Android.Util.Log.Warn ("ZXING", format, args); - } - } -} diff --git a/Source/ZXing.Net.Mobile.Android/Permissions.cs b/Source/ZXing.Net.Mobile.Android/Permissions.cs deleted file mode 100644 index ec14de0a7..000000000 --- a/Source/ZXing.Net.Mobile.Android/Permissions.cs +++ /dev/null @@ -1,3 +0,0 @@ -using Android.App; - -[assembly: UsesPermission (Android.Manifest.Permission.Camera)] \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.Android/PermissionsHandler.cs b/Source/ZXing.Net.Mobile.Android/PermissionsHandler.cs deleted file mode 100644 index 7443ddbd2..000000000 --- a/Source/ZXing.Net.Mobile.Android/PermissionsHandler.cs +++ /dev/null @@ -1,164 +0,0 @@ -using System; -using System.Collections.Generic; -using ZXing.Mobile; -using System.Linq; -using Android.App; -using System.Threading.Tasks; -using Android.Content.PM; -using Android.Content; -using Android.Support.V4.Content; -using Android.Support.V4.App; - -namespace ZXing.Net.Mobile.Android -{ - public static class PermissionsHandler - { - static TaskCompletionSource requestCompletion = null; - - public static Task PermissionRequestTask - { - get - { - return requestCompletion?.Task ?? Task.CompletedTask; - } - } - - public static bool NeedsPermissionRequest(Context context) - { - var permissionsToRequest = new List(); - - // Check and request any permissions - foreach (var permission in ZxingActivity.RequiredPermissions) - { - if (IsPermissionInManifest(context, permission)) - { - if (!IsPermissionGranted(context, permission)) - return true; - } - } - - return false; - } - - public static Task RequestPermissionsAsync (Activity activity) - { - if (requestCompletion != null && !requestCompletion.Task.IsCompleted) - return requestCompletion.Task; - - var permissionsToRequest = new List(); - - // Check and request any permissions - foreach (var permission in ZxingActivity.RequiredPermissions) - { - if (IsPermissionInManifest(activity, permission)) - { - if (!IsPermissionGranted(activity, permission)) - permissionsToRequest.Add(permission); - } - } - - if (permissionsToRequest.Any()) - { - DoRequestPermissions(activity, permissionsToRequest.ToArray(), 101); - requestCompletion = new TaskCompletionSource(); - - return requestCompletion.Task; - } - - return Task.FromResult(true); - } - - public static void OnRequestPermissionsResult(int requestCode, string[] permissions, Permission[] grantResults) - { - if (requestCompletion != null && !requestCompletion.Task.IsCompleted) - { - var success = true; - - foreach (var gr in grantResults) - { - if (gr == Permission.Denied) - { - success = false; - break; - } - } - - requestCompletion.TrySetResult(success); - } - } - - - internal static bool IsPermissionInManifest (Context context, string permission) - { - try - { - var info = context.PackageManager.GetPackageInfo(context.PackageName, PackageInfoFlags.Permissions); - return info.RequestedPermissions.Contains(permission); - } - catch - { - } - - return false; - } - - internal static bool IsPermissionGranted(Context context, string permission) - { - return ContextCompat.CheckSelfPermission(context, permission) == Permission.Granted; - } - - internal static bool DoRequestPermissions(Activity activity, string[] permissions, int requestCode) - { - var permissionsToRequest = new List(); - foreach (var permission in permissions) - { - if (ContextCompat.CheckSelfPermission(activity, permission) != Permission.Granted) - permissionsToRequest.Add(permission); - } - - if (permissionsToRequest.Any()) - { - ActivityCompat.RequestPermissions(activity, permissionsToRequest.ToArray(), requestCode); - return true; - } - - return false; - } - - internal static bool CheckCameraPermissions(Context context, bool throwOnError = true) - { - return CheckPermissions(context, global::Android.Manifest.Permission.Camera, throwOnError); - } - - internal static bool CheckTorchPermissions(Context context, bool throwOnError = true) - { - return CheckPermissions(context, global::Android.Manifest.Permission.Flashlight, throwOnError); - } - - internal static bool CheckPermissions(Context context, string permission, bool throwOnError = true) - { - var result = true; - var perf = PerformanceCounter.Start(); - - global::Android.Util.Log.Debug(MobileBarcodeScanner.TAG, "Checking " + permission + "..."); - - if (!IsPermissionInManifest(context, permission) || !IsPermissionGranted(context, permission)) - { - result = false; - - if (throwOnError) - { - var msg = "ZXing.Net.Mobile requires: " + permission + ", but was not found in your AndroidManifest.xml file."; - global::Android.Util.Log.Error("ZXing.Net.Mobile", msg); - - throw new UnauthorizedAccessException(msg); - } - } - - PerformanceCounter.Stop(perf, "CheckPermissions took {0}ms"); - - return result; - } - } -} - diff --git a/Source/ZXing.Net.Mobile.Android/ZXing.Net.Mobile.Android.csproj b/Source/ZXing.Net.Mobile.Android/ZXing.Net.Mobile.Android.csproj deleted file mode 100644 index 0fad828b0..000000000 --- a/Source/ZXing.Net.Mobile.Android/ZXing.Net.Mobile.Android.csproj +++ /dev/null @@ -1,85 +0,0 @@ - - - - Debug - AnyCPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59} - {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Library - Properties - Resources\Resource.designer.cs - 512 - Off - ZXing.Mobile - ZXingNetMobile - v4.0.3 - - - False - ..\..\Build\Debug\android\ - 4 - None - MONODROID;DEBUG - true - true - - - none - False - ..\..\Build\Release\android\ - 4 - False - MONODROID - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB} - ZXing.Net.Mobile.Core - - - {24b441f2-cbe9-4405-9fd0-72ebcbea0ec3} - zxing.portable - - - - - - - \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.Android/ZXingScannerFragment.cs b/Source/ZXing.Net.Mobile.Android/ZXingScannerFragment.cs deleted file mode 100644 index f9ccefd7a..000000000 --- a/Source/ZXing.Net.Mobile.Android/ZXingScannerFragment.cs +++ /dev/null @@ -1,179 +0,0 @@ -using System; -using Android.OS; -using Android.Views; -using Android.Widget; -using Android.Support.V4.App; - -namespace ZXing.Mobile -{ - public class ZXingScannerFragment : Fragment, IZXingScanner, IScannerView - { - public ZXingScannerFragment() - { - UseCustomOverlayView = false; - } - - FrameLayout frame; - - public override View OnCreateView (LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) - { - frame = (FrameLayout)layoutInflater.Inflate(Resource.Layout.zxingscannerfragmentlayout, viewGroup, false); - - var layoutParams = getChildLayoutParams(); - - try - { - scanner = new ZXingSurfaceView (this.Activity, ScanningOptions); - - frame.AddView(scanner, layoutParams); - - - if (!UseCustomOverlayView) - { - zxingOverlay = new ZxingOverlayView (this.Activity); - zxingOverlay.TopText = TopText ?? ""; - zxingOverlay.BottomText = BottomText ?? ""; - - frame.AddView (zxingOverlay, layoutParams); - } - else if (CustomOverlayView != null) - { - frame.AddView(CustomOverlayView, layoutParams); - } - } - catch (Exception ex) - { - Console.WriteLine ("Create Surface View Failed: " + ex); - } - - Android.Util.Log.Debug (MobileBarcodeScanner.TAG, "ZXingScannerFragment->OnResume exit"); - - return frame; - } - - public override void OnStart() - { - base.OnStart(); - // won't be 0 if OnCreateView has been called before. - if (frame.ChildCount == 0) - { - var layoutParams = getChildLayoutParams(); - // reattach scanner and overlay views. - frame.AddView(scanner, layoutParams); - - if (!UseCustomOverlayView) - frame.AddView (zxingOverlay, layoutParams); - else if (CustomOverlayView != null) - frame.AddView (CustomOverlayView, layoutParams); - } - } - - public override void OnStop() - { - if (scanner != null) - { - scanner.StopScanning(); - - frame.RemoveView(scanner); - } - - if (!UseCustomOverlayView) - frame.RemoveView(zxingOverlay); - else if (CustomOverlayView != null) - frame.RemoveView(CustomOverlayView); - - base.OnStop(); - } - - private LinearLayout.LayoutParams getChildLayoutParams() - { - var layoutParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent); - layoutParams.Weight = 1; - return layoutParams; - } - - public View CustomOverlayView { get;set; } - public bool UseCustomOverlayView { get; set ; } - public MobileBarcodeScanningOptions ScanningOptions { get;set; } - public string TopText { get;set; } - public string BottomText { get;set; } - - ZXingSurfaceView scanner; - ZxingOverlayView zxingOverlay; - - public void Torch(bool on) - { - scanner?.Torch(on); - } - - public void AutoFocus() - { - scanner?.AutoFocus(); - } - - public void AutoFocus(int x, int y) - { - scanner?.AutoFocus(x, y); - } - - Action scanCallback; - //bool scanImmediately = false; - - public void StartScanning (Action scanResultHandler, MobileBarcodeScanningOptions options = null) - { - ScanningOptions = options; - scanCallback = scanResultHandler; - - if (scanner == null) { - //scanImmediately = true; - return; - } - - scan (); - } - - void scan () - { - scanner?.StartScanning (scanCallback, ScanningOptions); - } - - public void StopScanning () - { - scanner?.StopScanning (); - } - - public void PauseAnalysis () - { - scanner?.PauseAnalysis (); - } - - public void ResumeAnalysis () - { - scanner?.ResumeAnalysis (); - } - - public void ToggleTorch () - { - scanner?.ToggleTorch (); - } - - public bool IsTorchOn { - get { - return scanner?.IsTorchOn ?? false; - } - } - - public bool IsAnalyzing { - get { - return scanner?.IsAnalyzing ?? false; - } - } - - public bool HasTorch { - get { - return scanner?.HasTorch ?? false; - } - } - } -} - diff --git a/Source/ZXing.Net.Mobile.Android/ZXingSurfaceView.cs b/Source/ZXing.Net.Mobile.Android/ZXingSurfaceView.cs deleted file mode 100644 index c4a7aca54..000000000 --- a/Source/ZXing.Net.Mobile.Android/ZXingSurfaceView.cs +++ /dev/null @@ -1,221 +0,0 @@ -using System; -using Android.Content; -using Android.Runtime; -using Android.Views; -using Android.Graphics; -using ZXing.Mobile.CameraAccess; - -namespace ZXing.Mobile -{ - public class ZXingSurfaceView : SurfaceView, ISurfaceHolderCallback, IScannerView, IScannerSessionHost - { - public ZXingSurfaceView(Context context, MobileBarcodeScanningOptions options) - : base(context) - { - ScanningOptions = options ?? new MobileBarcodeScanningOptions(); - Init(); - } - - protected ZXingSurfaceView(IntPtr javaReference, JniHandleOwnership transfer) - : base(javaReference, transfer) - { - Init(); - } - - bool addedHolderCallback = false; - - private void Init() - { - if (_cameraAnalyzer == null) - _cameraAnalyzer = new CameraAnalyzer(this, this); - - _cameraAnalyzer.ResumeAnalysis(); - - if (!addedHolderCallback) { - Holder.AddCallback(this); - Holder.SetType(SurfaceType.PushBuffers); - addedHolderCallback = true; - } - } - - public async void SurfaceCreated(ISurfaceHolder holder) - { - await ZXing.Net.Mobile.Android.PermissionsHandler.PermissionRequestTask; - - _cameraAnalyzer.SetupCamera(); - - _surfaceCreated = true; - } - - public async void SurfaceChanged(ISurfaceHolder holder, Format format, int wx, int hx) - { - await ZXing.Net.Mobile.Android.PermissionsHandler.PermissionRequestTask; - - _cameraAnalyzer.RefreshCamera(); - } - - public async void SurfaceDestroyed(ISurfaceHolder holder) - { - await ZXing.Net.Mobile.Android.PermissionsHandler.PermissionRequestTask; - - try { - if (addedHolderCallback) { - Holder.RemoveCallback(this); - addedHolderCallback = false; - } - } catch { } - - _cameraAnalyzer.ShutdownCamera(); - } - - public override bool OnTouchEvent(MotionEvent e) - { - var r = base.OnTouchEvent(e); - - switch (e.Action) - { - case MotionEventActions.Down: - return true; - case MotionEventActions.Up: - var touchX = e.GetX(); - var touchY = e.GetY(); - this.AutoFocus((int)touchX, (int)touchY); - break; - } - - return r; - } - - public void AutoFocus() - { - _cameraAnalyzer.AutoFocus(); - } - - public void AutoFocus(int x, int y) - { - _cameraAnalyzer.AutoFocus(x, y); - } - - public void StartScanning(Action scanResultCallback, MobileBarcodeScanningOptions options = null) - { - ScanningOptions = options ?? MobileBarcodeScanningOptions.Default; - - _cameraAnalyzer.BarcodeFound = (result) => - { - scanResultCallback?.Invoke(result); - }; - _cameraAnalyzer.ResumeAnalysis(); - } - - public void StopScanning() - { - _cameraAnalyzer.ShutdownCamera(); - } - - public void PauseAnalysis() - { - _cameraAnalyzer.PauseAnalysis(); - } - - public void ResumeAnalysis() - { - _cameraAnalyzer.ResumeAnalysis(); - } - - public void Torch(bool on) - { - if (on) - _cameraAnalyzer.Torch.TurnOn(); - else - _cameraAnalyzer.Torch.TurnOff(); - } - - public void ToggleTorch() - { - _cameraAnalyzer.Torch.Toggle(); - } - - public MobileBarcodeScanningOptions ScanningOptions { get; set; } - - public bool IsTorchOn => _cameraAnalyzer.Torch.IsEnabled; - - public bool IsAnalyzing => _cameraAnalyzer.IsAnalyzing; - - private CameraAnalyzer _cameraAnalyzer; - private bool _surfaceCreated; - - public bool HasTorch => _cameraAnalyzer.Torch.IsSupported; - - - #region possibl future drawing code - - // private void drawResultPoints (Bitmap barcode, ZXing.Result rawResult) - // { - // var points = rawResult.ResultPoints; - // - // if (points != null && points.Length > 0) { - // var canvas = new Canvas (barcode); - // Paint paint = new Paint (); - // paint.Color = Android.Graphics.Color.White; - // paint.StrokeWidth = 3.0f; - // paint.SetStyle (Paint.Style.Stroke); - // - // var border = new RectF (2, 2, barcode.Width - 2, barcode.Height - 2); - // canvas.DrawRect (border, paint); - // - // paint.Color = Android.Graphics.Color.Purple; - // - // if (points.Length == 2) { - // paint.StrokeWidth = 4.0f; - // drawLine (canvas, paint, points [0], points [1]); - // } else if (points.Length == 4 && - // (rawResult.BarcodeFormat == BarcodeFormat.UPC_A || - // rawResult.BarcodeFormat == BarcodeFormat.EAN_13)) { - // // Hacky special case -- draw two lines, for the barcode and metadata - // drawLine (canvas, paint, points [0], points [1]); - // drawLine (canvas, paint, points [2], points [3]); - // } else { - // paint.StrokeWidth = 10.0f; - // - // foreach (ResultPoint point in points) - // canvas.DrawPoint (point.X, point.Y, paint); - // } - // } - // } - - // private void drawLine (Canvas canvas, Paint paint, ResultPoint a, ResultPoint b) - // { - // canvas.DrawLine (a.X, a.Y, b.X, b.Y, paint); - // } - - #endregion - - protected override void OnAttachedToWindow() - { - base.OnAttachedToWindow(); - - // Reinit things - Init(); - } - - protected override void OnWindowVisibilityChanged(ViewStates visibility) - { - base.OnWindowVisibilityChanged(visibility); - if (visibility == ViewStates.Visible) - Init(); - } - - public override async void OnWindowFocusChanged(bool hasWindowFocus) - { - base.OnWindowFocusChanged(hasWindowFocus); - - if (!hasWindowFocus) return; - // SurfaceCreated/SurfaceChanged are not called on a resume - await ZXing.Net.Mobile.Android.PermissionsHandler.PermissionRequestTask; - - //only refresh the camera if the surface has already been created. Fixed #569 - if (_surfaceCreated) - _cameraAnalyzer.RefreshCamera(); - } - } -} diff --git a/Source/ZXing.Net.Mobile.Android/ZxingActivity.cs b/Source/ZXing.Net.Mobile.Android/ZxingActivity.cs deleted file mode 100644 index 1cf668b2e..000000000 --- a/Source/ZXing.Net.Mobile.Android/ZxingActivity.cs +++ /dev/null @@ -1,187 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Drawing; - -using Android.App; -using Android.Content.PM; -using Android.Views; -using Android.OS; -using Android.Hardware; -using Android.Graphics; - -using Android.Content; -using Android.Runtime; -using Android.Widget; - -using ZXing; -using Android.Support.V4.App; -using System.Linq; -using System.Threading.Tasks; - -namespace ZXing.Mobile -{ - [Activity (Label = "Scanner", ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.KeyboardHidden | ConfigChanges.ScreenLayout)] - public class ZxingActivity : FragmentActivity - { - public static readonly string[] RequiredPermissions = new[] { - Android.Manifest.Permission.Camera, - Android.Manifest.Permission.Flashlight - }; - - public static Action ScanCompletedHandler; - public static Action CanceledHandler; - - public static Action CancelRequestedHandler; - public static Action TorchRequestedHandler; - public static Action AutoFocusRequestedHandler; - public static Action PauseAnalysisHandler; - public static Action ResumeAnalysisHandler; - - public static void RequestCancel () - { - var h = CancelRequestedHandler; - if (h != null) - h (); - } - - public static void RequestTorch (bool torchOn) - { - var h = TorchRequestedHandler; - if (h != null) - h (torchOn); - } - - public static void RequestAutoFocus () - { - var h = AutoFocusRequestedHandler; - if (h != null) - h (); - } - - public static void RequestPauseAnalysis () - { - var h = PauseAnalysisHandler; - if (h != null) - h (); - } - - public static void RequestResumeAnalysis () - { - var h = ResumeAnalysisHandler; - if (h != null) - h (); - } - - public static View CustomOverlayView { get; set; } - - public static bool UseCustomOverlayView { get; set; } - - public static MobileBarcodeScanningOptions ScanningOptions { get; set; } - - public static string TopText { get; set; } - - public static string BottomText { get; set; } - - public static bool ScanContinuously { get; set; } - - ZXingScannerFragment scannerFragment; - - protected override void OnCreate (Bundle bundle) - { - base.OnCreate (bundle); - - this.RequestWindowFeature (WindowFeatures.NoTitle); - - this.Window.AddFlags (WindowManagerFlags.Fullscreen); //to show - this.Window.AddFlags (WindowManagerFlags.KeepScreenOn); //Don't go to sleep while scanning - - if (ScanningOptions.AutoRotate.HasValue && !ScanningOptions.AutoRotate.Value) - RequestedOrientation = ScreenOrientation.Nosensor; - - SetContentView (Resource.Layout.zxingscanneractivitylayout); - - scannerFragment = new ZXingScannerFragment (); - scannerFragment.CustomOverlayView = CustomOverlayView; - scannerFragment.UseCustomOverlayView = UseCustomOverlayView; - scannerFragment.TopText = TopText; - scannerFragment.BottomText = BottomText; - - SupportFragmentManager.BeginTransaction () - .Replace (Resource.Id.contentFrame, scannerFragment, "ZXINGFRAGMENT") - .Commit (); - - CancelRequestedHandler = CancelScan; - AutoFocusRequestedHandler = AutoFocus; - TorchRequestedHandler = SetTorch; - PauseAnalysisHandler = scannerFragment.PauseAnalysis; - ResumeAnalysisHandler = scannerFragment.ResumeAnalysis; - } - - protected override void OnResume () - { - base.OnResume (); - - if (ZXing.Net.Mobile.Android.PermissionsHandler.NeedsPermissionRequest(this)) - ZXing.Net.Mobile.Android.PermissionsHandler.RequestPermissionsAsync(this); - else - StartScanning (); - } - - public override void OnRequestPermissionsResult (int requestCode, string[] permissions, [GeneratedEnum] Permission[] grantResults) - { - ZXing.Net.Mobile.Android.PermissionsHandler.OnRequestPermissionsResult(requestCode, permissions, grantResults); - } - - void StartScanning () - { - scannerFragment.StartScanning (result => { - var h = ScanCompletedHandler; - if (h != null) - h (result); - - if (!ZxingActivity.ScanContinuously) - this.Finish (); - }, ScanningOptions); - } - - public override void OnConfigurationChanged (Android.Content.Res.Configuration newConfig) - { - base.OnConfigurationChanged (newConfig); - - Android.Util.Log.Debug (MobileBarcodeScanner.TAG, "Configuration Changed"); - } - - public void SetTorch (bool on) - { - scannerFragment.Torch (on); - } - - public void AutoFocus () - { - scannerFragment.AutoFocus (); - } - - public void CancelScan () - { - Finish (); - var h = CanceledHandler; - if (h != null) - h (); - } - - public override bool OnKeyDown (Keycode keyCode, KeyEvent e) - { - switch (keyCode) { - case Keycode.Back: - CancelScan (); - break; - case Keycode.Focus: - return true; - } - - return base.OnKeyDown (keyCode, e); - } - } - -} \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.Core/AssemblyInfo.cs b/Source/ZXing.Net.Mobile.Core/AssemblyInfo.cs deleted file mode 100644 index c0ada2860..000000000 --- a/Source/ZXing.Net.Mobile.Core/AssemblyInfo.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -// Information about this assembly is defined by the following attributes. -// Change them to the values specific to your project. - -[assembly: AssemblyTitle("ZXing.Net.Mobile.Core")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("redth")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". -// The form "{Major}.{Minor}.*" will automatically update the build and revision, -// and "{Major}.{Minor}.{Build}.*" will update just the revision. - -[assembly: AssemblyVersion("1.0.*")] - -// The following attributes are used to specify the signing key for the assembly, -// if desired. See the Mono documentation for more information about signing. - -//[assembly: AssemblyDelaySign(false)] -//[assembly: AssemblyKeyFile("")] - diff --git a/Source/ZXing.Net.Mobile.Core/IMobileBarcodeScanner.cs b/Source/ZXing.Net.Mobile.Core/IMobileBarcodeScanner.cs deleted file mode 100644 index b62831c31..000000000 --- a/Source/ZXing.Net.Mobile.Core/IMobileBarcodeScanner.cs +++ /dev/null @@ -1,97 +0,0 @@ -using System; -using System.Threading.Tasks; -using ZXing; - -namespace ZXing.Mobile -{ - public interface IZXingScanner : IScannerView - { - TOverlayViewType CustomOverlayView { get;set; } - bool UseCustomOverlayView { get; set; } - string TopText { get;set; } - string BottomText { get;set; } - } - - public interface IMobileBarcodeScanner - { - Task Scan(MobileBarcodeScanningOptions options); - Task Scan(); - - void ScanContinuously(MobileBarcodeScanningOptions options, Action scanHandler); - void ScanContinuously(Action scanHandler); - - void Cancel(); - - void Torch(bool on); - void AutoFocus(); - void ToggleTorch(); - - void PauseAnalysis (); - void ResumeAnalysis (); - - bool UseCustomOverlay { get; } - string TopText { get; set; } - string BottomText { get; set; } - - string CancelButtonText { get; set; } - string FlashButtonText { get; set; } - string CameraUnsupportedMessage { get; set; } - - bool IsTorchOn { get; } - } - - public abstract class MobileBarcodeScannerBase : IMobileBarcodeScanner - { - public MobileBarcodeScannerBase() - { - CancelButtonText = "Cancel"; - FlashButtonText = "Flash"; - CameraUnsupportedMessage = "Unable to start Camera for Scanning"; - } - - public bool UseCustomOverlay { get; set; } - public string TopText { get; set; } - public string BottomText { get; set; } - public string CancelButtonText { get; set; } - public string FlashButtonText { get; set; } - public string CameraUnsupportedMessage { get; set; } - - public abstract Task Scan(MobileBarcodeScanningOptions options); - - public Task Scan() - { - return Scan(MobileBarcodeScanningOptions.Default); - } - - public void ScanContinuously (Action scanHandler) - { - ScanContinuously (MobileBarcodeScanningOptions.Default, scanHandler); - } - - public abstract void ScanContinuously (MobileBarcodeScanningOptions options, Action scanHandler); - - public abstract void Cancel(); - - public abstract void Torch(bool on); - - public abstract void ToggleTorch(); - - public abstract bool IsTorchOn { get; } - - public abstract void AutoFocus(); - - public abstract void PauseAnalysis (); - public abstract void ResumeAnalysis (); - } - - public class CancelScanRequestEventArgs : EventArgs - { - public CancelScanRequestEventArgs () - { - this.Cancel = false; - } - - public bool Cancel { get; set; } - } - -} \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.Core/IScannerView.cs b/Source/ZXing.Net.Mobile.Core/IScannerView.cs deleted file mode 100644 index e337b6bba..000000000 --- a/Source/ZXing.Net.Mobile.Core/IScannerView.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; - -namespace ZXing.Mobile -{ - public interface IScannerView - { - void StartScanning (Action scanResultHandler, MobileBarcodeScanningOptions options = null); - void StopScanning (); - - void PauseAnalysis(); - void ResumeAnalysis(); - - void Torch(bool on); - void AutoFocus(); - void AutoFocus(int x, int y); - void ToggleTorch(); - bool IsTorchOn { get; } - bool IsAnalyzing { get; } - - bool HasTorch { get; } - } -} - diff --git a/Source/ZXing.Net.Mobile.Core/MobileBarcodeScanningOptions.cs b/Source/ZXing.Net.Mobile.Core/MobileBarcodeScanningOptions.cs deleted file mode 100644 index 25eed3da4..000000000 --- a/Source/ZXing.Net.Mobile.Core/MobileBarcodeScanningOptions.cs +++ /dev/null @@ -1,113 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using ZXing; - -namespace ZXing.Mobile -{ - public class MobileBarcodeScanningOptions - { - /// - /// Camera resolution selector delegate, must return the selected Resolution from the list of available resolutions - /// - public delegate CameraResolution CameraResolutionSelectorDelegate (List availableResolutions); - - public MobileBarcodeScanningOptions () - { - this.PossibleFormats = new List(); - //this.AutoRotate = true; - this.DelayBetweenAnalyzingFrames = 150; - this.InitialDelayBeforeAnalyzingFrames = 300; - this.DelayBetweenContinuousScans = 1000; - UseNativeScanning = false; - } - - public CameraResolutionSelectorDelegate CameraResolutionSelector { get;set; } - public List PossibleFormats { get;set; } - public bool? TryHarder { get;set; } - public bool? PureBarcode { get;set; } - public bool? AutoRotate { get;set; } - public bool? UseCode39ExtendedMode { get; set; } - public string CharacterSet { get;set; } - public bool? TryInverted { get;set; } - public bool? UseFrontCameraIfAvailable { get; set; } - public bool? AssumeGS1 { get; set; } - - - public bool DisableAutofocus { get; set; } - - public bool UseNativeScanning { get; set; } - - public int DelayBetweenContinuousScans { get; set; } - - public int DelayBetweenAnalyzingFrames { get;set;} - public int InitialDelayBeforeAnalyzingFrames { get;set; } - - public static MobileBarcodeScanningOptions Default - { - get { return new MobileBarcodeScanningOptions(); } - } - - public BarcodeReader BuildBarcodeReader () - { - var reader = new BarcodeReader (); - if (this.TryHarder.HasValue) - reader.Options.TryHarder = this.TryHarder.Value; - if (this.PureBarcode.HasValue) - reader.Options.PureBarcode = this.PureBarcode.Value; - if (this.AutoRotate.HasValue) - reader.AutoRotate = this.AutoRotate.Value; - if (this.UseCode39ExtendedMode.HasValue) - reader.Options.UseCode39ExtendedMode = this.UseCode39ExtendedMode.Value; - if (!string.IsNullOrEmpty (this.CharacterSet)) - reader.Options.CharacterSet = this.CharacterSet; - if (this.TryInverted.HasValue) - reader.TryInverted = this.TryInverted.Value; - if (this.AssumeGS1.HasValue) - reader.Options.AssumeGS1 = this.AssumeGS1.Value; - - if (this.PossibleFormats != null && this.PossibleFormats.Count > 0) - { - reader.Options.PossibleFormats = new List(); - - foreach (var pf in this.PossibleFormats) - reader.Options.PossibleFormats.Add(pf); - } - - return reader; - } - - public MultiFormatReader BuildMultiFormatReader() - { - var reader = new MultiFormatReader(); - - var hints = new Dictionary(); - - if (this.TryHarder.HasValue && this.TryHarder.Value) - hints.Add(DecodeHintType.TRY_HARDER, this.TryHarder.Value); - if (this.PureBarcode.HasValue && this.PureBarcode.Value) - hints.Add(DecodeHintType.PURE_BARCODE, this.PureBarcode.Value); - - if (this.PossibleFormats != null && this.PossibleFormats.Count > 0) - hints.Add(DecodeHintType.POSSIBLE_FORMATS, this.PossibleFormats); - - reader.Hints = hints; - - return reader; - } - - public CameraResolution GetResolution (List availableResolutions) - { - CameraResolution r = null; - - var dg = CameraResolutionSelector; - - if (dg != null) { - r = dg (availableResolutions); - } - - return r; - } - } -} - diff --git a/Source/ZXing.Net.Mobile.Core/ZXing.Net.Mobile.Core.csproj b/Source/ZXing.Net.Mobile.Core/ZXing.Net.Mobile.Core.csproj deleted file mode 100644 index 9510e5627..000000000 --- a/Source/ZXing.Net.Mobile.Core/ZXing.Net.Mobile.Core.csproj +++ /dev/null @@ -1,62 +0,0 @@ - - - - - 10.0 - Debug - AnyCPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB} - Library - Properties - ZXing.Net.Mobile.Core - ZXing.Net.Mobile.Core - en-US - 512 - {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Profile259 - v4.5 - - - true - full - false - ..\..\Build\Debug\core\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\..\Build\Release\core\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - {24b441f2-cbe9-4405-9fd0-72ebcbea0ec3} - zxing.portable - - - - - \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.Forms.Android/PermissionsHandler.cs b/Source/ZXing.Net.Mobile.Forms.Android/PermissionsHandler.cs deleted file mode 100644 index 4ad5efef3..000000000 --- a/Source/ZXing.Net.Mobile.Forms.Android/PermissionsHandler.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using ZXing.Mobile; -using System.Linq; -using Android.App; -using System.Threading.Tasks; -using Android.Content.PM; - -namespace ZXing.Net.Mobile.Forms.Android -{ - public static class PermissionsHandler - { - [Obsolete ("Use ZXing.Net.Mobile.Android.PermissionsHandler.OnRequestPermissionsResult instead")] - public static void OnRequestPermissionsResult(int requestCode, string[] permissions, Permission[] grantResults) - { - // Forward the call to the generic android implementation - Android.PermissionsHandler.OnRequestPermissionsResult(requestCode, permissions, grantResults); - } - } -} - diff --git a/Source/ZXing.Net.Mobile.Forms.Android/Platform.cs b/Source/ZXing.Net.Mobile.Forms.Android/Platform.cs deleted file mode 100644 index a23bee79a..000000000 --- a/Source/ZXing.Net.Mobile.Forms.Android/Platform.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; - -namespace ZXing.Net.Mobile.Forms.Android -{ - public class Platform - { - public Platform () - { - } - - public static void Init () - { - ZXing.Net.Mobile.Forms.Android.ZXingScannerViewRenderer.Init (); - ZXing.Net.Mobile.Forms.Android.ZXingBarcodeImageViewRenderer.Init (); - } - } -} - diff --git a/Source/ZXing.Net.Mobile.Forms.Android/Properties/AssemblyInfo.cs b/Source/ZXing.Net.Mobile.Forms.Android/Properties/AssemblyInfo.cs deleted file mode 100644 index 5b95c8104..000000000 --- a/Source/ZXing.Net.Mobile.Forms.Android/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -// Information about this assembly is defined by the following attributes. -// Change them to the values specific to your project. - -[assembly: AssemblyTitle ("ZXing.Net.Mobile.Forms.Android")] -[assembly: AssemblyDescription ("")] -[assembly: AssemblyConfiguration ("")] -[assembly: AssemblyCompany ("")] -[assembly: AssemblyProduct ("")] -[assembly: AssemblyCopyright ("redth")] -[assembly: AssemblyTrademark ("")] -[assembly: AssemblyCulture ("")] - -// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". -// The form "{Major}.{Minor}.*" will automatically update the build and revision, -// and "{Major}.{Minor}.{Build}.*" will update just the revision. - -[assembly: AssemblyVersion ("1.0.0")] - -// The following attributes are used to specify the signing key for the assembly, -// if desired. See the Mono documentation for more information about signing. - -//[assembly: AssemblyDelaySign(false)] -//[assembly: AssemblyKeyFile("")] - diff --git a/Source/ZXing.Net.Mobile.Forms.Android/Resources/AboutResources.txt b/Source/ZXing.Net.Mobile.Forms.Android/Resources/AboutResources.txt deleted file mode 100644 index 10f52d460..000000000 --- a/Source/ZXing.Net.Mobile.Forms.Android/Resources/AboutResources.txt +++ /dev/null @@ -1,44 +0,0 @@ -Images, layout descriptions, binary blobs and string dictionaries can be included -in your application as resource files. Various Android APIs are designed to -operate on the resource IDs instead of dealing with images, strings or binary blobs -directly. - -For example, a sample Android app that contains a user interface layout (main.axml), -an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) -would keep its resources in the "Resources" directory of the application: - -Resources/ - drawable/ - icon.png - - layout/ - main.axml - - values/ - strings.xml - -In order to get the build system to recognize Android resources, set the build action to -"AndroidResource". The native Android APIs do not operate directly with filenames, but -instead operate on resource IDs. When you compile an Android application that uses resources, -the build system will package the resources for distribution and generate a class called "R" -(this is an Android convention) that contains the tokens for each one of the resources -included. For example, for the above Resources layout, this is what the R class would expose: - -public class R { - public class drawable { - public const int icon = 0x123; - } - - public class layout { - public const int main = 0x456; - } - - public class strings { - public const int first_string = 0xabc; - public const int second_string = 0xbcd; - } -} - -You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main -to reference the layout/main.axml file, or R.strings.first_string to reference the first -string in the dictionary file values/strings.xml. diff --git a/Source/ZXing.Net.Mobile.Forms.Android/Resources/Resource.cs b/Source/ZXing.Net.Mobile.Forms.Android/Resources/Resource.cs deleted file mode 100644 index d8c609a70..000000000 --- a/Source/ZXing.Net.Mobile.Forms.Android/Resources/Resource.cs +++ /dev/null @@ -1,59 +0,0 @@ -#pragma warning disable 1591 -// ------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Mono Runtime Version: 4.0.30319.17020 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ - -[assembly: Android.Runtime.ResourceDesignerAttribute("ZXing.Net.Mobile.Forms.Android.Resource", IsApplication=false)] - -namespace ZXing.Net.Mobile.Forms.Android -{ - [System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")] - public partial class Resource - { - static Resource() - { - global::Android.Runtime.ResourceIdManager.UpdateIdValues(); - } - - public partial class Layout - { - // aapt resource value: 0x7f030030 - public static int zxingscanneractivitylayout = 2130903088; - - // aapt resource value: 0x7f030031 - public static int zxingscannerfragmentlayout = 2130903089; - - static Layout() - { - global::Android.Runtime.ResourceIdManager.UpdateIdValues(); - } - - private Layout() - { - } - } - - public partial class String - { - // aapt resource value: 0x7f050020 - public static int library_name = 2131034144; - - static String() - { - global::Android.Runtime.ResourceIdManager.UpdateIdValues(); - } - - private String() - { - } - } - - } -} -#pragma warning restore 1591 diff --git a/Source/ZXing.Net.Mobile.Forms.Android/Resources/values/Strings.xml b/Source/ZXing.Net.Mobile.Forms.Android/Resources/values/Strings.xml deleted file mode 100644 index 4ec40bb54..000000000 --- a/Source/ZXing.Net.Mobile.Forms.Android/Resources/values/Strings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - ZXing.Net.Mobile.Forms.Android - diff --git a/Source/ZXing.Net.Mobile.Forms.Android/ZXing.Net.Mobile.Forms.Android.csproj b/Source/ZXing.Net.Mobile.Forms.Android/ZXing.Net.Mobile.Forms.Android.csproj deleted file mode 100644 index 0164f7cab..000000000 --- a/Source/ZXing.Net.Mobile.Forms.Android/ZXing.Net.Mobile.Forms.Android.csproj +++ /dev/null @@ -1,84 +0,0 @@ - - - - Debug - AnyCPU - {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD} - Library - ZXing.Net.Mobile.Forms.Android - Assets - Resources - Resource - Resources\Resource.designer.cs - True - ZXing.Net.Mobile.Forms.Android - v7.1 - - - - - true - full - false - ..\..\Build\Forms\Debug\android\ - DEBUG; - prompt - 4 - None - false - - - full - true - ..\..\Build\Forms\Release\android\ - prompt - 4 - false - false - - - - - - - - - - - - - - - - - - - - - - - - - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB} - ZXing.Net.Mobile.Core - - - {8E54DB74-C094-4016-859A-D1C7F2509A58} - ZXing.Net.Mobile.Forms - - - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59} - ZXing.Net.Mobile.Android - - - {24b441f2-cbe9-4405-9fd0-72ebcbea0ec3} - zxing.portable - - - - - - - - \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.Forms.Android/ZXingBarcodeImageViewRenderer.cs b/Source/ZXing.Net.Mobile.Forms.Android/ZXingBarcodeImageViewRenderer.cs deleted file mode 100644 index 0327a9bea..000000000 --- a/Source/ZXing.Net.Mobile.Forms.Android/ZXingBarcodeImageViewRenderer.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System; -using Xamarin.Forms; -using ZXing.Net.Mobile.Forms; -using ZXing.Net.Mobile.Forms.Android; -using Android.Runtime; -using Xamarin.Forms.Platform.Android; -using System.ComponentModel; -using Android.Widget; -using ZXing.Mobile; - -[assembly:ExportRenderer(typeof(ZXingBarcodeImageView), typeof(ZXingBarcodeImageViewRenderer))] -namespace ZXing.Net.Mobile.Forms.Android -{ - [Preserve(AllMembers = true)] - public class ZXingBarcodeImageViewRenderer : ViewRenderer - { - public static void Init () - { - var temp = DateTime.Now; - } - - ZXingBarcodeImageView formsView; - ImageView imageView; - - protected override void OnElementPropertyChanged (object sender, PropertyChangedEventArgs e) - { - regenerate (); - - base.OnElementPropertyChanged (sender, e); - } - - protected override void OnElementChanged(ElementChangedEventArgs e) - { - formsView = Element; - - if (imageView == null) { - - imageView = new ImageView (Xamarin.Forms.Forms.Context); - - base.SetNativeControl (imageView); - } - - regenerate (); - - base.OnElementChanged (e); - } - - void regenerate () - { - if (formsView != null && formsView.BarcodeValue != null) - { - var writer = new ZXing.Mobile.BarcodeWriter(); - - if (formsView != null && formsView.BarcodeOptions != null) - writer.Options = formsView.BarcodeOptions; - if (formsView != null && formsView.BarcodeFormat != null) - writer.Format = formsView.BarcodeFormat; - - var value = formsView != null ? formsView.BarcodeValue : string.Empty; - - Device.BeginInvokeOnMainThread (() => { - var image = writer.Write (value); - - imageView.SetImageBitmap (image); - }); - } - } - } -} - diff --git a/Source/ZXing.Net.Mobile.Forms.Android/ZXingScannerViewRenderer.cs b/Source/ZXing.Net.Mobile.Forms.Android/ZXingScannerViewRenderer.cs deleted file mode 100644 index b07e3a31a..000000000 --- a/Source/ZXing.Net.Mobile.Forms.Android/ZXingScannerViewRenderer.cs +++ /dev/null @@ -1,112 +0,0 @@ -using System; -using Xamarin.Forms; -using ZXing.Net.Mobile.Forms; -using ZXing.Net.Mobile.Forms.Android; -using Android.Runtime; -using Android.App; -using Xamarin.Forms.Platform.Android; -using Android.Views; -using System.ComponentModel; -using System.Reflection; -using Android.Widget; -using ZXing.Mobile; -using System.Threading.Tasks; -using System.Linq.Expressions; - -[assembly:ExportRenderer(typeof(ZXingScannerView), typeof(ZXingScannerViewRenderer))] -namespace ZXing.Net.Mobile.Forms.Android -{ - [Preserve(AllMembers = true)] - public class ZXingScannerViewRenderer : ViewRenderer - { - public ZXingScannerViewRenderer () : base () - { - } - - public static void Init () - { - // Keep linker from stripping empty method - var temp = DateTime.Now; - } - - protected ZXingScannerView formsView; - - protected ZXingSurfaceView zxingSurface; - internal Task requestPermissionsTask; - - protected override async void OnElementChanged(ElementChangedEventArgs e) - { - base.OnElementChanged (e); - - formsView = Element; - - if (zxingSurface == null) { - - // Process requests for autofocus - formsView.AutoFocusRequested += (x, y) => { - if (zxingSurface != null) { - if (x < 0 && y < 0) - zxingSurface.AutoFocus (); - else - zxingSurface.AutoFocus (x, y); - } - }; - - var activity = Context as Activity; - - if (activity != null) - await ZXing.Net.Mobile.Android.PermissionsHandler.RequestPermissionsAsync (activity); - - zxingSurface = new ZXingSurfaceView (Xamarin.Forms.Forms.Context as Activity, formsView.Options); - zxingSurface.LayoutParameters = new LayoutParams (LayoutParams.MatchParent, LayoutParams.MatchParent); - - base.SetNativeControl (zxingSurface); - - if (formsView.IsScanning) - zxingSurface.StartScanning(formsView.RaiseScanResult, formsView.Options); - - if (formsView.IsTorchOn) - zxingSurface.Torch (true); - } - } - - protected override void OnElementPropertyChanged (object sender, PropertyChangedEventArgs e) - { - base.OnElementPropertyChanged (sender, e); - - if (zxingSurface == null) - return; - - switch (e.PropertyName) { - case nameof (ZXingScannerView.IsTorchOn): - zxingSurface.Torch (formsView.IsTorchOn); - break; - case nameof (ZXingScannerView.IsScanning): - if (formsView.IsScanning) - zxingSurface.StartScanning (formsView.RaiseScanResult, formsView.Options); - else - zxingSurface.StopScanning (); - break; - case nameof (ZXingScannerView.IsAnalyzing): - if (formsView.IsAnalyzing) - zxingSurface.ResumeAnalysis (); - else - zxingSurface.PauseAnalysis (); - break; - } - } - - public override bool OnTouchEvent (MotionEvent e) - { - var x = e.GetX (); - var y = e.GetY (); - - if (zxingSurface != null) { - zxingSurface.AutoFocus ((int)x, (int)y); - System.Diagnostics.Debug.WriteLine ("Touch: x={0}, y={1}", x, y); - } - return base.OnTouchEvent (e); - } - } -} - diff --git a/Source/ZXing.Net.Mobile.Forms.WindowsPhone/Properties/AssemblyInfo.cs b/Source/ZXing.Net.Mobile.Forms.WindowsPhone/Properties/AssemblyInfo.cs deleted file mode 100644 index 064c70962..000000000 --- a/Source/ZXing.Net.Mobile.Forms.WindowsPhone/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Resources; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("ZXing.Net.Mobile.Forms.WindowsPhone")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ZXing.Net.Mobile.Forms.WindowsPhone")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("9a761acb-26da-4185-8008-d4cde7d2f0bf")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] -[assembly: NeutralResourcesLanguageAttribute("en-US")] diff --git a/Source/ZXing.Net.Mobile.Forms.WindowsPhone/README_FIRST.txt b/Source/ZXing.Net.Mobile.Forms.WindowsPhone/README_FIRST.txt deleted file mode 100644 index ce40c013b..000000000 --- a/Source/ZXing.Net.Mobile.Forms.WindowsPhone/README_FIRST.txt +++ /dev/null @@ -1,3 +0,0 @@ -For the Windows Phone toolkit make sure that you have -marked the icons in the "Toolkit.Content" folder as content. That way they -can be used as the icons for the ApplicationBar control. \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.Forms.WindowsPhone/Toolkit.Content/ApplicationBar.Add.png b/Source/ZXing.Net.Mobile.Forms.WindowsPhone/Toolkit.Content/ApplicationBar.Add.png deleted file mode 100644 index 4b524d6f1..000000000 Binary files a/Source/ZXing.Net.Mobile.Forms.WindowsPhone/Toolkit.Content/ApplicationBar.Add.png and /dev/null differ diff --git a/Source/ZXing.Net.Mobile.Forms.WindowsPhone/Toolkit.Content/ApplicationBar.Cancel.png b/Source/ZXing.Net.Mobile.Forms.WindowsPhone/Toolkit.Content/ApplicationBar.Cancel.png deleted file mode 100644 index 4dd724f08..000000000 Binary files a/Source/ZXing.Net.Mobile.Forms.WindowsPhone/Toolkit.Content/ApplicationBar.Cancel.png and /dev/null differ diff --git a/Source/ZXing.Net.Mobile.Forms.WindowsPhone/Toolkit.Content/ApplicationBar.Check.png b/Source/ZXing.Net.Mobile.Forms.WindowsPhone/Toolkit.Content/ApplicationBar.Check.png deleted file mode 100644 index 7a0746668..000000000 Binary files a/Source/ZXing.Net.Mobile.Forms.WindowsPhone/Toolkit.Content/ApplicationBar.Check.png and /dev/null differ diff --git a/Source/ZXing.Net.Mobile.Forms.WindowsPhone/Toolkit.Content/ApplicationBar.Delete.png b/Source/ZXing.Net.Mobile.Forms.WindowsPhone/Toolkit.Content/ApplicationBar.Delete.png deleted file mode 100644 index 95bb16dab..000000000 Binary files a/Source/ZXing.Net.Mobile.Forms.WindowsPhone/Toolkit.Content/ApplicationBar.Delete.png and /dev/null differ diff --git a/Source/ZXing.Net.Mobile.Forms.WindowsPhone/Toolkit.Content/ApplicationBar.Select.png b/Source/ZXing.Net.Mobile.Forms.WindowsPhone/Toolkit.Content/ApplicationBar.Select.png deleted file mode 100644 index 995deaaaf..000000000 Binary files a/Source/ZXing.Net.Mobile.Forms.WindowsPhone/Toolkit.Content/ApplicationBar.Select.png and /dev/null differ diff --git a/Source/ZXing.Net.Mobile.Forms.WindowsPhone/ZXing.Net.Mobile.Forms.WindowsPhone.csproj b/Source/ZXing.Net.Mobile.Forms.WindowsPhone/ZXing.Net.Mobile.Forms.WindowsPhone.csproj deleted file mode 100644 index db49ac016..000000000 --- a/Source/ZXing.Net.Mobile.Forms.WindowsPhone/ZXing.Net.Mobile.Forms.WindowsPhone.csproj +++ /dev/null @@ -1,160 +0,0 @@ - - - - Debug - AnyCPU - 10.0.20506 - 2.0 - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF} - {C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - ZXing.Net.Mobile.Forms.WindowsPhone - ZXing.Net.Mobile.Forms.WindowsPhone - WindowsPhone - v8.0 - $(TargetFrameworkVersion) - false - true - 11.0 - true - - - - - true - full - false - ..\..\Build\Forms\Debug\wp8.0\ - DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE - true - true - prompt - 4 - - - pdbonly - true - ..\..\Build\Forms\Release\wp8.0\ - TRACE;SILVERLIGHT;WINDOWS_PHONE - true - true - prompt - 4 - - - true - full - false - Bin\x86\Debug - DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE - true - true - prompt - 4 - - - pdbonly - true - Bin\x86\Release - TRACE;SILVERLIGHT;WINDOWS_PHONE - true - true - prompt - 4 - - - true - full - false - Bin\ARM\Debug - DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE - true - true - prompt - 4 - - - pdbonly - true - Bin\ARM\Release - TRACE;SILVERLIGHT;WINDOWS_PHONE - true - true - prompt - 4 - - - - - - - - - {7528dd0a-1781-47f4-adbf-eeddb011f6bb} - ZXing.Net.Mobile.Core - - - {8e54db74-c094-4016-859a-d1c7f2509a58} - ZXing.Net.Mobile.Forms - - - {c9efc2f6-ac4c-446c-8fbf-91824b00431d} - ZXing.Net.Mobile.WindowsPhone - - - {24b441f2-cbe9-4405-9fd0-72ebcbea0ec3} - zxing.portable - - - - - ..\..\packages\WPtoolkit.4.2013.08.16\lib\wp8\Microsoft.Phone.Controls.Toolkit.dll - True - - - ..\..\packages\Xamarin.Forms.2.3.3.193\lib\WP80\Xamarin.Forms.Core.dll - True - - - ..\..\packages\Xamarin.Forms.2.3.3.193\lib\WP80\Xamarin.Forms.Platform.dll - True - - - ..\..\packages\Xamarin.Forms.2.3.3.193\lib\WP80\Xamarin.Forms.Platform.WP8.dll - True - - - ..\..\packages\Xamarin.Forms.2.3.3.193\lib\WP80\Xamarin.Forms.Xaml.dll - True - - - - - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.Forms.WindowsPhone/ZXingBarcodeImageViewRenderer.cs b/Source/ZXing.Net.Mobile.Forms.WindowsPhone/ZXingBarcodeImageViewRenderer.cs deleted file mode 100644 index d517a5b34..000000000 --- a/Source/ZXing.Net.Mobile.Forms.WindowsPhone/ZXingBarcodeImageViewRenderer.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System; -using Xamarin.Forms; -using ZXing.Net.Mobile.Forms; -using Xamarin.Forms.Platform.WinPhone; -using ZXing.Net.Mobile.Forms.WindowsPhone; -using System.ComponentModel; -using System.Reflection; -using ZXing.Mobile; -using System.Threading.Tasks; - -[assembly: ExportRenderer(typeof(ZXingBarcodeImageView), typeof(ZXingBarcodeImageViewRenderer))] -namespace ZXing.Net.Mobile.Forms.WindowsPhone -{ - public class ZXingBarcodeImageViewRenderer : ViewRenderer - { - public static void Init() - { - } - - ZXingBarcodeImageView formsView; - System.Windows.Controls.Image imageView; - - protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) - { - regenerate(); - - base.OnElementPropertyChanged(sender, e); - } - - protected override void OnElementChanged(ElementChangedEventArgs e) - { - formsView = Element; - - if (imageView == null) - { - - imageView = new System.Windows.Controls.Image(); - - base.SetNativeControl(imageView); - } - - regenerate(); - - base.OnElementChanged(e); - } - - void regenerate () - { - if (formsView != null) - { - var writer = new ZXing.Mobile.BarcodeWriter(); - - if (formsView != null && formsView.BarcodeOptions != null) - writer.Options = formsView.BarcodeOptions; - if (formsView != null && formsView.BarcodeFormat != null) - writer.Format = formsView.BarcodeFormat; - - var value = formsView != null ? formsView.BarcodeValue : string.Empty; - - Device.BeginInvokeOnMainThread(() => - { - var image = writer.Write(value); - - imageView.Source = image; - }); - } - } - } -} - diff --git a/Source/ZXing.Net.Mobile.Forms.WindowsPhone/ZXingScannerViewRenderer.cs b/Source/ZXing.Net.Mobile.Forms.WindowsPhone/ZXingScannerViewRenderer.cs deleted file mode 100644 index 705f70c29..000000000 --- a/Source/ZXing.Net.Mobile.Forms.WindowsPhone/ZXingScannerViewRenderer.cs +++ /dev/null @@ -1,89 +0,0 @@ -using System; -using Xamarin.Forms; -using ZXing.Net.Mobile.Forms; -using System.ComponentModel; -using System.Reflection; -using Xamarin.Forms.Platform.WinPhone; -using ZXing.Net.Mobile.Forms.WindowsPhone; - -[assembly: ExportRenderer(typeof(ZXingScannerView), typeof(ZXingScannerViewRenderer))] -namespace ZXing.Net.Mobile.Forms.WindowsPhone -{ - //[Preserve(AllMembers = true)] - public class ZXingScannerViewRenderer : ViewRenderer - { - public static void Init() - { - // Force the assembly to load - } - - protected ZXingScannerView formsView; - - protected ZXing.Mobile.ZXingScannerControl zxingControl; - - protected override void OnElementChanged(ElementChangedEventArgs e) - { - formsView = Element; - - if (formsView != null && zxingControl == null) - { - formsView.AutoFocusRequested += FormsView_AutoFocusRequested; - - zxingControl = new ZXing.Mobile.ZXingScannerControl(); - zxingControl.UseCustomOverlay = true; - zxingControl.ContinuousScanning = true; - - base.SetNativeControl(zxingControl); - - if (formsView.IsScanning) - zxingControl.StartScanning(formsView.RaiseScanResult, formsView.Options); - - if (!formsView.IsAnalyzing) - zxingControl.PauseAnalysis(); - - if (formsView.IsTorchOn) - zxingControl.Torch(formsView.IsTorchOn); - } - - if (formsView == null && e.NewElement == null && zxingControl != null) - { - zxingControl.StopScanning(); - } - - base.OnElementChanged(e); - } - - protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) - { - base.OnElementPropertyChanged(sender, e); - - if (zxingControl == null) - return; - - switch (e.PropertyName) - { - case nameof(ZXingScannerView.IsTorchOn): - zxingControl.Torch(formsView.IsTorchOn); - break; - case nameof(ZXingScannerView.IsScanning): - if (formsView.IsScanning) - zxingControl.StartScanning(formsView.RaiseScanResult, formsView.Options); - else - zxingControl.StopScanning(); - break; - case nameof(ZXingScannerView.IsAnalyzing): - if (formsView.IsAnalyzing) - zxingControl.ResumeAnalysis(); - else - zxingControl.PauseAnalysis(); - break; - } - } - - private void FormsView_AutoFocusRequested(int x, int y) - { - zxingControl.AutoFocus(x, y); - } - } -} - diff --git a/Source/ZXing.Net.Mobile.Forms.WindowsPhone/packages.config b/Source/ZXing.Net.Mobile.Forms.WindowsPhone/packages.config deleted file mode 100644 index 558ef58d9..000000000 --- a/Source/ZXing.Net.Mobile.Forms.WindowsPhone/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.Forms.WindowsUniversal/Properties/ZXing.Net.Mobile.Forms.WindowsUniversal.rd.xml b/Source/ZXing.Net.Mobile.Forms.WindowsUniversal/Properties/ZXing.Net.Mobile.Forms.WindowsUniversal.rd.xml deleted file mode 100644 index 74d349536..000000000 --- a/Source/ZXing.Net.Mobile.Forms.WindowsUniversal/Properties/ZXing.Net.Mobile.Forms.WindowsUniversal.rd.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - diff --git a/Source/ZXing.Net.Mobile.Forms.WindowsUniversal/ZXing.Net.Mobile.Forms.WindowsUniversal.csproj b/Source/ZXing.Net.Mobile.Forms.WindowsUniversal/ZXing.Net.Mobile.Forms.WindowsUniversal.csproj deleted file mode 100644 index 60edc22f3..000000000 --- a/Source/ZXing.Net.Mobile.Forms.WindowsUniversal/ZXing.Net.Mobile.Forms.WindowsUniversal.csproj +++ /dev/null @@ -1,144 +0,0 @@ - - - - - Debug - AnyCPU - {C785F56E-0D1D-492C-850B-4D882314F29B} - Library - Properties - ZXing.Net.Mobile.Forms.WindowsUniversal - ZXing.Net.Mobile.Forms.WindowsUniversal - en-US - UAP - 10.0.14393.0 - 10.0.10240.0 - 14 - 512 - {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - AnyCPU - true - full - false - ..\..\Build\Forms\Debug\uwp\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - prompt - 4 - - - AnyCPU - pdbonly - true - ..\..\Build\Forms\Release\uwp\ - TRACE;NETFX_CORE;WINDOWS_UWP - prompt - 4 - - - x86 - true - bin\x86\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - x86 - false - prompt - - - x86 - bin\x86\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - x86 - false - prompt - - - ARM - true - bin\ARM\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - ARM - false - prompt - - - ARM - bin\ARM\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - ARM - false - prompt - - - x64 - true - bin\x64\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP - ;2008 - full - x64 - false - prompt - - - x64 - bin\x64\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP - true - ;2008 - pdbonly - x64 - false - prompt - - - - - - - - - - - - - - {7528dd0a-1781-47f4-adbf-eeddb011f6bb} - ZXing.Net.Mobile.Core - - - {8e54db74-c094-4016-859a-d1c7f2509a58} - ZXing.Net.Mobile.Forms - - - {1b000bca-4895-4acf-a0c6-3adf3a9bedf2} - ZXing.Net.Mobile.WindowsUniversal - - - {24b441f2-cbe9-4405-9fd0-72ebcbea0ec3} - zxing.portable - - - - 14.0 - - - - \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.Forms.WindowsUniversal/ZXingBarcodeImageViewRenderer.cs b/Source/ZXing.Net.Mobile.Forms.WindowsUniversal/ZXingBarcodeImageViewRenderer.cs deleted file mode 100644 index 26f925510..000000000 --- a/Source/ZXing.Net.Mobile.Forms.WindowsUniversal/ZXingBarcodeImageViewRenderer.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using Xamarin.Forms; -using ZXing.Net.Mobile.Forms; -using ZXing.Net.Mobile.Forms.WindowsUniversal; -using Xamarin.Forms.Platform.UWP; -using System.ComponentModel; -using System.Reflection; -using ZXing.Mobile; -using System.Threading.Tasks; - -[assembly: ExportRenderer(typeof(ZXingBarcodeImageView), typeof(ZXingBarcodeImageViewRenderer))] -namespace ZXing.Net.Mobile.Forms.WindowsUniversal -{ - public class ZXingBarcodeImageViewRenderer : ViewRenderer - { - public static void Init() - { - } - - ZXingBarcodeImageView formsView; - Windows.UI.Xaml.Controls.Image imageView; - - protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) - { - regenerate(); - - base.OnElementPropertyChanged(sender, e); - } - protected override void OnElementChanged(ElementChangedEventArgs e) - { - formsView = Element; - - if (imageView == null) - { - - imageView = new Windows.UI.Xaml.Controls.Image(); - - base.SetNativeControl(imageView); - } - - regenerate(); - - base.OnElementChanged(e); - } - - void regenerate () - { - if (formsView != null && formsView.BarcodeValue != null) - { - var writer = new ZXing.Mobile.BarcodeWriter(); - - if (formsView != null && formsView.BarcodeOptions != null) - writer.Options = formsView.BarcodeOptions; - if (formsView != null && formsView.BarcodeFormat != null) - writer.Format = formsView.BarcodeFormat; - - var value = formsView != null ? formsView.BarcodeValue : string.Empty; - - Device.BeginInvokeOnMainThread(() => - { - var image = writer.Write(value); - - imageView.Source = image; - }); - } - } - } -} - diff --git a/Source/ZXing.Net.Mobile.Forms.WindowsUniversal/ZXingScannerViewRenderer.cs b/Source/ZXing.Net.Mobile.Forms.WindowsUniversal/ZXingScannerViewRenderer.cs deleted file mode 100644 index 3cd9c1fa5..000000000 --- a/Source/ZXing.Net.Mobile.Forms.WindowsUniversal/ZXingScannerViewRenderer.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System; -using Xamarin.Forms; -using ZXing.Net.Mobile.Forms; -using ZXing.Net.Mobile.Forms.WindowsUniversal; -using Xamarin.Forms.Platform.UWP; -using System.ComponentModel; -using System.Reflection; - -[assembly: ExportRenderer(typeof(ZXingScannerView), typeof(ZXingScannerViewRenderer))] -namespace ZXing.Net.Mobile.Forms.WindowsUniversal -{ - //[Preserve(AllMembers = true)] - public class ZXingScannerViewRenderer : ViewRenderer - { - public static void Init () - { - // Cause the assembly to load - } - - protected ZXingScannerView formsView; - - protected ZXing.Mobile.ZXingScannerControl zxingControl; - - protected override void OnElementChanged(ElementChangedEventArgs e) - { - formsView = Element; - - if (formsView != null && zxingControl == null) - { - formsView.AutoFocusRequested += FormsView_AutoFocusRequested; - - zxingControl = new ZXing.Mobile.ZXingScannerControl(); - zxingControl.ContinuousScanning = true; - zxingControl.UseCustomOverlay = true; - - base.SetNativeControl(zxingControl); - - if (formsView.IsScanning) - zxingControl.StartScanning(formsView.RaiseScanResult, formsView.Options); - - if (!formsView.IsAnalyzing) - zxingControl.PauseAnalysis(); - - if (formsView.IsTorchOn) - zxingControl.Torch(formsView.IsTorchOn); - } - - // Shut the scanner down if necessary - if (formsView == null && e.NewElement == null && zxingControl != null) - { - zxingControl.StopScanning(); - } - - base.OnElementChanged(e); - } - - protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) - { - base.OnElementPropertyChanged(sender, e); - - if (zxingControl == null) - return; - - switch (e.PropertyName) - { - case nameof(ZXingScannerView.IsTorchOn): - zxingControl.Torch(formsView.IsTorchOn); - break; - case nameof(ZXingScannerView.IsScanning): - if (formsView.IsScanning) - zxingControl.StartScanning(formsView.RaiseScanResult, formsView.Options); - else - zxingControl.StopScanning(); - break; - case nameof(ZXingScannerView.IsAnalyzing): - if (formsView.IsAnalyzing) - zxingControl.ResumeAnalysis(); - else - zxingControl.PauseAnalysis(); - break; - } - } - - private void FormsView_AutoFocusRequested(int x, int y) - { - zxingControl.AutoFocus(x, y); - } - - protected override async void OnDisconnectVisualChildren() - { - await zxingControl?.StopScanningAsync(); - base.OnDisconnectVisualChildren(); - } - } -} - diff --git a/Source/ZXing.Net.Mobile.Forms.WindowsUniversal/project.json b/Source/ZXing.Net.Mobile.Forms.WindowsUniversal/project.json deleted file mode 100644 index c4e711589..000000000 --- a/Source/ZXing.Net.Mobile.Forms.WindowsUniversal/project.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "dependencies": { - "Microsoft.NETCore.UniversalWindowsPlatform": "6.0.1", - "Xamarin.Forms": "2.3.4.270" - }, - "frameworks": { - "uap10.0": {} - }, - "runtimes": { - "win10-arm": {}, - "win10-arm-aot": {}, - "win10-x86": {}, - "win10-x86-aot": {}, - "win10-x64": {}, - "win10-x64-aot": {} - } -} \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.Forms.iOS/Platform.cs b/Source/ZXing.Net.Mobile.Forms.iOS/Platform.cs deleted file mode 100644 index 7b4ebf9d5..000000000 --- a/Source/ZXing.Net.Mobile.Forms.iOS/Platform.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; - -namespace ZXing.Net.Mobile.Forms.iOS -{ - public class Platform - { - public Platform () - { - } - - public static void Init () - { - ZXing.Net.Mobile.Forms.iOS.ZXingScannerViewRenderer.Init (); - ZXing.Net.Mobile.Forms.iOS.ZXingBarcodeImageViewRenderer.Init (); - } - } -} - diff --git a/Source/ZXing.Net.Mobile.Forms.iOS/Properties/AssemblyInfo.cs b/Source/ZXing.Net.Mobile.Forms.iOS/Properties/AssemblyInfo.cs deleted file mode 100644 index 1a8584026..000000000 --- a/Source/ZXing.Net.Mobile.Forms.iOS/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -// Information about this assembly is defined by the following attributes. -// Change them to the values specific to your project. - -[assembly: AssemblyTitle ("ZXing.Net.Mobile.Forms.iOS")] -[assembly: AssemblyDescription ("")] -[assembly: AssemblyConfiguration ("")] -[assembly: AssemblyCompany ("")] -[assembly: AssemblyProduct ("")] -[assembly: AssemblyCopyright ("redth")] -[assembly: AssemblyTrademark ("")] -[assembly: AssemblyCulture ("")] - -// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". -// The form "{Major}.{Minor}.*" will automatically update the build and revision, -// and "{Major}.{Minor}.{Build}.*" will update just the revision. - -[assembly: AssemblyVersion ("1.0.*")] - -// The following attributes are used to specify the signing key for the assembly, -// if desired. See the Mono documentation for more information about signing. - -//[assembly: AssemblyDelaySign(false)] -//[assembly: AssemblyKeyFile("")] - diff --git a/Source/ZXing.Net.Mobile.Forms.iOS/ZXing.Net.Mobile.Forms.iOS.csproj b/Source/ZXing.Net.Mobile.Forms.iOS/ZXing.Net.Mobile.Forms.iOS.csproj deleted file mode 100644 index aee6862b2..000000000 --- a/Source/ZXing.Net.Mobile.Forms.iOS/ZXing.Net.Mobile.Forms.iOS.csproj +++ /dev/null @@ -1,70 +0,0 @@ - - - - Debug - AnyCPU - {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - {8370ADB4-229C-4DEC-908F-B1A8FC155523} - Library - ZXing.Net.Mobile.Forms.iOS - Resources - ZXing.Net.Mobile.Forms.iOS - - - - - true - full - false - ..\..\Build\Forms\Debug\ios-unified\ - DEBUG; - prompt - 4 - false - - - full - true - ..\..\Build\Forms\Release\ios-unified\ - prompt - 4 - false - - - - - - - - - - - - - - - - - - - - {8E54DB74-C094-4016-859A-D1C7F2509A58} - ZXing.Net.Mobile.Forms - - - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB} - ZXing.Net.Mobile.Core - - - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A} - ZXing.Net.Mobile.iOS - - - {24b441f2-cbe9-4405-9fd0-72ebcbea0ec3} - zxing.portable - - - - - - \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.Forms.iOS/ZXingBarcodeImageViewRenderer.cs b/Source/ZXing.Net.Mobile.Forms.iOS/ZXingBarcodeImageViewRenderer.cs deleted file mode 100644 index cee2d87cf..000000000 --- a/Source/ZXing.Net.Mobile.Forms.iOS/ZXingBarcodeImageViewRenderer.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; -using Xamarin.Forms; -using ZXing.Net.Mobile.Forms; -using ZXing.Net.Mobile.Forms.iOS; -using System.ComponentModel; -using System.Reflection; -using ZXing.Mobile; -using System.Threading.Tasks; -using Xamarin.Forms.Platform.iOS; -using Foundation; -using UIKit; - -[assembly:ExportRenderer(typeof(ZXingBarcodeImageView), typeof(ZXingBarcodeImageViewRenderer))] -namespace ZXing.Net.Mobile.Forms.iOS -{ - [Preserve(AllMembers = true)] - public class ZXingBarcodeImageViewRenderer : ViewRenderer - { - public static void Init () - { - var temp = DateTime.Now; - } - - ZXingBarcodeImageView formsView; - UIImageView imageView; - - protected override void OnElementPropertyChanged (object sender, PropertyChangedEventArgs e) - { - regenerate (); - - base.OnElementPropertyChanged (sender, e); - } - - protected override async void OnElementChanged(ElementChangedEventArgs e) - { - formsView = Element; - - if (imageView == null) { - - imageView = new UIImageView {ContentMode = UIViewContentMode.ScaleAspectFit}; - - base.SetNativeControl (imageView); - } - - regenerate (); - - base.OnElementChanged (e); - } - - void regenerate () - { - if (formsView != null && formsView.BarcodeValue != null) - { - var writer = new ZXing.Mobile.BarcodeWriter(); - - if (formsView != null && formsView.BarcodeOptions != null) - writer.Options = formsView.BarcodeOptions; - if (formsView != null && formsView.BarcodeFormat != null) - writer.Format = formsView.BarcodeFormat; - - var value = formsView != null ? formsView.BarcodeValue : string.Empty; - - Device.BeginInvokeOnMainThread (() => { - var image = writer.Write (value); - - imageView.Image = image; - }); - } - } - } -} - diff --git a/Source/ZXing.Net.Mobile.Forms.iOS/ZXingScannerViewRenderer.cs b/Source/ZXing.Net.Mobile.Forms.iOS/ZXingScannerViewRenderer.cs deleted file mode 100644 index 987706e88..000000000 --- a/Source/ZXing.Net.Mobile.Forms.iOS/ZXingScannerViewRenderer.cs +++ /dev/null @@ -1,111 +0,0 @@ -using System; -using Xamarin.Forms; -using ZXing.Net.Mobile.Forms; -using Xamarin.Forms.Platform.iOS; -using System.ComponentModel; -using System.Reflection; -using Foundation; -using ZXing.Net.Mobile.Forms.iOS; -using UIKit; - -[assembly:ExportRenderer(typeof(ZXingScannerView), typeof(ZXingScannerViewRenderer))] -namespace ZXing.Net.Mobile.Forms.iOS -{ - [Preserve(AllMembers = true)] - public class ZXingScannerViewRenderer : ViewRenderer - { - // No-op to be called from app to prevent linker from stripping this out - public static void Init () - { - var temp = DateTime.Now; - } - - protected ZXingScannerView formsView; - protected ZXing.Mobile.ZXingScannerView zxingView; - - protected override void OnElementChanged(ElementChangedEventArgs e) - { - AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; - - formsView = Element; - - if (zxingView == null) { - - // Process requests for autofocus - formsView.AutoFocusRequested += (x, y) => { - if (zxingView != null) { - if (x < 0 && y < 0) - zxingView.AutoFocus (); - else - zxingView.AutoFocus (x, y); - } - }; - - - zxingView = new ZXing.Mobile.ZXingScannerView (); - zxingView.UseCustomOverlayView = true; - zxingView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; - - base.SetNativeControl (zxingView); - - if (formsView.IsScanning) - zxingView.StartScanning (formsView.RaiseScanResult, formsView.Options); - - if (!formsView.IsAnalyzing) - zxingView.PauseAnalysis (); - - if (formsView.IsTorchOn) - zxingView.Torch (formsView.IsTorchOn); - } - - base.OnElementChanged (e); - } - - protected override void OnElementPropertyChanged (object sender, PropertyChangedEventArgs e) - { - base.OnElementPropertyChanged (sender, e); - - if (zxingView == null) - return; - - switch (e.PropertyName) { - case nameof (ZXingScannerView.IsTorchOn): - zxingView.Torch (formsView.IsTorchOn); - break; - case nameof (ZXingScannerView.IsScanning): - if (formsView.IsScanning) - zxingView.StartScanning (formsView.RaiseScanResult, formsView.Options); - else - zxingView.StopScanning (); - break; - case nameof (ZXingScannerView.IsAnalyzing): - if (formsView.IsAnalyzing) - zxingView.ResumeAnalysis (); - else - zxingView.PauseAnalysis (); - break; - } - } - - public override void TouchesEnded (NSSet touches, UIKit.UIEvent evt) - { - base.TouchesEnded (touches, evt); - - zxingView.AutoFocus (); - } - - public override void LayoutSubviews () - { - base.LayoutSubviews (); - - // Find the best guess at current orientation - var o = UIApplication.SharedApplication.StatusBarOrientation; - if (ViewController != null) - o = ViewController.InterfaceOrientation; - - // Tell the native view to rotate - zxingView.DidRotate (o); - } - } -} - diff --git a/Source/ZXing.Net.Mobile.Forms/BarcodeWriter.cs b/Source/ZXing.Net.Mobile.Forms/BarcodeWriter.cs deleted file mode 100644 index 1241869a0..000000000 --- a/Source/ZXing.Net.Mobile.Forms/BarcodeWriter.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -//using ZXing.Rendering; -//using Xamarin.Forms; -//using System.IO; -//using ZXing.Common; -// -//namespace ZXing.Mobile -//{ -// /// -// /// A smart class to encode some content to a barcode image -// /// -// public class BarcodeWriter : ZXing.IBarcodeWriterGeneric -// { -// ZXing.BarcodeWriterPixelData writer; -// -// /// -// /// Initializes a new instance of the class. -// /// -// public BarcodeWriter() -// { -// writer = new ZXing.BarcodeWriterPixelData (); -// } -// -// public Writer Encoder { -// get { return writer.Encoder; } -// set { writer.Encoder = value; } -// } -// -// public BarcodeFormat Format { -// get { return writer.Format; } -// set { writer.Format = value; } -// } -// -// public EncodingOptions Options { -// get { return writer.Options; } -// set { writer.Options = value; } -// } -// -//// public IBarcodeRenderer Renderer { -//// get { return writer.Renderer; } -//// set { writer.Renderer = value; } -//// } -// -// public ImageSource Write (string contents) -// { -// var bm = Encode (contents); -// return Write (bm); -// } -// -// public ZXing.Common.BitMatrix Encode (string contents) -// { -// return writer.Encode (contents); -// } -// -// public ImageSource Write (ZXing.Common.BitMatrix matrix) -// { -// var data = writer.Write (matrix); -// -// -// return ImageSource.FromStream (() => new MemoryStream (data.Pixels)); -// } -// } -//} diff --git a/Source/ZXing.Net.Mobile.Forms/Properties/AssemblyInfo.cs b/Source/ZXing.Net.Mobile.Forms/Properties/AssemblyInfo.cs deleted file mode 100644 index 79ca6cc15..000000000 --- a/Source/ZXing.Net.Mobile.Forms/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -// Information about this assembly is defined by the following attributes. -// Change them to the values specific to your project. - -[assembly: AssemblyTitle ("ZXing.Net.Mobile.Forms")] -[assembly: AssemblyDescription ("")] -[assembly: AssemblyConfiguration ("")] -[assembly: AssemblyCompany ("")] -[assembly: AssemblyProduct ("")] -[assembly: AssemblyCopyright ("redth")] -[assembly: AssemblyTrademark ("")] -[assembly: AssemblyCulture ("")] - -// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". -// The form "{Major}.{Minor}.*" will automatically update the build and revision, -// and "{Major}.{Minor}.{Build}.*" will update just the revision. - -[assembly: AssemblyVersion ("1.0.*")] - -// The following attributes are used to specify the signing key for the assembly, -// if desired. See the Mono documentation for more information about signing. - -//[assembly: AssemblyDelaySign(false)] -//[assembly: AssemblyKeyFile("")] - diff --git a/Source/ZXing.Net.Mobile.Forms/ZXing.Net.Mobile.Forms.csproj b/Source/ZXing.Net.Mobile.Forms/ZXing.Net.Mobile.Forms.csproj deleted file mode 100644 index 79fd21eca..000000000 --- a/Source/ZXing.Net.Mobile.Forms/ZXing.Net.Mobile.Forms.csproj +++ /dev/null @@ -1,56 +0,0 @@ - - - - Debug - AnyCPU - {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - {8E54DB74-C094-4016-859A-D1C7F2509A58} - Library - ZXing.Net.Mobile.Forms - ZXing.Net.Mobile.Forms - Profile259 - v4.5 - - - - - true - full - false - ..\..\Build\Forms\Debug\portable\ - DEBUG; - prompt - 4 - false - - - full - true - ..\..\Build\Forms\Release\portable\ - prompt - 4 - false - - - - - - - - - - - - - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB} - ZXing.Net.Mobile.Core - - - {24b441f2-cbe9-4405-9fd0-72ebcbea0ec3} - zxing.portable - - - - - - \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.Forms/ZXingBarcodeImageView.cs b/Source/ZXing.Net.Mobile.Forms/ZXingBarcodeImageView.cs deleted file mode 100644 index cec214106..000000000 --- a/Source/ZXing.Net.Mobile.Forms/ZXingBarcodeImageView.cs +++ /dev/null @@ -1,46 +0,0 @@ -using Xamarin.Forms; -using ZXing.Common; - -namespace ZXing.Net.Mobile.Forms -{ - public class ZXingBarcodeImageView : Image - { - public ZXingBarcodeImageView () : base () - { - - } - - public static readonly BindableProperty BarcodeFormatProperty = - BindableProperty.Create( nameof( BarcodeFormat ), typeof( BarcodeFormat ), typeof( ZXingBarcodeImageView ), - defaultValue: BarcodeFormat.QR_CODE, - defaultBindingMode: BindingMode.TwoWay ); - - public BarcodeFormat BarcodeFormat { - get { return (BarcodeFormat)GetValue (BarcodeFormatProperty); } - set { SetValue (BarcodeFormatProperty, value); } - } - - - public static readonly BindableProperty BarcodeValueProperty = - BindableProperty.Create( nameof(BarcodeValue), typeof(string), typeof(ZXingBarcodeImageView), - defaultValue: string.Empty, - defaultBindingMode: BindingMode.TwoWay); - - public string BarcodeValue { - get { return (string)GetValue (BarcodeValueProperty); } - set { SetValue (BarcodeValueProperty, value); } - } - - - public static readonly BindableProperty BarcodeOptionsProperty = - BindableProperty.Create( nameof(BarcodeOptions), typeof(EncodingOptions), typeof(ZXingBarcodeImageView), - defaultValue: new EncodingOptions (), - defaultBindingMode: BindingMode.TwoWay); - - public EncodingOptions BarcodeOptions { - get { return (EncodingOptions)GetValue (BarcodeOptionsProperty); } - set { SetValue (BarcodeOptionsProperty, value); } - } - } -} - diff --git a/Source/ZXing.Net.Mobile.Forms/ZXingDefaultOverlay.cs b/Source/ZXing.Net.Mobile.Forms/ZXingDefaultOverlay.cs deleted file mode 100644 index bd95a5b24..000000000 --- a/Source/ZXing.Net.Mobile.Forms/ZXingDefaultOverlay.cs +++ /dev/null @@ -1,126 +0,0 @@ -using System; -using System.Windows.Input; -using Xamarin.Forms; - -namespace ZXing.Net.Mobile.Forms -{ - public class ZXingDefaultOverlay : Grid - { - Label topText; - Label botText; - Button flash; - - public delegate void FlashButtonClickedDelegate (Button sender, EventArgs e); - public event FlashButtonClickedDelegate FlashButtonClicked; - - public ZXingDefaultOverlay () - { - BindingContext = this; - - VerticalOptions = LayoutOptions.FillAndExpand; - HorizontalOptions = LayoutOptions.FillAndExpand; - - RowDefinitions.Add (new RowDefinition { Height = new GridLength (1, GridUnitType.Star) }); - RowDefinitions.Add (new RowDefinition { Height = new GridLength (2, GridUnitType.Star) }); - RowDefinitions.Add (new RowDefinition { Height = new GridLength (1, GridUnitType.Star) }); - ColumnDefinitions.Add (new ColumnDefinition { Width = new GridLength (1, GridUnitType.Star) }); - - - Children.Add (new BoxView { - VerticalOptions = LayoutOptions.Fill, - HorizontalOptions = LayoutOptions.FillAndExpand, - BackgroundColor = Color.Black, - Opacity = 0.7, - }, 0, 0); - - Children.Add (new BoxView { - VerticalOptions = LayoutOptions.Fill, - HorizontalOptions = LayoutOptions.FillAndExpand, - BackgroundColor = Color.Black, - Opacity = 0.7, - }, 0, 2); - - Children.Add (new BoxView { - VerticalOptions = LayoutOptions.Center, - HorizontalOptions = LayoutOptions.FillAndExpand, - HeightRequest = 3, - BackgroundColor = Color.Red, - Opacity = 0.6, - }, 0, 1); - - topText = new Label { - VerticalOptions = LayoutOptions.Center, - HorizontalOptions = LayoutOptions.Center, - TextColor = Color.White, - AutomationId = "zxingDefaultOverlay_TopTextLabel", - }; - topText.SetBinding( Label.TextProperty, new Binding( nameof( TopText ) ) ); - Children.Add (topText, 0, 0); - - botText = new Label { - VerticalOptions = LayoutOptions.Center, - HorizontalOptions = LayoutOptions.Center, - TextColor = Color.White, - AutomationId = "zxingDefaultOverlay_BottomTextLabel", - }; - botText.SetBinding( Label.TextProperty, new Binding( nameof( BottomText ) ) ); - Children.Add (botText, 0, 2); - - flash = new Button { - HorizontalOptions = LayoutOptions.End, - VerticalOptions = LayoutOptions.Start, - Text = "Flash", - TextColor = Color.White, - AutomationId = "zxingDefaultOverlay_FlashButton", - }; - flash.SetBinding( Button.IsVisibleProperty, new Binding( nameof( ShowFlashButton ) ) ); - flash.Clicked += (sender, e) => { - FlashButtonClicked?.Invoke( flash, e ); - }; - - Children.Add (flash, 0, 0); - } - - public static readonly BindableProperty TopTextProperty = - BindableProperty.Create( nameof( TopText ), typeof( string ), typeof( ZXingDefaultOverlay ), string.Empty ); - public string TopText - { - get { return ( string )GetValue( TopTextProperty ); } - set { SetValue( TopTextProperty, value ); } - } - - public static readonly BindableProperty BottomTextProperty = - BindableProperty.Create( nameof( BottomText ), typeof( string ), typeof( ZXingDefaultOverlay ), string.Empty ); - public string BottomText - { - get { return ( string )GetValue( BottomTextProperty ); } - set { SetValue( BottomTextProperty, value ); } - } - - public static readonly BindableProperty ShowFlashButtonProperty = - BindableProperty.Create( nameof( ShowFlashButton ), typeof( bool ), typeof( ZXingDefaultOverlay ), false ); - public bool ShowFlashButton - { - get { return ( bool )GetValue( ShowFlashButtonProperty ); } - set { SetValue( ShowFlashButtonProperty, value ); } - } - - public static BindableProperty FlashCommandProperty = - BindableProperty.Create( nameof( FlashCommand ), typeof( ICommand ), typeof( ZXingDefaultOverlay ), - defaultValue: default(ICommand), - propertyChanged: OnFlashCommandChanged ); - public ICommand FlashCommand - { - get { return (ICommand)GetValue( FlashCommandProperty ); } - set { SetValue( FlashCommandProperty, value ); } - } - - private static void OnFlashCommandChanged( BindableObject bindable, object oldvalue, object newValue ) - { - var overlay = bindable as ZXingDefaultOverlay; - if( overlay?.flash == null ) return; - overlay.flash.Command = newValue as Command; - } - } -} - diff --git a/Source/ZXing.Net.Mobile.Forms/ZXingScannerPage.cs b/Source/ZXing.Net.Mobile.Forms/ZXingScannerPage.cs deleted file mode 100644 index 34b1bfcd4..000000000 --- a/Source/ZXing.Net.Mobile.Forms/ZXingScannerPage.cs +++ /dev/null @@ -1,188 +0,0 @@ -using Xamarin.Forms; -using ZXing.Mobile; - -namespace ZXing.Net.Mobile.Forms -{ - public class ZXingScannerPage : ContentPage - { - ZXingScannerView zxing; - ZXingDefaultOverlay defaultOverlay = null; - - public ZXingScannerPage (MobileBarcodeScanningOptions options = null, View customOverlay = null) : base () - { - zxing = new ZXingScannerView - { - HorizontalOptions = LayoutOptions.FillAndExpand, - VerticalOptions = LayoutOptions.FillAndExpand, - Options = options, - AutomationId = "zxingScannerView" - }; - - zxing.SetBinding( ZXingScannerView.IsTorchOnProperty, new Binding( nameof( IsTorchOn ) ) ); - zxing.SetBinding( ZXingScannerView.IsAnalyzingProperty, new Binding( nameof( IsAnalyzing ) ) ); - zxing.SetBinding( ZXingScannerView.IsScanningProperty, new Binding( nameof( IsScanning ) ) ); - zxing.SetBinding( ZXingScannerView.HasTorchProperty, new Binding( nameof( HasTorch ) ) ); - zxing.SetBinding( ZXingScannerView.ResultProperty, new Binding( nameof( Result ) ) ); - - zxing.OnScanResult += (result) => { - this.OnScanResult?.Invoke( result ); - //Device.BeginInvokeOnMainThread (() => eh (result)); - }; - - if (customOverlay == null) { - defaultOverlay = new ZXingDefaultOverlay () { AutomationId = "zxingDefaultOverlay" }; - - defaultOverlay.SetBinding( ZXingDefaultOverlay.TopTextProperty, new Binding( nameof( DefaultOverlayTopText ) ) ); - defaultOverlay.SetBinding( ZXingDefaultOverlay.BottomTextProperty, new Binding( nameof( DefaultOverlayBottomText ) ) ); - defaultOverlay.SetBinding( ZXingDefaultOverlay.ShowFlashButtonProperty, new Binding( nameof( DefaultOverlayShowFlashButton ) ) ); - - DefaultOverlayTopText = "Hold your phone up to the barcode"; - DefaultOverlayBottomText = "Scanning will happen automatically"; - DefaultOverlayShowFlashButton = HasTorch; - - defaultOverlay.FlashButtonClicked += (sender, e) => { - zxing.IsTorchOn = !zxing.IsTorchOn; - }; - - Overlay = defaultOverlay; - } else { - Overlay = customOverlay; - } - - var grid = new Grid - { - VerticalOptions = LayoutOptions.FillAndExpand, - HorizontalOptions = LayoutOptions.FillAndExpand, - }; - grid.Children.Add(zxing); - grid.Children.Add(Overlay); - - // The root page of your application - Content = grid; - } - - #region Default Overlay Properties - - public static readonly BindableProperty DefaultOverlayTopTextProperty = - BindableProperty.Create( nameof( DefaultOverlayTopText ), typeof( string ), typeof( ZXingScannerPage ), string.Empty ); - public string DefaultOverlayTopText - { - get { return ( string )GetValue( DefaultOverlayTopTextProperty ); } - set { SetValue( DefaultOverlayTopTextProperty, value ); } - } - - public static readonly BindableProperty DefaultOverlayBottomTextProperty = - BindableProperty.Create( nameof( DefaultOverlayBottomText ), typeof( string ), typeof( ZXingScannerPage ), string.Empty ); - public string DefaultOverlayBottomText - { - get { return ( string )GetValue( DefaultOverlayBottomTextProperty ); } - set { SetValue( DefaultOverlayBottomTextProperty, value ); } - } - - public static readonly BindableProperty DefaultOverlayShowFlashButtonProperty = - BindableProperty.Create( nameof( DefaultOverlayShowFlashButton ), typeof( bool ), typeof( ZXingScannerPage ), false ); - public bool DefaultOverlayShowFlashButton - { - get { return ( bool )GetValue( DefaultOverlayShowFlashButtonProperty ); } - set { SetValue( DefaultOverlayShowFlashButtonProperty, value ); } - } - - #endregion - - public delegate void ScanResultDelegate (ZXing.Result result); - public event ScanResultDelegate OnScanResult; - - public View Overlay { - get; - private set; - } - - #region Functions - - public void ToggleTorch () - { - if (zxing != null) - zxing.ToggleTorch (); - } - - protected override void OnAppearing () - { - base.OnAppearing (); - - zxing.IsScanning = true; - } - - protected override void OnDisappearing () - { - zxing.IsScanning = false; - - base.OnDisappearing (); - } - - public void PauseAnalysis () - { - if (zxing != null) - zxing.IsAnalyzing = false; - } - - public void ResumeAnalysis () - { - if (zxing != null) - zxing.IsAnalyzing = true; - } - - public void AutoFocus () - { - if (zxing != null) - zxing.AutoFocus (); - } - - public void AutoFocus (int x, int y) - { - if (zxing != null) - zxing.AutoFocus (x, y); - } - - #endregion - - public static readonly BindableProperty IsTorchOnProperty = - BindableProperty.Create( nameof( IsTorchOn ), typeof( bool ), typeof( ZXingScannerPage ), false ); - public bool IsTorchOn - { - get { return ( bool )GetValue( IsTorchOnProperty ); } - set { SetValue( IsTorchOnProperty, value ); } - } - - public static readonly BindableProperty IsAnalyzingProperty = - BindableProperty.Create( nameof( IsAnalyzing ), typeof( bool ), typeof( ZXingScannerPage ), false ); - public bool IsAnalyzing - { - get { return ( bool )GetValue( IsAnalyzingProperty ); } - set { SetValue( IsAnalyzingProperty, value ); } - } - - public static readonly BindableProperty IsScanningProperty = - BindableProperty.Create( nameof( IsScanning ), typeof( bool ), typeof( ZXingScannerPage ), false ); - public bool IsScanning - { - get { return ( bool )GetValue( IsScanningProperty ); } - set { SetValue( IsScanningProperty, value ); } - } - - public static readonly BindableProperty HasTorchProperty = - BindableProperty.Create( nameof( HasTorch ), typeof( bool ), typeof( ZXingScannerPage ), false ); - public bool HasTorch { - get { return ( bool )GetValue( HasTorchProperty ); } - set { SetValue( HasTorchProperty, value ); } - } - - public static readonly BindableProperty ResultProperty = - BindableProperty.Create( nameof( Result ), typeof( Result ), typeof( ZXingScannerPage ), default( Result ) ); - public Result Result - { - get { return ( Result )GetValue( ResultProperty ); } - set { SetValue( ResultProperty, value ); } - } - } -} - diff --git a/Source/ZXing.Net.Mobile.Forms/ZXingScannerView.cs b/Source/ZXing.Net.Mobile.Forms/ZXingScannerView.cs deleted file mode 100644 index 752c52b77..000000000 --- a/Source/ZXing.Net.Mobile.Forms/ZXingScannerView.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using System.Windows.Input; -using Xamarin.Forms; -using ZXing.Mobile; - -namespace ZXing.Net.Mobile.Forms -{ - public class ZXingScannerView : View - { - public delegate void ScanResultDelegate (ZXing.Result result); - public event ScanResultDelegate OnScanResult; - - public event Action AutoFocusRequested; - - public ZXingScannerView () - { - VerticalOptions = LayoutOptions.FillAndExpand; - HorizontalOptions = LayoutOptions.FillAndExpand; - } - - public void RaiseScanResult (Result result) - { - Result = result; - OnScanResult?.Invoke( Result ); - ScanResultCommand?.Execute( Result ); - } - - - public void ToggleTorch () - { - IsTorchOn = !IsTorchOn; - } - - public void AutoFocus () - { - AutoFocusRequested?.Invoke (-1, -1); - } - - public void AutoFocus (int x, int y) - { - AutoFocusRequested?.Invoke (x, y); - } - - - public static readonly BindableProperty OptionsProperty = - BindableProperty.Create( nameof( Options ), typeof( MobileBarcodeScanningOptions ), typeof( ZXingScannerView ), MobileBarcodeScanningOptions.Default ); - - public MobileBarcodeScanningOptions Options { - get { return (MobileBarcodeScanningOptions)GetValue (OptionsProperty); } - set { SetValue (OptionsProperty, value); } - } - - public static readonly BindableProperty IsScanningProperty = - BindableProperty.Create( nameof( IsScanning ), typeof( bool ), typeof( ZXingScannerView ), false ); - - public bool IsScanning { - get { return (bool)GetValue (IsScanningProperty); } - set { SetValue (IsScanningProperty, value); } - } - - public static readonly BindableProperty IsTorchOnProperty = - BindableProperty.Create( nameof( IsTorchOn ), typeof( bool ), typeof( ZXingScannerView ), false ); - public bool IsTorchOn { - get { return (bool)GetValue (IsTorchOnProperty); } - set { SetValue (IsTorchOnProperty, value); } - } - - public static readonly BindableProperty HasTorchProperty = - BindableProperty.Create( nameof( HasTorch ), typeof( bool ), typeof( ZXingScannerView ), false ); - public bool HasTorch { - get { return (bool)GetValue (HasTorchProperty); } - } - - public static readonly BindableProperty IsAnalyzingProperty = - BindableProperty.Create( nameof( IsAnalyzing ), typeof( bool ), typeof( ZXingScannerView ), true ); - - public bool IsAnalyzing { - get { return (bool)GetValue (IsAnalyzingProperty); } - set { SetValue (IsAnalyzingProperty, value); } - } - - public static readonly BindableProperty ResultProperty = - BindableProperty.Create( nameof( Result ), typeof( Result ), typeof( ZXingScannerView ), default( Result ) ); - public Result Result - { - get { return ( Result )GetValue( ResultProperty ); } - set { SetValue( ResultProperty, value ); } - } - - public static readonly BindableProperty ScanResultCommandProperty = - BindableProperty.Create( nameof( ScanResultCommand ), typeof( ICommand ), typeof( ZXingScannerView ), default( ICommand ) ); - public ICommand ScanResultCommand - { - get { return ( ICommand )GetValue( ScanResultCommandProperty ); } - set { SetValue( ScanResultCommandProperty, value ); } - } - } -} - diff --git a/Source/ZXing.Net.Mobile.Portable/AssemblyInfo.cs b/Source/ZXing.Net.Mobile.Portable/AssemblyInfo.cs deleted file mode 100644 index 51fbaefd9..000000000 --- a/Source/ZXing.Net.Mobile.Portable/AssemblyInfo.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -// Information about this assembly is defined by the following attributes. -// Change them to the values specific to your project. - -[assembly: AssemblyTitle("ZXing.Net.Mobile.Portable")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("redth")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". -// The form "{Major}.{Minor}.*" will automatically update the build and revision, -// and "{Major}.{Minor}.{Build}.*" will update just the revision. - -[assembly: AssemblyVersion("1.0.*")] - -// The following attributes are used to specify the signing key for the assembly, -// if desired. See the Mono documentation for more information about signing. - -//[assembly: AssemblyDelaySign(false)] -//[assembly: AssemblyKeyFile("")] - diff --git a/Source/ZXing.Net.Mobile.Portable/MobileBarcodeScanner.cs b/Source/ZXing.Net.Mobile.Portable/MobileBarcodeScanner.cs deleted file mode 100644 index efa25910b..000000000 --- a/Source/ZXing.Net.Mobile.Portable/MobileBarcodeScanner.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Threading.Tasks; - -namespace ZXing.Mobile -{ - public class MobileBarcodeScanner : MobileBarcodeScannerBase - { - NotSupportedException ex = new NotSupportedException ("Use the platform specific implementation instead!"); - - public override Task Scan(MobileBarcodeScanningOptions options) - { - throw ex; - } - - public override void ScanContinuously(MobileBarcodeScanningOptions options, Action scanHandler) - { - throw ex; - } - - public override void Cancel() - { - throw ex; - } - - public override void AutoFocus () - { - throw ex; - } - - public override void Torch (bool on) - { - throw ex; - } - - public override void ToggleTorch () - { - throw ex; - } - - public override void PauseAnalysis() - { - throw ex; - } - - public override void ResumeAnalysis() - { - throw ex; - } - - public override bool IsTorchOn { - get { - throw ex; - } - } - } -} - diff --git a/Source/ZXing.Net.Mobile.Portable/ZXing.Net.Mobile.Portable.csproj b/Source/ZXing.Net.Mobile.Portable/ZXing.Net.Mobile.Portable.csproj deleted file mode 100644 index 692c4690e..000000000 --- a/Source/ZXing.Net.Mobile.Portable/ZXing.Net.Mobile.Portable.csproj +++ /dev/null @@ -1,50 +0,0 @@ - - - - Debug - AnyCPU - {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - {78407906-99C6-42B0-A511-973FC78C58CB} - Library - ZXing.Mobile - ZXingNetMobile - Profile259 - v4.5 - - - true - full - false - ..\..\Build\Debug\portable - DEBUG; - prompt - 4 - false - - - full - true - ..\..\Build\Release\portable - prompt - 4 - false - - - - - - - - - - - - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB} - ZXing.Net.Mobile.Core - - - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3} - zxing.portable - - - \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.WindowsPhone/AssemblyInfo.cs b/Source/ZXing.Net.Mobile.WindowsPhone/AssemblyInfo.cs deleted file mode 100644 index fc30271f0..000000000 --- a/Source/ZXing.Net.Mobile.WindowsPhone/AssemblyInfo.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -// Information about this assembly is defined by the following attributes. -// Change them to the values specific to your project. - -[assembly: AssemblyTitle("ZXing.Net.Mobile.WindowsPhone")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("redth")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". -// The form "{Major}.{Minor}.*" will automatically update the build and revision, -// and "{Major}.{Minor}.{Build}.*" will update just the revision. - -[assembly: AssemblyVersion("1.0.*")] - -// The following attributes are used to specify the signing key for the assembly, -// if desired. See the Mono documentation for more information about signing. - -//[assembly: AssemblyDelaySign(false)] -//[assembly: AssemblyKeyFile("")] - diff --git a/Source/ZXing.Net.Mobile.WindowsPhone/AudioVideoCaptureDeviceCameraReader.cs b/Source/ZXing.Net.Mobile.WindowsPhone/AudioVideoCaptureDeviceCameraReader.cs deleted file mode 100644 index e2e2f04a7..000000000 --- a/Source/ZXing.Net.Mobile.WindowsPhone/AudioVideoCaptureDeviceCameraReader.cs +++ /dev/null @@ -1,417 +0,0 @@ -using Microsoft.Devices; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Media; -using System.Windows.Threading; -using Windows.Phone.Media.Capture; - -namespace ZXing.Mobile -{ - /// - /// Replacement camera preview reader/processor that uses SL8 APIs and fixes issues with turning on the flash/torch. - /// Written by Rodrigo 'r2d2rigo' Diaz - /// http://www.r2d2rigo.es - /// Based on SimpleCameraReader written by Henning M. Stephansen - /// http://www.henning.ms - /// - public class AudioVideoCaptureDeviceCameraReader - { - public delegate void DecodingCompletedEventHandler(object sender, Result result); - - public event DecodingCompletedEventHandler DecodingCompleted; - - public delegate void CameraInitializedEventHandler(object sender, bool initialized); - - public event CameraInitializedEventHandler CameraInitialized; - - private DispatcherTimer _timer; - private PhotoCameraLuminanceSource _luminance; - private MultiFormatReader _reader; - private AudioVideoCaptureDevice _photoCamera; - - private TimeSpan _scanInterval; - private DateTime _lastAnalysis = DateTime.MinValue; - - bool doCancel = false; - private bool _initialized; - private bool _wasScanned = false; - - private VideoBrush _surface; - - private Dispatcher uiDispatcher; - - //private System.Threading.CancellationTokenSource cancelTokenSource = new System.Threading.CancellationTokenSource(); - - /// - /// Sets how often we should try to decode - /// the camera feed for codes - /// - public double ScanInterval - { - get - { - return _scanInterval.TotalMilliseconds <= 0 ? _scanInterval.TotalMilliseconds : 150; - } - set - { - _scanInterval = TimeSpan.FromMilliseconds(value); - } - } - - /// - /// Gets the number of degrees that the viewfinder brush needs to be rotated - /// clockwise to align with the camera sensor - /// - public double CameraOrientation - { - get - { - return _photoCamera != null ? (double)_photoCamera.SensorRotationInDegrees : 0; - } - } - - /// - /// Returns the AudioVideoCaptureDevice instance - /// - public AudioVideoCaptureDevice Camera - { - get - { - return _photoCamera; - } - } - - /// - /// Get or set whether the camera should flash on auto-focus or not - /// - public FlashMode FlashMode - { - get - { - if (_initialized && _photoCamera != null) - { - var supportedCameraModes = AudioVideoCaptureDevice.GetSupportedPropertyValues(_photoCamera.SensorLocation, KnownCameraAudioVideoProperties.VideoTorchMode); - - if (supportedCameraModes.ToList().Contains((UInt32)VideoTorchMode.On)) - { - UInt32 propValue = (UInt32)_photoCamera.GetProperty(KnownCameraAudioVideoProperties.VideoTorchMode); - var torchStatus = (VideoTorchMode)propValue; - - switch (torchStatus) - { - default: - case VideoTorchMode.Off: - return FlashMode.Off; - case VideoTorchMode.On: - return FlashMode.On; - case VideoTorchMode.Auto: - return FlashMode.Auto; - } - } - } - - return FlashMode.Off; - } - set - { - if (_photoCamera != null) - { - var supportedCameraModes = AudioVideoCaptureDevice.GetSupportedPropertyValues(_photoCamera.SensorLocation, KnownCameraAudioVideoProperties.VideoTorchMode); - - if (supportedCameraModes.ToList().Contains((UInt32)VideoTorchMode.On)) - { - VideoTorchMode torchStatus = VideoTorchMode.Off; - - switch (value) - { - default: - case FlashMode.Off: - torchStatus = VideoTorchMode.Off; - break; - case FlashMode.On: - torchStatus = VideoTorchMode.On; - break; - case FlashMode.Auto: - torchStatus = VideoTorchMode.Auto; - break; - } - - _photoCamera.SetProperty(KnownCameraAudioVideoProperties.VideoTorchMode, torchStatus); - } - } - } - } - - public bool HasTorch - { - get - { - var supportedCameraModes = AudioVideoCaptureDevice.GetSupportedPropertyValues(_photoCamera.SensorLocation, KnownCameraAudioVideoProperties.VideoTorchMode); - - return supportedCameraModes != null && supportedCameraModes.ToList().Contains((UInt32)VideoTorchMode.On); - } - } - - public bool IsAnalyzing - { - get; set; - } - - - public MobileBarcodeScanningOptions Options { get; set; } - //public MobileBarcodeScannerBase Scanner { get; set; } - - /// - /// Initializes the SimpleCameraReader - /// - /// Sets whether the camera should scan on completed autofocus or on a timely fashion - public AudioVideoCaptureDeviceCameraReader(MobileBarcodeScanningOptions options) - { - this.Options = options ?? MobileBarcodeScanningOptions.Default; - // this.Scanner = scanner; - - Initialize(); - } - - private void Initialize() - { - //ScanOnAutoFocus = true; // scanOnAutoFocus; - - // Gets the Dispatcher for the current application so we can invoke the UI-Thread to get - // preview-image and fire our timer events - uiDispatcher = Application.Current.RootVisual.Dispatcher; - - _reader = this.Options.BuildMultiFormatReader(); - - InitializeCamera(); - } - - private async Task InitializeCamera() - { - if (Options.UseFrontCameraIfAvailable.HasValue && Options.UseFrontCameraIfAvailable.Value) - { - try - { - var frontCameraCaptureResolutions = AudioVideoCaptureDevice.GetAvailableCaptureResolutions(CameraSensorLocation.Front); - var resolution = GetResolution(frontCameraCaptureResolutions.OrderBy(r => r.Width * r.Height)); - _photoCamera = await AudioVideoCaptureDevice.OpenForVideoOnlyAsync(CameraSensorLocation.Front, resolution); - } - catch (Exception ex) - { - MobileBarcodeScanner.Log("Failed to create front facing camera: {0}", ex); - } - } - - MobileBarcodeScanner.Log("InitializeCamera"); - - if (_photoCamera == null) - { - var backCameraCaptureResolutions = AudioVideoCaptureDevice.GetAvailableCaptureResolutions(CameraSensorLocation.Back); - var resolution = GetResolution(backCameraCaptureResolutions.OrderBy(r => r.Width * r.Height)); - _photoCamera = await AudioVideoCaptureDevice.OpenForVideoOnlyAsync(CameraSensorLocation.Back, resolution); - } - - IsAnalyzing = true; - - OnPhotoCameraInitialized(this, new CameraOperationCompletedEventArgs(true, null)); - - MobileBarcodeScanner.Log("Wired up Initizialied"); - } - - Windows.Foundation.Size GetResolution (IEnumerable availableResolutions) - { - var size = availableResolutions.FirstOrDefault(); - - if (this.Options.CameraResolutionSelector != null) - { - var cameraResolutions = from r in availableResolutions select new CameraResolution { Width = (int)r.Width, Height = (int)r.Height }; - var selected = this.Options.CameraResolutionSelector(cameraResolutions.ToList ()); - - if (selected != null) - size = availableResolutions.FirstOrDefault(r => r.Width == selected.Width && r.Height == selected.Height); - } - else - { - // Loop through all supported sizes - foreach (var sps in availableResolutions) - { - // Find one that's >= 640x360 but <= 1000x1000 - // This will likely pick the *smallest* size in that range, which should be fine - if (sps.Width >= 640 && sps.Width <= 1000 && sps.Height >= 360 && sps.Height <= 1000) - size = sps; - } - } - - return size; - } - - /// - /// Starts the camera and capture process - /// - public void Start() - { - if (_photoCamera == null) - InitializeCamera(); - - // At this point if application exits etc. without proper stopping of camera - // it will throw an Exception. - try - { - // Invokes these method calls on the UI-thread - uiDispatcher.BeginInvoke(() => - { - _timer = new DispatcherTimer(); - _timer.Interval = _scanInterval; - _timer.Tick += (o, arg) => ScanPreviewBuffer(); - - CameraButtons.ShutterKeyHalfPressed += CameraButtons_ShutterKeyHalfPressed; - - _timer.Start(); - }); - - } - catch (Exception) - { - // Do nothing - } - - Focus(); - } - - private void CameraButtons_ShutterKeyHalfPressed(object sender, EventArgs e) - { - Focus(); - } - - public async Task Focus() - { - try - { - await _photoCamera.FocusAsync(); - } - catch { } - } - - public void Focus(Point point) - { - try - { - // TODO: point focusing - //if (_photoCamera.IsFocusAtPointSupported) - // _photoCamera.FocusAtPoint(point.X, point.Y); - //else - Focus(); - } - catch { } - } - - /// - /// Stops the camera and capture process - /// - public void Stop() - { - IsAnalyzing = false; - doCancel = true; - - if (_timer != null && _timer.IsEnabled) - _timer.Stop(); - - if (_photoCamera != null) - { - CameraButtons.ShutterKeyHalfPressed -= CameraButtons_ShutterKeyHalfPressed; - - _photoCamera.Dispose(); - _photoCamera = null; - } - } - - private void OnPhotoCameraInitialized(object sender, CameraOperationCompletedEventArgs e) - { - MobileBarcodeScanner.Log("Initialized Camera"); - - if (_photoCamera == null) - return; - - MobileBarcodeScanner.Log("Creating Luminance Source"); - - var width = Convert.ToInt32(_photoCamera.PreviewResolution.Width); - var height = Convert.ToInt32(_photoCamera.PreviewResolution.Height); - - _luminance = new PhotoCameraLuminanceSource(width, height); - - var supportedCameraModes = AudioVideoCaptureDevice.GetSupportedPropertyValues(_photoCamera.SensorLocation, KnownCameraAudioVideoProperties.VideoTorchMode); - if (supportedCameraModes.ToList().Contains((UInt32)VideoTorchMode.On)) - { - _photoCamera.SetProperty(KnownCameraAudioVideoProperties.VideoTorchMode, VideoTorchMode.Off); - } - - _initialized = true; - - MobileBarcodeScanner.Log("Luminance Source Created"); - - OnCameraInitialized(_initialized); - } - - private void ScanPreviewBuffer() - { - if (!IsAnalyzing) return; - if (_photoCamera == null) return; - if (!_initialized) return; - - // Don't scan too frequently - // Check the minimum time between frames - // as well as the min time between continuous scans - var msSinceLastPreview = (DateTime.UtcNow - _lastAnalysis).TotalMilliseconds; - if ((DateTime.UtcNow - _lastAnalysis).TotalMilliseconds < Options.DelayBetweenAnalyzingFrames - || (_wasScanned && msSinceLastPreview < Options.DelayBetweenContinuousScans)) - return; - - _wasScanned = false; - _lastAnalysis = DateTime.UtcNow; - - try - { - _photoCamera.GetPreviewBufferY(_luminance.PreviewBufferY); - var binarizer = new ZXing.Common.HybridBinarizer(_luminance); - - var binBitmap = new BinaryBitmap(binarizer); - - var result = _reader.decode(binBitmap); - - if (result != null) - { - _wasScanned = true; - OnDecodingCompleted(result); - } - } - catch (Exception) - { - // If decoding fails it will throw a ReaderException - // and we're not interested in doing anything with it - } - } - - /// - /// When a decode was successful we get a result back - /// - /// Result of the decoding - protected virtual void OnDecodingCompleted(Result result) - { - if (DecodingCompleted != null) - DecodingCompleted(this, result); - } - - /// - /// When camera is finished initializing and ready to go. Put Start after this event has fired - /// - /// A boolean value indicating whether camera was successfully initialized - protected virtual void OnCameraInitialized(bool initialized) - { - if (CameraInitialized != null) - CameraInitialized(this, initialized); - } - } -} \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.WindowsPhone/BarcodeWriter.cs b/Source/ZXing.Net.Mobile.WindowsPhone/BarcodeWriter.cs deleted file mode 100644 index 6762dc024..000000000 --- a/Source/ZXing.Net.Mobile.WindowsPhone/BarcodeWriter.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZXing.Mobile -{ - /// - /// A smart class to encode some content to a barcode image - /// - public class BarcodeWriter : BarcodeWriterGeneric, IBarcodeWriter - { - /// - /// Initializes a new instance of the class. - /// - public BarcodeWriter() - { - Renderer = new WriteableBitmapRenderer(); - } - } -} diff --git a/Source/ZXing.Net.Mobile.WindowsPhone/MobileBarcodeScanner.cs b/Source/ZXing.Net.Mobile.WindowsPhone/MobileBarcodeScanner.cs deleted file mode 100644 index acb9515b3..000000000 --- a/Source/ZXing.Net.Mobile.WindowsPhone/MobileBarcodeScanner.cs +++ /dev/null @@ -1,134 +0,0 @@ -using System; -using System.Threading.Tasks; -using System.Net; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; -using System.Windows.Ink; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Shapes; -using ZXing; - -namespace ZXing.Mobile -{ - public class MobileBarcodeScanner : MobileBarcodeScannerBase - { - public MobileBarcodeScanner () : base () - { - this.Dispatcher = Deployment.Current.Dispatcher; - } - - public MobileBarcodeScanner(System.Windows.Threading.Dispatcher dispatcher) : base() - { - this.Dispatcher = dispatcher; - } - - public System.Windows.Threading.Dispatcher Dispatcher { get; set; } - - public override void ScanContinuously(MobileBarcodeScanningOptions options, Action scanHandler) - { - //Navigate: /ZxingSharp.WindowsPhone;component/Scan.xaml - - ScanPage.ScanningOptions = options; - ScanPage.ResultFoundAction = (r) => - { - scanHandler(r); - }; - - ScanPage.UseCustomOverlay = this.UseCustomOverlay; - ScanPage.CustomOverlay = this.CustomOverlay; - ScanPage.TopText = TopText; - ScanPage.BottomText = BottomText; - ScanPage.ContinuousScanning = true; - - Dispatcher.BeginInvoke(() => - { - ((Microsoft.Phone.Controls.PhoneApplicationFrame)Application.Current.RootVisual).Navigate( - new Uri("/ZXingNetMobile;component/ScanPage.xaml", UriKind.Relative)); - }); - } - - public override Task Scan(MobileBarcodeScanningOptions options) - { - return Task.Factory.StartNew(new Func(() => - { - var scanResultResetEvent = new System.Threading.ManualResetEvent(false); - - Result result = null; - - //Navigate: /ZxingSharp.WindowsPhone;component/Scan.xaml - - ScanPage.ScanningOptions = options; - ScanPage.ResultFoundAction = (r) => - { - result = r; - scanResultResetEvent.Set(); - }; - - ScanPage.UseCustomOverlay = this.UseCustomOverlay; - ScanPage.CustomOverlay = this.CustomOverlay; - ScanPage.TopText = TopText; - ScanPage.BottomText = BottomText; - ScanPage.ContinuousScanning = false; - - Dispatcher.BeginInvoke(() => - { - ((Microsoft.Phone.Controls.PhoneApplicationFrame)Application.Current.RootVisual).Navigate( - new Uri("/ZXingNetMobile;component/ScanPage.xaml", UriKind.Relative)); - }); - - scanResultResetEvent.WaitOne(); - - return result; - })); - } - - public override void Cancel() - { - ScanPage.RequestCancel(); - } - - public override void Torch(bool on) - { - ScanPage.RequestTorch(on); - } - - public override void ToggleTorch() - { - ScanPage.RequestToggleTorch(); - } - - public override void PauseAnalysis () - { - ScanPage.RequestPauseAnalysis (); - } - - public override void ResumeAnalysis () - { - ScanPage.RequestResumeAnalysis (); - } - - public override bool IsTorchOn - { - get { return ScanPage.RequestIsTorchOn(); } - } - - public override void AutoFocus() - { - ScanPage.RequestAutoFocus(); - } - - public System.Windows.UIElement CustomOverlay - { - get; - set; - } - - internal static void Log(string message, params object[] args) - { - System.Diagnostics.Debug.WriteLine(message, args); - } - } -} diff --git a/Source/ZXing.Net.Mobile.WindowsPhone/PhotoCameraLuminanceSource.cs b/Source/ZXing.Net.Mobile.WindowsPhone/PhotoCameraLuminanceSource.cs deleted file mode 100644 index dcc35dab5..000000000 --- a/Source/ZXing.Net.Mobile.WindowsPhone/PhotoCameraLuminanceSource.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Net; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; -using System.Windows.Ink; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Shapes; -using ZXing; - -namespace ZXing.Mobile -{ - public class PhotoCameraLuminanceSource : LuminanceSource - { - public byte[] PreviewBufferY { get; private set; } - - public PhotoCameraLuminanceSource(int width, int height) - : base(width, height) - { - PreviewBufferY = new byte[width * height]; - } - - public override byte[] Matrix - { - get { return (byte[])(Array)PreviewBufferY; } - } - - public override byte[] getRow(int y, byte[] row) - { - if (row == null || row.Length < Width) - { - row = new byte[Width]; - } - - for (int i = 0; i < Height; i++) - row[i] = (byte)PreviewBufferY[i * Width + y]; - - return row; - } - } -} \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.WindowsPhone/ScanPage.xaml b/Source/ZXing.Net.Mobile.WindowsPhone/ScanPage.xaml deleted file mode 100644 index 722752644..000000000 --- a/Source/ZXing.Net.Mobile.WindowsPhone/ScanPage.xaml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.WindowsPhone/ScanPage.xaml.cs b/Source/ZXing.Net.Mobile.WindowsPhone/ScanPage.xaml.cs deleted file mode 100644 index 78c6e3174..000000000 --- a/Source/ZXing.Net.Mobile.WindowsPhone/ScanPage.xaml.cs +++ /dev/null @@ -1,221 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Net; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Navigation; -using System.Windows.Shapes; -using Microsoft.Devices; -using Microsoft.Phone.Controls; -using ZXing; - -namespace ZXing.Mobile -{ - public partial class ScanPage : PhoneApplicationPage - { - public static MobileBarcodeScanningOptions ScanningOptions { get; set; } - public static MobileBarcodeScannerBase Scanner { get; set; } - public static UIElement CustomOverlay { get; set; } - public static string TopText { get; set; } - public static string BottomText { get; set; } - public static bool UseCustomOverlay { get; set; } - public static bool ContinuousScanning { get; set; } - - public static Result LastScanResult { get; set; } - - public static Action ResultFoundAction { get; set; } - - public static event Action OnRequestTorch; - public static event Action OnRequestToggleTorch; - public static event Action OnRequestAutoFocus; - public static event Action OnRequestCancel; - public static event Func OnRequestIsTorchOn; - public static Action OnRequestPauseAnalysis; - public static Action OnRequestResumeAnalysis; - - public static bool RequestIsTorchOn() - { - var evt = OnRequestIsTorchOn; - return evt != null && evt(); - } - - public static void RequestTorch(bool on) - { - var evt = OnRequestTorch; - if (evt != null) - evt(on); - } - - public static void RequestToggleTorch() - { - var evt = OnRequestToggleTorch; - if (evt != null) - evt(); - } - - public static void RequestAutoFocus() - { - var evt = OnRequestAutoFocus; - if (evt != null) - evt(); - } - - public static void RequestCancel() - { - var evt = OnRequestCancel; - if (evt != null) - evt(); - } - - public static void RequestPauseAnalysis() - { - var evt = OnRequestPauseAnalysis; - if (evt != null) - evt(); - } - - public static void RequestResumeAnalysis() - { - var evt = OnRequestResumeAnalysis; - if (evt != null) - evt(); - } - - public ScanPage() - { - InitializeComponent(); - isNewInstance = true; - } - - void RequestAutoFocusHandler() - { - if (scannerControl != null) - scannerControl.AutoFocus(); - } - - void RequestTorchHandler(bool on) - { - if (scannerControl != null) - scannerControl.Torch(on); - } - - void RequestToggleTorchHandler() - { - if (scannerControl != null) - scannerControl.ToggleTorch(); - } - - void RequestCancelHandler() - { - if (scannerControl != null) - scannerControl.Cancel(); - } - - void RequestPauseAnalysisHandler() - { - if (scannerControl != null) - scannerControl.PauseAnalysis(); - } - - void RequestResumeAnalysisHandler() - { - if (scannerControl != null) - scannerControl.ResumeAnalysis(); - } - - bool RequestIsTorchOnHandler() - { - if (scannerControl != null) - return scannerControl.IsTorchOn; - - return false; - } - - protected override void OnNavigatedTo(NavigationEventArgs e) - { - scannerControl.TopText = TopText; - scannerControl.BottomText = BottomText; - - scannerControl.CustomOverlay = CustomOverlay; - scannerControl.UseCustomOverlay = UseCustomOverlay; - - scannerControl.ScanningOptions = ScanningOptions; - scannerControl.ContinuousScanning = ScanPage.ContinuousScanning; - - OnRequestAutoFocus += RequestAutoFocusHandler; - OnRequestTorch += RequestTorchHandler; - OnRequestToggleTorch += RequestToggleTorchHandler; - OnRequestCancel += RequestCancelHandler; - OnRequestIsTorchOn += RequestIsTorchOnHandler; - OnRequestPauseAnalysis += RequestPauseAnalysisHandler; - OnRequestResumeAnalysis += RequestResumeAnalysisHandler; - - scannerControl.StartScanning(HandleResult, ScanningOptions); - - if (!isNewInstance && !isDeactivated && NavigationService.CanGoBack) - NavigationService.GoBack(); - - isNewInstance = false; - - base.OnNavigatedTo(e); - } - - private bool isNewInstance = false; - private bool isDeactivated = false; - - protected override void OnNavigatingFrom(NavigatingCancelEventArgs e) - { - try - { - isDeactivated = e.NavigationMode != NavigationMode.Back; - OnRequestAutoFocus -= RequestAutoFocusHandler; - OnRequestTorch -= RequestTorchHandler; - OnRequestToggleTorch -= RequestToggleTorchHandler; - OnRequestCancel -= RequestCancelHandler; - OnRequestIsTorchOn -= RequestIsTorchOnHandler; - OnRequestPauseAnalysis -= RequestPauseAnalysisHandler; - OnRequestResumeAnalysis -= RequestResumeAnalysisHandler; - - scannerControl.StopScanning(); - - if (!ContinuousScanning) - RaiseEmptyResult(); - } - catch (Exception ex) { - MobileBarcodeScanner.Log("OnNavigatingFrom Error: {0}", ex); - } - - base.OnNavigatingFrom(e); - } - - void RaiseEmptyResult() - { - LastScanResult = null; - - var evt = ResultFoundAction; - if (evt != null) - evt(LastScanResult); - } - - void HandleResult(ZXing.Result result) - { - LastScanResult = result; - - var evt = ResultFoundAction; - if (evt != null) - evt(LastScanResult); - - if (!ContinuousScanning) - { - if (NavigationService.CanGoBack) - NavigationService.GoBack(); - } - } - } -} diff --git a/Source/ZXing.Net.Mobile.WindowsPhone/SimpleCameraReader.cs b/Source/ZXing.Net.Mobile.WindowsPhone/SimpleCameraReader.cs deleted file mode 100644 index 5f8b4e820..000000000 --- a/Source/ZXing.Net.Mobile.WindowsPhone/SimpleCameraReader.cs +++ /dev/null @@ -1,326 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Net; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Documents; -using System.Windows.Ink; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Threading; -using Microsoft.Devices; -using System.Windows.Media.Animation; -using System.Windows.Shapes; -using ZXing; - -namespace ZXing.Mobile -{ - /// - /// A simple and easy to use wrapper for ZXing 2.0 for use with Windows Phone 7 - /// Written by Henning M. Stephansen - /// http://www.henning.ms - /// - public class SimpleCameraReader - { - public delegate void DecodingCompletedEventHandler(object sender, Result result); - - public event DecodingCompletedEventHandler DecodingCompleted; - - public delegate void CameraInitializedEventHandler(object sender, bool initialized); - - public event CameraInitializedEventHandler CameraInitialized; - - private DispatcherTimer _timer; - private PhotoCameraLuminanceSource _luminance; - private MultiFormatReader _reader; - private PhotoCamera _photoCamera; - - private TimeSpan _scanInterval; - private DateTime _lastAnalysis = DateTime.MinValue; - - bool doCancel = false; - private bool _initialized; - private bool _wasScanned = false; - public bool IsAnalyzing { get; set; } - - private VideoBrush _surface; - - private Dispatcher uiDispatcher; - - //private System.Threading.CancellationTokenSource cancelTokenSource = new System.Threading.CancellationTokenSource(); - - /// - /// Sets how often we should try to decode - /// the camera feed for codes - /// - public double ScanInterval - { - get - { - return _scanInterval.TotalMilliseconds <= 0 ? _scanInterval.TotalMilliseconds : 150; - } - set - { - _scanInterval = TimeSpan.FromMilliseconds(value); - } - } - - /// - /// Gets the number of degrees that the viewfinder brush needs to be rotated - /// clockwise to align with the camera sensor - /// - public double CameraOrientation - { - get - { - return _photoCamera != null ? _photoCamera.Orientation : 0; - } - } - - /// - /// Returns the PhotoCamera instance - /// - public PhotoCamera Camera - { - get - { - return _photoCamera; - } - } - - /// - /// Get or set whether the camera should flash on auto-focus or not - /// - public FlashMode FlashMode - { - get - { - if (_initialized && _photoCamera != null && _photoCamera.IsFlashModeSupported(FlashMode.On)) - return _photoCamera.FlashMode != FlashMode.Off ? _photoCamera.FlashMode : FlashMode.Off; - - return FlashMode.Off; - } - set - { - if (_photoCamera != null && _photoCamera.IsFlashModeSupported(value)) - _photoCamera.FlashMode = value; - } - } - - public MobileBarcodeScanningOptions Options { get; set; } - //public MobileBarcodeScannerBase Scanner { get; set; } - - /// - /// Initializes the SimpleCameraReader - /// - /// Sets whether the camera should scan on completed autofocus or on a timely fashion - public SimpleCameraReader(MobileBarcodeScanningOptions options) - { - this.Options = options ?? MobileBarcodeScanningOptions.Default; - // this.Scanner = scanner; - - Initialize(); - } - - private void Initialize() - { - //ScanOnAutoFocus = true; // scanOnAutoFocus; - - // Gets the Dispatcher for the current application so we can invoke the UI-Thread to get - // preview-image and fire our timer events - uiDispatcher = Application.Current.RootVisual.Dispatcher; - - InitializeCamera(); - - - _reader = this.Options.BuildMultiFormatReader(); - } - - private void InitializeCamera() - { - if (Options.UseFrontCameraIfAvailable.HasValue && Options.UseFrontCameraIfAvailable.Value) - { - try { _photoCamera = new PhotoCamera(CameraType.FrontFacing); } - catch (Exception ex) { - MobileBarcodeScanner.Log ("Failed to create front facing camera: {0}", ex); - } - } - - MobileBarcodeScanner.Log("InitializeCamera"); - - if (_photoCamera == null) - _photoCamera = new PhotoCamera(); - _photoCamera.Initialized += OnPhotoCameraInitialized; - - MobileBarcodeScanner.Log("Wired up Initizialied"); - } - - /// - /// Starts the camera and capture process - /// - public void Start() - { - if (_photoCamera == null) - InitializeCamera(); - - // At this point if application exits etc. without proper stopping of camera - // it will throw an Exception. - try - { - // Invokes these method calls on the UI-thread - uiDispatcher.BeginInvoke(() => - { - _timer = new DispatcherTimer(); - _timer.Interval = _scanInterval; - _timer.Tick += (o, arg) => ScanPreviewBuffer(); - - CameraButtons.ShutterKeyHalfPressed += CameraButtons_ShutterKeyHalfPressed; - - _timer.Start(); - }); - - } - catch (Exception) - { - // Do nothing - } - - Focus(); - } - - private void CameraButtons_ShutterKeyHalfPressed(object sender, EventArgs e) - { - Focus(); - } - - public void Focus() - { - try - { - if (_photoCamera.IsFocusSupported) - _photoCamera.Focus(); - } - catch { } - } - - public void Focus(Point point) - { - try - { - if (_photoCamera.IsFocusAtPointSupported) - _photoCamera.FocusAtPoint(point.X, point.Y); - else - Focus(); - } - catch { } - } - - /// - /// Stops the camera and capture process - /// - public void Stop() - { - doCancel = true; - IsAnalyzing = false; - - if (_timer != null && _timer.IsEnabled) - _timer.Stop(); - - if (_photoCamera != null) - { - CameraButtons.ShutterKeyHalfPressed -= CameraButtons_ShutterKeyHalfPressed; - - _photoCamera.Initialized -= OnPhotoCameraInitialized; - _photoCamera.Dispose(); - _photoCamera = null; - } - - } - - private void OnPhotoCameraInitialized(object sender, CameraOperationCompletedEventArgs e) - { - MobileBarcodeScanner.Log("Initialized Camera"); - - if (_photoCamera == null) - return; - IsAnalyzing = true; - - MobileBarcodeScanner.Log("Creating Luminance Source"); - - var width = Convert.ToInt32(_photoCamera.PreviewResolution.Width); - var height = Convert.ToInt32(_photoCamera.PreviewResolution.Height); - - _luminance = new PhotoCameraLuminanceSource(width, height); - - if (_photoCamera.IsFlashModeSupported(FlashMode.On)) - _photoCamera.FlashMode = FlashMode.Off; - - _initialized = true; - - MobileBarcodeScanner.Log("Luminance Source Created"); - - OnCameraInitialized(_initialized); - } - - private void ScanPreviewBuffer() - { - if (_photoCamera == null) return; - if (!_initialized) return; - - // Don't scan too frequently - // Check the minimum time between frames - // as well as the min time between continuous scans - var msSinceLastPreview = (DateTime.UtcNow - _lastAnalysis).TotalMilliseconds; - if ((DateTime.UtcNow - _lastAnalysis).TotalMilliseconds < Options.DelayBetweenAnalyzingFrames - || (_wasScanned && msSinceLastPreview < Options.DelayBetweenContinuousScans)) - return; - - if (!IsAnalyzing) - return; - - _wasScanned = false; - _lastAnalysis = DateTime.UtcNow; - - try - { - _photoCamera.GetPreviewBufferY(_luminance.PreviewBufferY); - var binarizer = new ZXing.Common.HybridBinarizer(_luminance); - - var binBitmap = new BinaryBitmap(binarizer); - - var result = _reader.decode(binBitmap); - - if (result != null) - { - _wasScanned = true; - OnDecodingCompleted(result); - } - } - catch (Exception) - { - // If decoding fails it will throw a ReaderException - // and we're not interested in doing anything with it - } - } - - /// - /// When a decode was successful we get a result back - /// - /// Result of the decoding - protected virtual void OnDecodingCompleted(Result result) - { - if (DecodingCompleted != null) - DecodingCompleted(this, result); - } - - /// - /// When camera is finished initializing and ready to go. Put Start after this event has fired - /// - /// A boolean value indicating whether camera was successfully initialized - protected virtual void OnCameraInitialized(bool initialized) - { - if (CameraInitialized != null) - CameraInitialized(this, initialized); - } - } -} diff --git a/Source/ZXing.Net.Mobile.WindowsPhone/WriteableBitmapRenderer.cs b/Source/ZXing.Net.Mobile.WindowsPhone/WriteableBitmapRenderer.cs deleted file mode 100644 index 694037859..000000000 --- a/Source/ZXing.Net.Mobile.WindowsPhone/WriteableBitmapRenderer.cs +++ /dev/null @@ -1,273 +0,0 @@ -/* - * Copyright 2012 ZXing.Net authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -using System; -using System.Windows; -#if NETFX_CORE -using Windows.UI; -using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Media.Imaging; -#else -using System.Windows.Media; -using System.Windows.Media.Imaging; -#endif - -using ZXing; -using ZXing.Common; -using ZXing.OneD; -using ZXing.Rendering; - -namespace ZXing.Mobile -{ - /// - /// Renders a to a - /// - public class WriteableBitmapRenderer : IBarcodeRenderer - { - /// - /// Gets or sets the foreground color. - /// - /// - /// The foreground color. - /// - public Color Foreground { get; set; } - /// - /// Gets or sets the background color. - /// - /// - /// The background color. - /// - public Color Background { get; set; } - /// - /// Gets or sets the font family. - /// - /// - /// The font family. - /// - public FontFamily FontFamily { get; set; } - /// - /// Gets or sets the size of the font. - /// - /// - /// The size of the font. - /// - public double FontSize { get; set; } - -#if !NETFX_CORE - /// - /// Gets or sets the font stretch. - /// - /// - /// The font stretch. - /// - public FontStretch FontStretch { get; set; } - /// - /// Gets or sets the font style. - /// - /// - /// The font style. - /// - public FontStyle FontStyle { get; set; } - /// - /// Gets or sets the font weight. - /// - /// - /// The font weight. - /// - public FontWeight FontWeight { get; set; } -#endif - - private static readonly FontFamily DefaultFontFamily = new FontFamily("Arial"); - - /// - /// Initializes a new instance of the class. - /// - public WriteableBitmapRenderer() - { - Foreground = Colors.Black; - Background = Colors.White; - FontFamily = DefaultFontFamily; - FontSize = 10.0; -#if !NETFX_CORE - FontStretch = FontStretches.Normal; - FontStyle = FontStyles.Normal; - FontWeight = FontWeights.Normal; -#endif - } - - /// - /// Renders the specified matrix. - /// - /// The matrix. - /// The format. - /// The content. - /// - public WriteableBitmap Render(BitMatrix matrix, BarcodeFormat format, string content) - { - return Render(matrix, format, content, null); - } - - /// - /// Renders the specified matrix. - /// - /// The matrix. - /// The format. - /// The content. - /// The options. - /// - virtual public WriteableBitmap Render(BitMatrix matrix, BarcodeFormat format, string content, EncodingOptions options) - { - int width = matrix.Width; - int height = matrix.Height; - bool outputContent = (options == null || !options.PureBarcode) && - !String.IsNullOrEmpty(content) && (format == BarcodeFormat.CODE_39 || - format == BarcodeFormat.CODE_128 || - format == BarcodeFormat.EAN_13 || - format == BarcodeFormat.EAN_8 || - format == BarcodeFormat.CODABAR || - format == BarcodeFormat.ITF || - format == BarcodeFormat.UPC_A || - format == BarcodeFormat.MSI || - format == BarcodeFormat.PLESSEY); - int emptyArea = outputContent ? 16 : 0; - int pixelsize = 1; - - if (options != null) - { - if (options.Width > width) - { - width = options.Width; - } - if (options.Height > height) - { - height = options.Height; - } - // calculating the scaling factor - pixelsize = width / matrix.Width; - if (pixelsize > height / matrix.Height) - { - pixelsize = height / matrix.Height; - } - } - -#if NETFX_CORE - var foreground = new byte[] { Foreground.B, Foreground.G, Foreground.R, Foreground.A }; - var background = new byte[] { Background.B, Background.G, Background.R, Background.A }; - var bmp = new WriteableBitmap(width, height); - var length = width * height; - - // Copy data back - using (var stream = System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeBufferExtensions.AsStream(bmp.PixelBuffer)) - { - for (int y = 0; y < matrix.Height - emptyArea; y++) - { - for (var pixelsizeHeight = 0; pixelsizeHeight < pixelsize; pixelsizeHeight++) - { - for (var x = 0; x < matrix.Width; x++) - { - var color = matrix[x, y] ? foreground : background; - for (var pixelsizeWidth = 0; pixelsizeWidth < pixelsize; pixelsizeWidth++) - { - stream.Write(color, 0, 4); - } - } - for (var x = pixelsize * matrix.Width; x < width; x++) - { - stream.Write(background, 0, 4); - } - } - } - for (int y = matrix.Height * pixelsize - emptyArea; y < height; y++) - { - for (var x = 0; x < width; x++) - { - stream.Write(background, 0, 4); - } - } - } - bmp.Invalidate(); -#else - int foreground = Foreground.A << 24 | Foreground.R << 16 | Foreground.G << 8 | Foreground.B; - int background = Background.A << 24 | Background.R << 16 | Background.G << 8 | Background.B; -#if WPF - var bmp = new WriteableBitmap(width, height, 100.0, 100.0, PixelFormats.Bgra32, null); - var pixels = new int[width*height]; -#else - var bmp = new WriteableBitmap(width, height); - var pixels = bmp.Pixels; -#endif - var index = 0; - - for (int y = 0; y < matrix.Height - emptyArea; y++) - { - for (var pixelsizeHeight = 0; pixelsizeHeight < pixelsize; pixelsizeHeight++) - { - for (var x = 0; x < matrix.Width; x++) - { - var color = matrix[x, y] ? foreground : background; - for (var pixelsizeWidth = 0; pixelsizeWidth < pixelsize; pixelsizeWidth++) - { - pixels[index++] = color; - } - } - for (var x = pixelsize * matrix.Width; x < width; x++) - { - pixels[index++] = background; - } - } - } - for (int y = matrix.Height * pixelsize - emptyArea; y < height; y++) - { - for (var x = 0; x < width; x++) - { - pixels[index++] = background; - } - } -#if WPF - bmp.WritePixels(new Int32Rect(0, 0, width, height), pixels, bmp.BackBufferStride, 0); -#else - bmp.Invalidate(); -#endif -#endif - - /* doesn't correctly work at the moment - * renders at the wrong position - if (outputContent) - { - switch (format) - { - case BarcodeFormat.EAN_8: - if (content.Length < 8) - content = OneDimensionalCodeWriter.CalculateChecksumDigitModulo10(content); - content = content.Insert(4, " "); - break; - case BarcodeFormat.EAN_13: - if (content.Length < 13) - content = OneDimensionalCodeWriter.CalculateChecksumDigitModulo10(content); - content = content.Insert(7, " "); - content = content.Insert(1, " "); - break; - } - var txt1 = new TextBlock {Text = content, FontSize = 10, Foreground = new SolidColorBrush(Colors.Black)}; - bmp.Render(txt1, new RotateTransform { Angle = 0, CenterX = width / 2, CenterY = height - 14}); - bmp.Invalidate(); - } - * */ - - return bmp; - } - } -} diff --git a/Source/ZXing.Net.Mobile.WindowsPhone/ZXing.Net.Mobile.WindowsPhone.csproj b/Source/ZXing.Net.Mobile.WindowsPhone/ZXing.Net.Mobile.WindowsPhone.csproj deleted file mode 100644 index fe8219779..000000000 --- a/Source/ZXing.Net.Mobile.WindowsPhone/ZXing.Net.Mobile.WindowsPhone.csproj +++ /dev/null @@ -1,150 +0,0 @@ - - - - Debug - AnyCPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D} - {C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - ZXing.Mobile - ZXingNetMobile - v8.0 - - - - - WindowsPhone - false - true - true - 11.0 - - - true - full - false - ..\..\Build\Debug\wp8.0\ - DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE - true - true - prompt - 4 - false - - - pdbonly - true - ..\..\Build\Release\wp8.0\ - TRACE;SILVERLIGHT;WINDOWS_PHONE - true - true - prompt - 4 - false - - - true - Bin\x86\Debug - DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE - true - full - - - prompt - MinimumRecommendedRules.ruleset - false - - - ..\..\Build\Release\wp8.0\ - TRACE;SILVERLIGHT;WINDOWS_PHONE - true - true - pdbonly - - - prompt - MinimumRecommendedRules.ruleset - - - true - Bin\ARM\Debug - DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE - true - full - - - prompt - MinimumRecommendedRules.ruleset - false - - - Bin\ARM\Release - TRACE;SILVERLIGHT;WINDOWS_PHONE - true - true - pdbonly - - - prompt - MinimumRecommendedRules.ruleset - - - - - - - - - ScanPage.xaml - - - - - ZXingScannerControl.xaml - - - - - {7528dd0a-1781-47f4-adbf-eeddb011f6bb} - ZXing.Net.Mobile.Core - - - {24b441f2-cbe9-4405-9fd0-72ebcbea0ec3} - zxing.portable - - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - - - ..\..\packages\WriteableBitmapEx.1.5.0.0\lib\WindowsPhone8\WriteableBitmapExWinPhone.dll - True - - - ..\..\packages\WriteableBitmapEx.1.5.0.0\lib\WindowsPhone8\WriteableBitmapExWinPhoneXnaDependant.dll - True - - - - - - - - - - \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.WindowsPhone/ZXingScannerControl.xaml b/Source/ZXing.Net.Mobile.WindowsPhone/ZXingScannerControl.xaml deleted file mode 100644 index 303f1f8dd..000000000 --- a/Source/ZXing.Net.Mobile.WindowsPhone/ZXingScannerControl.xaml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.WindowsPhone/ZXingScannerControl.xaml.cs b/Source/ZXing.Net.Mobile.WindowsPhone/ZXingScannerControl.xaml.cs deleted file mode 100644 index a755db45a..000000000 --- a/Source/ZXing.Net.Mobile.WindowsPhone/ZXingScannerControl.xaml.cs +++ /dev/null @@ -1,224 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Navigation; -using Microsoft.Devices; -using Microsoft.Phone.Controls; -using Microsoft.Phone.Shell; - -namespace ZXing.Mobile -{ - public partial class ZXingScannerControl : UserControl, IDisposable, IScannerView - { - public ZXingScannerControl() : base() - { - InitializeComponent(); - } - - public void StartScanning(Action scanCallback, MobileBarcodeScanningOptions options = null) - { - ScanCallback = scanCallback; - ScanningOptions = options ?? MobileBarcodeScanningOptions.Default; - - this.topText.Text = TopText; - this.bottomText.Text = BottomText; - - if (UseCustomOverlay) - { - gridCustomOverlay.Children.Clear(); - if (CustomOverlay != null) - gridCustomOverlay.Children.Add(CustomOverlay); - - gridCustomOverlay.Visibility = Visibility.Visible; - gridDefaultOverlay.Visibility = Visibility.Collapsed; - } - else - { - gridCustomOverlay.Visibility = Visibility.Collapsed; - gridDefaultOverlay.Visibility = Visibility.Visible; - } - - MobileBarcodeScanner.Log("ZXingScannerControl.StartScanning"); - - // Initialize a new instance of SimpleCameraReader with Auto-Focus mode on - if (_reader == null) - { - MobileBarcodeScanner.Log("Creating SimpleCameraReader"); - - //_reader = new SimpleCameraReader(options); - _reader = new AudioVideoCaptureDeviceCameraReader(options); - _reader.ScanInterval = ScanningOptions.DelayBetweenAnalyzingFrames; - - // AudioVideoCaptureDevice - move this to camera initialized otherwise throws - // We need to set the VideoBrush we're going to display the preview feed on - // IMPORTANT that it gets set before Camera initializes - //_previewVideo.SetSource(_reader.Camera); - - // The reader throws an event when a result is available - _reader.DecodingCompleted += (o, r) => DisplayResult(r); - - // The reader throws an event when the camera is initialized and ready to use - _reader.CameraInitialized += ReaderOnCameraInitialized; - } - } - - public Action ScanCallback { get; set; } - public MobileBarcodeScanningOptions ScanningOptions { get; set; } - public MobileBarcodeScannerBase Scanner { get; set; } - public UIElement CustomOverlay { get; set; } - public string TopText { get; set; } - public string BottomText { get; set; } - public bool UseCustomOverlay { get; set; } - public bool ContinuousScanning { get; set; } - - public Result LastScanResult { get; set; } - - //SimpleCameraReader _reader; - AudioVideoCaptureDeviceCameraReader _reader; - - public bool IsTorchOn - { - get { return _reader.FlashMode == FlashMode.On; } - } - - public void Torch(bool on) - { - _reader.FlashMode = on ? FlashMode.On : FlashMode.Off; - } - - public void ToggleTorch() - { - _reader.FlashMode = _reader.FlashMode == FlashMode.Off ? FlashMode.On : FlashMode.Off; - } - - public bool HasTorch - { - get - { - return _reader.HasTorch; - } - } - - public void AutoFocus() - { - _reader.Focus(); - } - - public void AutoFocus (int x = -1, int y = -1) - { - _reader.Focus(); - } - - public bool IsAnalyzing - { - get { - if (_reader != null) - return _reader.IsAnalyzing; - - return false; - } - } - - public void ResumeAnalysis () - { - if (_reader != null && !_reader.IsAnalyzing) - _reader.IsAnalyzing = false; - } - - public void PauseAnalysis () - { - if (_reader != null && _reader.IsAnalyzing) - _reader.IsAnalyzing = false; - } - - public void StopScanning() - { - if (UseCustomOverlay && CustomOverlay != null) - gridCustomOverlay.Children.Remove(CustomOverlay); - - BlackoutVideoBrush(); - - if (_reader != null) - { - _reader.Stop(); - _reader.CameraInitialized -= ReaderOnCameraInitialized; - _reader.DecodingCompleted -= (o, r) => DisplayResult(r); - _reader = null; - } - } - - private void BlackoutVideoBrush() - { - _previewVideo.SetSource(new MediaElement()); - } - - public void Cancel() - { - LastScanResult = null; - - StopScanning (); - - if (ScanCallback != null) - ScanCallback(null); - } - - private void ReaderOnCameraInitialized(object sender, bool initialized) - { - // We dispatch (invoke) to avoid access exceptions - Dispatcher.BeginInvoke(() => - { - // This must be called here - until now, _reader.Camera is null - _previewVideo.SetSource(_reader.Camera); - - if (_reader != null && _previewTransform != null) - _previewTransform.Rotation = _reader.CameraOrientation; - }); - - MobileBarcodeScanner.Log("ReaderOnCameraInitialized"); - - if (_reader != null) - { - // We can set if Camera should flash or not when focused - _reader.FlashMode = FlashMode.Off; - - // Starts the capturing process - _reader.Start(); - } - } - - private void DisplayResult(Result result) - { - if (!ContinuousScanning) - StopScanning (); - - if (ScanCallback != null) - ScanCallback(result); - } - - public void Dispose() - { - this.gridCustomOverlay.Children.Clear(); - - StopScanning (); - } - - protected override void OnTap(System.Windows.Input.GestureEventArgs e) - { - base.OnTap(e); - - if (_reader != null) - { - //var pos = e.GetPosition(this); - _reader.Focus(); - } - } - - private void buttonToggleFlash_Click(object sender, RoutedEventArgs e) - { - ToggleTorch(); - } - } -} diff --git a/Source/ZXing.Net.Mobile.WindowsPhone/packages.config b/Source/ZXing.Net.Mobile.WindowsPhone/packages.config deleted file mode 100644 index 8bb6466fa..000000000 --- a/Source/ZXing.Net.Mobile.WindowsPhone/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.WindowsRT/AssemblyInfo.cs b/Source/ZXing.Net.Mobile.WindowsRT/AssemblyInfo.cs deleted file mode 100644 index eca4a5753..000000000 --- a/Source/ZXing.Net.Mobile.WindowsRT/AssemblyInfo.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -// Information about this assembly is defined by the following attributes. -// Change them to the values specific to your project. - -[assembly: AssemblyTitle("ZXing.Net.Mobile.WindowsRT")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("redth")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". -// The form "{Major}.{Minor}.*" will automatically update the build and revision, -// and "{Major}.{Minor}.{Build}.*" will update just the revision. - -[assembly: AssemblyVersion("1.0.*")] - -// The following attributes are used to specify the signing key for the assembly, -// if desired. See the Mono documentation for more information about signing. - -//[assembly: AssemblyDelaySign(false)] -//[assembly: AssemblyKeyFile("")] - diff --git a/Source/ZXing.Net.Mobile.WindowsRT/NotSupported.cs b/Source/ZXing.Net.Mobile.WindowsRT/NotSupported.cs deleted file mode 100644 index 3344568f3..000000000 --- a/Source/ZXing.Net.Mobile.WindowsRT/NotSupported.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace ZXing.Net.Mobile -{ - public class NotSupported - { - // Windows Phone 8.1 Native and Windows 8 RT are not supported - - // Microsoft left out the ability to (easily) marshal Camera Preview frames to managed code - // Which is what ZXing.Net.Mobile needs to work - - // You should upgrade your wpa81 / win8 projects to use Windows Universal (UWP) instead! - } -} - -namespace ZXing.Mobile -{ - public class MobileBarcodeScanner : MobileBarcodeScannerBase - { - NotSupportedException ex = new NotSupportedException("Windows Phone 8.1 Native (wpa81) and Windows 8 Store (win8) are not supported, please use Windows Universal (UWP) instead!"); - - public override Task Scan(MobileBarcodeScanningOptions options) - { - throw ex; - } - - public override void ScanContinuously(MobileBarcodeScanningOptions options, Action scanHandler) - { - throw ex; - } - - public override void Cancel() - { - throw ex; - } - - public override void AutoFocus() - { - throw ex; - } - - public override void Torch(bool on) - { - throw ex; - } - - public override void ToggleTorch() - { - throw ex; - } - - public override void PauseAnalysis() - { - throw ex; - } - - public override void ResumeAnalysis() - { - throw ex; - } - - public override bool IsTorchOn - { - get - { - throw ex; - } - } - } - } - - diff --git a/Source/ZXing.Net.Mobile.WindowsRT/ZXing.Net.Mobile.WindowsRT.csproj b/Source/ZXing.Net.Mobile.WindowsRT/ZXing.Net.Mobile.WindowsRT.csproj deleted file mode 100644 index e264a24cc..000000000 --- a/Source/ZXing.Net.Mobile.WindowsRT/ZXing.Net.Mobile.WindowsRT.csproj +++ /dev/null @@ -1,65 +0,0 @@ - - - - - 12.0 - Debug - AnyCPU - {10EB06B2-7231-40DF-8930-7781C82B65DB} - Library - Properties - ZXing.Net.Mobile - ZXingNetMobile - en-US - 512 - {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Profile259 - v4.5 - - - true - full - false - ..\..\Build\Debug\wpa81\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\..\Build\Release\wpa81\ - TRACE - prompt - 4 - - - - - - - - {7528dd0a-1781-47f4-adbf-eeddb011f6bb} - ZXing.Net.Mobile.Core - - - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3} - zxing.portable - - - - - - - - - - - - \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.WindowsUniversal/AssemblyInfo.cs b/Source/ZXing.Net.Mobile.WindowsUniversal/AssemblyInfo.cs deleted file mode 100644 index 6e16f9dbe..000000000 --- a/Source/ZXing.Net.Mobile.WindowsUniversal/AssemblyInfo.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -// Information about this assembly is defined by the following attributes. -// Change them to the values specific to your project. - -[assembly: AssemblyTitle("ZXing.Net.Mobile.WindowsUniversal")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("redth")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". -// The form "{Major}.{Minor}.*" will automatically update the build and revision, -// and "{Major}.{Minor}.{Build}.*" will update just the revision. - -[assembly: AssemblyVersion("1.0.*")] - -// The following attributes are used to specify the signing key for the assembly, -// if desired. See the Mono documentation for more information about signing. - -//[assembly: AssemblyDelaySign(false)] -//[assembly: AssemblyKeyFile("")] - diff --git a/Source/ZXing.Net.Mobile.WindowsUniversal/BarcodeWriter.cs b/Source/ZXing.Net.Mobile.WindowsUniversal/BarcodeWriter.cs deleted file mode 100644 index d702011c0..000000000 --- a/Source/ZXing.Net.Mobile.WindowsUniversal/BarcodeWriter.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Windows.UI.Xaml.Media.Imaging; - -namespace ZXing.Mobile -{ - /// - /// A smart class to encode some content to a barcode image - /// - public class BarcodeWriter : BarcodeWriter, IBarcodeWriter - { - /// - /// Initializes a new instance of the class. - /// - public BarcodeWriter() - { - Renderer = new WriteableBitmapRenderer(); - } - } -} diff --git a/Source/ZXing.Net.Mobile.WindowsUniversal/MobileBarcodeScanner.cs b/Source/ZXing.Net.Mobile.WindowsUniversal/MobileBarcodeScanner.cs deleted file mode 100644 index 844e2969f..000000000 --- a/Source/ZXing.Net.Mobile.WindowsUniversal/MobileBarcodeScanner.cs +++ /dev/null @@ -1,142 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Windows.UI.Core; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; - -namespace ZXing.Mobile -{ - public class MobileBarcodeScanner : MobileBarcodeScannerBase - { - public MobileBarcodeScanner () : base () - { - //this.Dispatcher = Windows.Current.Dispatcher; - } - - public MobileBarcodeScanner(CoreDispatcher dispatcher) : base() - { - this.Dispatcher = dispatcher; - } - - internal ScanPage ScanPage { get; set; } - - public CoreDispatcher Dispatcher { get; set; } - - public Frame RootFrame { get; set; } - - public override async void ScanContinuously(MobileBarcodeScanningOptions options, Action scanHandler) - { - //Navigate: /ZxingSharp.WindowsPhone;component/Scan.xaml - var rootFrame = RootFrame ?? Window.Current.Content as Frame ?? ((FrameworkElement) Window.Current.Content).GetFirstChildOfType(); - var dispatcher = Dispatcher ?? Window.Current.Dispatcher; - - await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => - { - rootFrame.Navigate(typeof(ScanPage), new ScanPageNavigationParameters - { - Options = options, - ResultHandler = scanHandler, - Scanner = this, - ContinuousScanning = true - }); - }); - } - - public override async Task Scan(MobileBarcodeScanningOptions options) - { - var rootFrame = RootFrame ?? Window.Current.Content as Frame ?? ((FrameworkElement) Window.Current.Content).GetFirstChildOfType(); - var dispatcher = Dispatcher ?? Window.Current.Dispatcher; - - var tcsScanResult = new TaskCompletionSource(); - - await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => - { - var pageOptions = new ScanPageNavigationParameters - { - Options = options, - ResultHandler = r => - { - tcsScanResult.SetResult(r); - }, - Scanner = this, - ContinuousScanning = false, - CameraInitialized = () => { OnCameraInitialized?.Invoke(); }, - CameraError = (errors) => { OnCameraError?.Invoke(errors); } - }; - rootFrame.Navigate(typeof(ScanPage), pageOptions); - }); - - var result = await tcsScanResult.Task; - - await dispatcher.RunAsync(CoreDispatcherPriority.High, () => - { - if (rootFrame.CanGoBack) - rootFrame.GoBack(); - }); - - return result; - } - - public event ScannerOpened OnCameraInitialized; - public delegate void ScannerOpened(); - - public event ScannerError OnCameraError; - public delegate void ScannerError(IEnumerable errors); - - public override async void Cancel() - { - var rootFrame = RootFrame ?? Window.Current.Content as Frame ?? ((FrameworkElement)Window.Current.Content).GetFirstChildOfType(); - var dispatcher = Dispatcher ?? Window.Current.Dispatcher; - - ScanPage?.Cancel(); - - await dispatcher.RunAsync(CoreDispatcherPriority.High, () => - { - if (rootFrame.CanGoBack) - rootFrame.GoBack(); - }); - } - - public override void Torch(bool on) - { - ScanPage?.Torch(on); - } - - public override void ToggleTorch() - { - ScanPage?.ToggleTorch(); - } - - public override bool IsTorchOn - { - get { return ScanPage?.IsTorchOn ?? false; } - } - - public override void AutoFocus() - { - ScanPage?.AutoFocus(); - } - - public override void PauseAnalysis() - { - ScanPage?.PauseAnalysis(); - } - - public override void ResumeAnalysis() - { - ScanPage?.ResumeAnalysis(); - } - - public UIElement CustomOverlay - { - get; - set; - } - - internal static void Log(string message, params object[] args) - { - System.Diagnostics.Debug.WriteLine(message, args); - } - } -} diff --git a/Source/ZXing.Net.Mobile.WindowsUniversal/Properties/ZXing.Net.Mobile.Universal.rd.xml b/Source/ZXing.Net.Mobile.WindowsUniversal/Properties/ZXing.Net.Mobile.Universal.rd.xml deleted file mode 100644 index 9bae42ab3..000000000 --- a/Source/ZXing.Net.Mobile.WindowsUniversal/Properties/ZXing.Net.Mobile.Universal.rd.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - diff --git a/Source/ZXing.Net.Mobile.WindowsUniversal/ScanPage.xaml.cs b/Source/ZXing.Net.Mobile.WindowsUniversal/ScanPage.xaml.cs deleted file mode 100644 index 88f8c7206..000000000 --- a/Source/ZXing.Net.Mobile.WindowsUniversal/ScanPage.xaml.cs +++ /dev/null @@ -1,205 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; -using System.Threading.Tasks; -using Windows.Foundation; -using Windows.Foundation.Collections; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Controls.Primitives; -using Windows.UI.Xaml.Data; -using Windows.UI.Xaml.Input; -using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Navigation; -using ZXing.Mobile; - -// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238 - -namespace ZXing.Mobile -{ - /// - /// An empty page that can be used on its own or navigated to within a Frame. - /// - public sealed partial class ScanPage : Page, IMobileBarcodeScanner - { - ScanPageNavigationParameters Parameters { get; set; } - - public ScanPage() - { - InitializeComponent(); - } - - protected override void OnNavigatedTo(NavigationEventArgs e) - { - base.OnNavigatedTo(e); - - // If no parameters were passed, we navigated here for some other reason - // so let's ignore it - if (e.Parameter == null) - return; - - Parameters = e.Parameter as ScanPageNavigationParameters; - scannerControl.OnCameraInitialized += ScannerControl_OnCameraInitialized; - scannerControl.OnScannerError += ScannerControl_OnScannerError; - - if (Parameters != null) - Parameters.Scanner.ScanPage = this; - - scannerControl.TopText = Parameters?.Scanner?.TopText ?? ""; - scannerControl.BottomText = Parameters?.Scanner?.BottomText ?? ""; - - scannerControl.CustomOverlay = Parameters?.Scanner?.CustomOverlay; - scannerControl.UseCustomOverlay = Parameters?.Scanner?.UseCustomOverlay ?? false; - - scannerControl.ScanningOptions = Parameters?.Options ?? new MobileBarcodeScanningOptions (); - scannerControl.ContinuousScanning = Parameters?.ContinuousScanning ?? false; - - scannerControl.StartScanning(Parameters?.ResultHandler, Parameters?.Options); - } - - private void ScannerControl_OnCameraInitialized() - { - Parameters.CameraInitialized?.Invoke(); - } - - private void ScannerControl_OnScannerError(IEnumerable errors) - { - Parameters.CameraError?.Invoke(errors); - } - - - - - protected override async void OnNavigatingFrom(NavigatingCancelEventArgs e) - { - try - { - MobileBarcodeScanner.Log("OnNavigatingFrom, stopping camera..."); - await scannerControl.StopScanningAsync(); - } - catch (Exception ex) - { - MobileBarcodeScanner.Log("OnNavigatingFrom Error: {0}", ex); - } - - base.OnNavigatingFrom(e); - } - - #region IMobileBarcodeScanner Implementation - public bool UseCustomOverlay - { - get { return scannerControl.UseCustomOverlay; } - } - - public string TopText - { - get { return scannerControl.TopText; } - set { scannerControl.TopText = value; } - } - - public string BottomText - { - get { return scannerControl.BottomText; } - set { scannerControl.BottomText = value; } - } - - public string CancelButtonText - { - get { return ""; } - set { } - } - - public string FlashButtonText - { - get { return ""; } - set { } - } - - public string CameraUnsupportedMessage - { - get { return ""; } - set { } - } - - public bool IsTorchOn - { - get { return scannerControl.IsTorchOn; } - } - - public Task Scan(MobileBarcodeScanningOptions options) - { - var tcsResult = new TaskCompletionSource(); - - scannerControl.ContinuousScanning = false; - scannerControl.StartScanning(r => - { - scannerControl.StopScanning(); - - tcsResult.SetResult(r); - }, options ?? Parameters?.Options); - - return tcsResult.Task; - } - - public Task Scan() - { - return Scan(new MobileBarcodeScanningOptions()); - } - - public void ScanContinuously(MobileBarcodeScanningOptions options, Action scanHandler) - { - scannerControl.ContinuousScanning = true; - scannerControl.StartScanning(scanHandler, options ?? Parameters?.Options); - } - - public void ScanContinuously(Action scanHandler) - { - ScanContinuously(new MobileBarcodeScanningOptions(), scanHandler); - } - - public void Cancel() - { - scannerControl?.Cancel(); - } - - public void Torch(bool on) - { - scannerControl?.Torch(on); - } - - public void AutoFocus() - { - scannerControl?.AutoFocus(); - } - - public void ToggleTorch() - { - scannerControl?.ToggleTorch(); - } - - public void PauseAnalysis() - { - scannerControl?.PauseAnalysis(); - } - - public void ResumeAnalysis() - { - scannerControl?.ResumeAnalysis(); - } - - #endregion - } - - public class ScanPageNavigationParameters - { - public MobileBarcodeScanner Scanner { get; set; } - public bool ContinuousScanning { get; set; } - public MobileBarcodeScanningOptions Options { get; set; } - public Action ResultHandler { get; set; } - - public Action CameraInitialized { get; set; } - public Action> CameraError { get; set; } - } -} diff --git a/Source/ZXing.Net.Mobile.WindowsUniversal/SoftwareBitmapLuminanceSource.cs b/Source/ZXing.Net.Mobile.WindowsUniversal/SoftwareBitmapLuminanceSource.cs deleted file mode 100644 index c1673348d..000000000 --- a/Source/ZXing.Net.Mobile.WindowsUniversal/SoftwareBitmapLuminanceSource.cs +++ /dev/null @@ -1,97 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; -using Windows.Graphics.Imaging; - -namespace ZXing.Mobile -{ - [ComImport] - [Guid("5b0d3235-4dba-4d44-865e-8f1d0e4fd04d")] - [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - unsafe interface IMemoryBufferByteAccess - { - void GetBuffer(out byte* buffer, out uint capacity); - } - - - public class SoftwareBitmapLuminanceSource : BaseLuminanceSource - { - public SoftwareBitmapLuminanceSource (SoftwareBitmap softwareBitmap) : base (softwareBitmap.PixelWidth, softwareBitmap.PixelHeight) - { - CalculateLuminance(softwareBitmap); - } - - protected SoftwareBitmapLuminanceSource(int width, int height) : base(width, height) - { - } - - protected SoftwareBitmapLuminanceSource(byte[] luminanceArray, int width, int height) : base(luminanceArray, width, height) - { - } - - protected override LuminanceSource CreateLuminanceSource(byte[] newLuminances, int width, int height) - { - return new SoftwareBitmapLuminanceSource(width, height) { luminances = newLuminances }; - } - - private unsafe void CalculateLuminance(SoftwareBitmap bitmap) - { - // Effect is hard-coded to operate on BGRA8 format only - if (bitmap.BitmapPixelFormat == BitmapPixelFormat.Bgra8) - { - // In BGRA8 format, each pixel is defined by 4 bytes - const int BYTES_PER_PIXEL = 4; - - using (var buffer = bitmap.LockBuffer(BitmapBufferAccessMode.Read)) - using (var reference = buffer.CreateReference()) - { - - if (reference is IMemoryBufferByteAccess) - { - - - try - { - // Get a pointer to the pixel buffer - byte* data; - uint capacity; - ((IMemoryBufferByteAccess)reference).GetBuffer(out data, out capacity); - - // Get information about the BitmapBuffer - var desc = buffer.GetPlaneDescription(0); - var luminanceIndex = 0; - - // Iterate over all pixels - for (uint row = 0; row < desc.Height; row++) - { - for (uint col = 0; col < desc.Width; col++) - { - // Index of the current pixel in the buffer (defined by the next 4 bytes, BGRA8) - var currPixel = desc.StartIndex + desc.Stride * row + BYTES_PER_PIXEL * col; - - // Read the current pixel information into b,g,r channels (leave out alpha channel) - var b = data[currPixel + 0]; // Blue - var g = data[currPixel + 1]; // Green - var r = data[currPixel + 2]; // Red - - var luminance = (byte)((RChannelWeight * r + GChannelWeight * g + BChannelWeight * b) >> ChannelWeight); - var alpha = data[currPixel + 3]; - luminance = (byte)(((luminance * alpha) >> 8) + (255 * (255 - alpha) >> 8)); - luminances[luminanceIndex] = luminance; - luminanceIndex++; - } - } - } - catch (Exception ex) - { - System.Diagnostics.Debug.WriteLine("Luminance Source Failed: {0}", ex); - } - } - } - } - } - } -} diff --git a/Source/ZXing.Net.Mobile.WindowsUniversal/VisualTreeHelperExt.cs b/Source/ZXing.Net.Mobile.WindowsUniversal/VisualTreeHelperExt.cs deleted file mode 100644 index 0a63cc7a7..000000000 --- a/Source/ZXing.Net.Mobile.WindowsUniversal/VisualTreeHelperExt.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Collections.Generic; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Media; - -namespace ZXing.Mobile -{ - public static class VisualTreeHelperExt - { - // The method traverses the visual tree lazily, layer by layer - // and returns the objects of the desired type - public static T GetFirstChildOfType (this DependencyObject start) where T : class - { - var queue = new Queue(); - queue.Enqueue(start); - - while (queue.Count > 0) - { - var item = queue.Dequeue(); - - var realItem = item as T; - if (realItem != null) - { - return realItem; - } - - var count = VisualTreeHelper.GetChildrenCount(item); - for (var i = 0; i < count; i++) - { - queue.Enqueue(VisualTreeHelper.GetChild(item, i)); - } - } - return null; - } - } -} diff --git a/Source/ZXing.Net.Mobile.WindowsUniversal/WriteableBitmapRenderer.cs b/Source/ZXing.Net.Mobile.WindowsUniversal/WriteableBitmapRenderer.cs deleted file mode 100644 index 694037859..000000000 --- a/Source/ZXing.Net.Mobile.WindowsUniversal/WriteableBitmapRenderer.cs +++ /dev/null @@ -1,273 +0,0 @@ -/* - * Copyright 2012 ZXing.Net authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -using System; -using System.Windows; -#if NETFX_CORE -using Windows.UI; -using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Media.Imaging; -#else -using System.Windows.Media; -using System.Windows.Media.Imaging; -#endif - -using ZXing; -using ZXing.Common; -using ZXing.OneD; -using ZXing.Rendering; - -namespace ZXing.Mobile -{ - /// - /// Renders a to a - /// - public class WriteableBitmapRenderer : IBarcodeRenderer - { - /// - /// Gets or sets the foreground color. - /// - /// - /// The foreground color. - /// - public Color Foreground { get; set; } - /// - /// Gets or sets the background color. - /// - /// - /// The background color. - /// - public Color Background { get; set; } - /// - /// Gets or sets the font family. - /// - /// - /// The font family. - /// - public FontFamily FontFamily { get; set; } - /// - /// Gets or sets the size of the font. - /// - /// - /// The size of the font. - /// - public double FontSize { get; set; } - -#if !NETFX_CORE - /// - /// Gets or sets the font stretch. - /// - /// - /// The font stretch. - /// - public FontStretch FontStretch { get; set; } - /// - /// Gets or sets the font style. - /// - /// - /// The font style. - /// - public FontStyle FontStyle { get; set; } - /// - /// Gets or sets the font weight. - /// - /// - /// The font weight. - /// - public FontWeight FontWeight { get; set; } -#endif - - private static readonly FontFamily DefaultFontFamily = new FontFamily("Arial"); - - /// - /// Initializes a new instance of the class. - /// - public WriteableBitmapRenderer() - { - Foreground = Colors.Black; - Background = Colors.White; - FontFamily = DefaultFontFamily; - FontSize = 10.0; -#if !NETFX_CORE - FontStretch = FontStretches.Normal; - FontStyle = FontStyles.Normal; - FontWeight = FontWeights.Normal; -#endif - } - - /// - /// Renders the specified matrix. - /// - /// The matrix. - /// The format. - /// The content. - /// - public WriteableBitmap Render(BitMatrix matrix, BarcodeFormat format, string content) - { - return Render(matrix, format, content, null); - } - - /// - /// Renders the specified matrix. - /// - /// The matrix. - /// The format. - /// The content. - /// The options. - /// - virtual public WriteableBitmap Render(BitMatrix matrix, BarcodeFormat format, string content, EncodingOptions options) - { - int width = matrix.Width; - int height = matrix.Height; - bool outputContent = (options == null || !options.PureBarcode) && - !String.IsNullOrEmpty(content) && (format == BarcodeFormat.CODE_39 || - format == BarcodeFormat.CODE_128 || - format == BarcodeFormat.EAN_13 || - format == BarcodeFormat.EAN_8 || - format == BarcodeFormat.CODABAR || - format == BarcodeFormat.ITF || - format == BarcodeFormat.UPC_A || - format == BarcodeFormat.MSI || - format == BarcodeFormat.PLESSEY); - int emptyArea = outputContent ? 16 : 0; - int pixelsize = 1; - - if (options != null) - { - if (options.Width > width) - { - width = options.Width; - } - if (options.Height > height) - { - height = options.Height; - } - // calculating the scaling factor - pixelsize = width / matrix.Width; - if (pixelsize > height / matrix.Height) - { - pixelsize = height / matrix.Height; - } - } - -#if NETFX_CORE - var foreground = new byte[] { Foreground.B, Foreground.G, Foreground.R, Foreground.A }; - var background = new byte[] { Background.B, Background.G, Background.R, Background.A }; - var bmp = new WriteableBitmap(width, height); - var length = width * height; - - // Copy data back - using (var stream = System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeBufferExtensions.AsStream(bmp.PixelBuffer)) - { - for (int y = 0; y < matrix.Height - emptyArea; y++) - { - for (var pixelsizeHeight = 0; pixelsizeHeight < pixelsize; pixelsizeHeight++) - { - for (var x = 0; x < matrix.Width; x++) - { - var color = matrix[x, y] ? foreground : background; - for (var pixelsizeWidth = 0; pixelsizeWidth < pixelsize; pixelsizeWidth++) - { - stream.Write(color, 0, 4); - } - } - for (var x = pixelsize * matrix.Width; x < width; x++) - { - stream.Write(background, 0, 4); - } - } - } - for (int y = matrix.Height * pixelsize - emptyArea; y < height; y++) - { - for (var x = 0; x < width; x++) - { - stream.Write(background, 0, 4); - } - } - } - bmp.Invalidate(); -#else - int foreground = Foreground.A << 24 | Foreground.R << 16 | Foreground.G << 8 | Foreground.B; - int background = Background.A << 24 | Background.R << 16 | Background.G << 8 | Background.B; -#if WPF - var bmp = new WriteableBitmap(width, height, 100.0, 100.0, PixelFormats.Bgra32, null); - var pixels = new int[width*height]; -#else - var bmp = new WriteableBitmap(width, height); - var pixels = bmp.Pixels; -#endif - var index = 0; - - for (int y = 0; y < matrix.Height - emptyArea; y++) - { - for (var pixelsizeHeight = 0; pixelsizeHeight < pixelsize; pixelsizeHeight++) - { - for (var x = 0; x < matrix.Width; x++) - { - var color = matrix[x, y] ? foreground : background; - for (var pixelsizeWidth = 0; pixelsizeWidth < pixelsize; pixelsizeWidth++) - { - pixels[index++] = color; - } - } - for (var x = pixelsize * matrix.Width; x < width; x++) - { - pixels[index++] = background; - } - } - } - for (int y = matrix.Height * pixelsize - emptyArea; y < height; y++) - { - for (var x = 0; x < width; x++) - { - pixels[index++] = background; - } - } -#if WPF - bmp.WritePixels(new Int32Rect(0, 0, width, height), pixels, bmp.BackBufferStride, 0); -#else - bmp.Invalidate(); -#endif -#endif - - /* doesn't correctly work at the moment - * renders at the wrong position - if (outputContent) - { - switch (format) - { - case BarcodeFormat.EAN_8: - if (content.Length < 8) - content = OneDimensionalCodeWriter.CalculateChecksumDigitModulo10(content); - content = content.Insert(4, " "); - break; - case BarcodeFormat.EAN_13: - if (content.Length < 13) - content = OneDimensionalCodeWriter.CalculateChecksumDigitModulo10(content); - content = content.Insert(7, " "); - content = content.Insert(1, " "); - break; - } - var txt1 = new TextBlock {Text = content, FontSize = 10, Foreground = new SolidColorBrush(Colors.Black)}; - bmp.Render(txt1, new RotateTransform { Angle = 0, CenterX = width / 2, CenterY = height - 14}); - bmp.Invalidate(); - } - * */ - - return bmp; - } - } -} diff --git a/Source/ZXing.Net.Mobile.WindowsUniversal/ZXingScannerControl.xaml b/Source/ZXing.Net.Mobile.WindowsUniversal/ZXingScannerControl.xaml deleted file mode 100644 index 490d896a9..000000000 --- a/Source/ZXing.Net.Mobile.WindowsUniversal/ZXingScannerControl.xaml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/ZXing.Net.Mobile.WindowsUniversal/ZXingScannerControl.xaml.cs b/Source/ZXing.Net.Mobile.WindowsUniversal/ZXingScannerControl.xaml.cs deleted file mode 100644 index 007e099e5..000000000 --- a/Source/ZXing.Net.Mobile.WindowsUniversal/ZXingScannerControl.xaml.cs +++ /dev/null @@ -1,823 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; -using System.Threading; -using System.Threading.Tasks; -using Windows.Devices.Enumeration; -using Windows.Foundation; -using Windows.Foundation.Collections; -using Windows.Graphics.Display; -using Windows.Media; -using Windows.Media.Capture; -using Windows.Media.Devices; -using Windows.Media.MediaProperties; -using Windows.System.Display; -using Windows.UI.Core; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -using Windows.UI.Xaml.Controls.Primitives; -using Windows.UI.Xaml.Data; -using Windows.UI.Xaml.Input; -using Windows.UI.Xaml.Media; -using Windows.UI.Xaml.Navigation; -using ZXing.Mobile; - -// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236 - -namespace ZXing.Mobile -{ - public sealed partial class ZXingScannerControl : UserControl, IScannerView, IScannerSessionHost, IDisposable - { - public ZXingScannerControl() - { - this.InitializeComponent(); - - displayOrientation = displayInformation.CurrentOrientation; - displayInformation.OrientationChanged += displayInformation_OrientationChanged; - } - public event ScannerOpened OnCameraInitialized; - public delegate void ScannerOpened(); - - public event ScannerError OnScannerError; - public delegate void ScannerError(IEnumerable errors); - async void displayInformation_OrientationChanged(DisplayInformation sender, object args) - { - //This safeguards against a null reference if the device is rotated *before* the first call to StartScanning - if (mediaCapture == null) return; - - displayOrientation = sender.CurrentOrientation; - var props = mediaCapture.VideoDeviceController.GetMediaStreamProperties(MediaStreamType.VideoPreview); - await SetPreviewRotationAsync(props); - } - - // Receive notifications about rotation of the UI and apply any necessary rotation to the preview stream - readonly DisplayInformation displayInformation = DisplayInformation.GetForCurrentView(); - DisplayOrientations displayOrientation = DisplayOrientations.Portrait; - VideoFrame videoFrame; - - // Information about the camera device. - bool mirroringPreview = false; - bool externalCamera = false; - - // Rotation metadata to apply to the preview stream (MF_MT_VIDEO_ROTATION) - // Reference: http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh868174.aspx - static readonly Guid RotationKey = new Guid("C380465D-2271-428C-9B83-ECEA3B4A85C1"); - - // Prevent the screen from sleeping while the camera is running - readonly DisplayRequest displayRequest = new DisplayRequest(); - - // For listening to media property changes - readonly SystemMediaTransportControls _systemMediaControls = SystemMediaTransportControls.GetForCurrentView(); - - - public async void StartScanning (Action scanCallback, MobileBarcodeScanningOptions options = null) - { - await StartScanningAsync(scanCallback, options); - } - - public async void StopScanning () - { - await StopScanningAsync(); - } - - public void PauseAnalysis () - { - isAnalyzing = false; - } - - public void ResumeAnalysis () - { - - isAnalyzing = true; - } - - public bool IsAnalyzing - { - get { return isAnalyzing; } - } - - public async Task StartScanningAsync(Action scanCallback, MobileBarcodeScanningOptions options = null) - { - if (stopping) - { - var error = "Camera is closing"; - OnScannerError?.Invoke(new[] { error }); - return; - } - - - displayRequest.RequestActive(); - - isAnalyzing = true; - ScanCallback = scanCallback; - ScanningOptions = options ?? MobileBarcodeScanningOptions.Default; - - topText.Text = TopText ?? string.Empty; - bottomText.Text = BottomText ?? string.Empty; - - if (UseCustomOverlay) - { - gridCustomOverlay.Children.Clear(); - if (CustomOverlay != null) - gridCustomOverlay.Children.Add(CustomOverlay); - - gridCustomOverlay.Visibility = Visibility.Visible; - gridDefaultOverlay.Visibility = Visibility.Collapsed; - } - else - { - gridCustomOverlay.Visibility = Visibility.Collapsed; - gridDefaultOverlay.Visibility = Visibility.Visible; - } - - // Find which device to use - var preferredCamera = await GetFilteredCameraOrDefaultAsync(ScanningOptions); - if (preferredCamera == null) - { - var error = "No camera available"; - System.Diagnostics.Debug.WriteLine(error); - isMediaCaptureInitialized = false; - OnScannerError?.Invoke(new[] { error }); - return; - } - - if (preferredCamera.EnclosureLocation == null || preferredCamera.EnclosureLocation.Panel == Windows.Devices.Enumeration.Panel.Unknown) - { - // No information on the location of the camera, assume it's an external camera, not integrated on the device. - externalCamera = true; - } - else - { - // Camera is fixed on the device. - externalCamera = false; - - // Only mirror the preview if the camera is on the front panel. - mirroringPreview = preferredCamera.EnclosureLocation.Panel == Windows.Devices.Enumeration.Panel.Front; - } - - mediaCapture = new MediaCapture(); - - // Initialize the capture with the settings above - try - { - await mediaCapture.InitializeAsync(new MediaCaptureInitializationSettings - { - StreamingCaptureMode = StreamingCaptureMode.Video, - VideoDeviceId = preferredCamera.Id - }); - isMediaCaptureInitialized = true; - } - catch (UnauthorizedAccessException) - { - System.Diagnostics.Debug.WriteLine("Denied access to the camera"); - } - catch (Exception ex) - { - System.Diagnostics.Debug.WriteLine("Exception when init MediaCapture: {0}", ex); - } - - if (!isMediaCaptureInitialized) - { - var error = "Unexpected error on Camera initialisation"; - OnScannerError?.Invoke(new[] { error }); - return; - } - - - // Set the capture element's source to show it in the UI - captureElement.Source = mediaCapture; - captureElement.FlowDirection = mirroringPreview ? FlowDirection.RightToLeft : FlowDirection.LeftToRight; - - // Start the preview - await mediaCapture.StartPreviewAsync(); - - if(mediaCapture.CameraStreamState == CameraStreamState.Streaming) - { - OnCameraInitialized?.Invoke(); - } - - // Get all the available resolutions for preview - var availableProperties = mediaCapture.VideoDeviceController.GetAvailableMediaStreamProperties(MediaStreamType.VideoPreview); - var availableResolutions = new List(); - foreach (var ap in availableProperties) - { - var vp = (VideoEncodingProperties)ap; - System.Diagnostics.Debug.WriteLine("Camera Preview Resolution: {0}x{1}", vp.Width, vp.Height); - availableResolutions.Add(new CameraResolution { Width = (int)vp.Width, Height = (int)vp.Height }); - } - CameraResolution previewResolution = null; - if (ScanningOptions.CameraResolutionSelector != null) - previewResolution = ScanningOptions.CameraResolutionSelector(availableResolutions); - - if(availableResolutions == null || availableResolutions.Count < 1) - { - var error = "Camera is busy. Try to close all applications that use camera."; - OnScannerError?.Invoke(new[] { error }); - return; - } - - // If the user did not specify a resolution, let's try and find a suitable one - if (previewResolution == null) - { - // Loop through all supported sizes - foreach (var sps in availableResolutions) - { - // Find one that's >= 640x360 but <= 1000x1000 - // This will likely pick the *smallest* size in that range, which should be fine - if (sps.Width >= 640 && sps.Width <= 1000 && sps.Height >= 360 && sps.Height <= 1000) - { - previewResolution = new CameraResolution - { - Width = sps.Width, - Height = sps.Height - }; - break; - } - } - } - - if (previewResolution == null) - previewResolution = availableResolutions.LastOrDefault(); - - if (previewResolution == null) - { - System.Diagnostics.Debug.WriteLine("No preview resolution available. Camera may be in use by another application."); - return; - } - - MobileBarcodeScanner.Log("Using Preview Resolution: {0}x{1}", previewResolution.Width, previewResolution.Height); - - // Find the matching property based on the selection, again - var chosenProp = availableProperties.FirstOrDefault(ap => ((VideoEncodingProperties)ap).Width == previewResolution.Width && ((VideoEncodingProperties)ap).Height == previewResolution.Height); - - // Pass in the requested preview size properties - // so we can set them at the same time as the preview rotation - // to save an additional set property call - await SetPreviewRotationAsync(chosenProp); - - // *after* the preview is setup, set this so that the UI layout happens - // otherwise the preview gets stuck in a funny place on screen - captureElement.Stretch = Stretch.UniformToFill; - - await SetupAutoFocus(); - - var zxing = ScanningOptions.BuildBarcodeReader(); - - timerPreview = new Timer(async (state) => { - - var delay = ScanningOptions.DelayBetweenAnalyzingFrames; - - if (stopping || processing || !isAnalyzing - || (mediaCapture == null || mediaCapture.CameraStreamState != Windows.Media.Devices.CameraStreamState.Streaming)) - { - timerPreview.Change(delay, Timeout.Infinite); - return; - } - - processing = true; - - SoftwareBitmapLuminanceSource luminanceSource = null; - - try - { - // Get preview - var frame = await mediaCapture.GetPreviewFrameAsync(videoFrame); - - // Create our luminance source - luminanceSource = new SoftwareBitmapLuminanceSource(frame.SoftwareBitmap); - - } catch (Exception ex) - { - MobileBarcodeScanner.Log ("GetPreviewFrame Failed: {0}", ex); - } - - ZXing.Result result = null; - - try - { - // Try decoding the image - if (luminanceSource != null) - result = zxing.Decode(luminanceSource); - } - catch (Exception ex) - { - MobileBarcodeScanner.Log("Warning: zxing.Decode Failed: {0}", ex); - } - - // Check if a result was found - if (result != null && !string.IsNullOrEmpty (result.Text)) - { - if (!ContinuousScanning) - { - delay = Timeout.Infinite; - await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async () => { await StopScanningAsync(); }); - } - else - { - delay = ScanningOptions.DelayBetweenContinuousScans; - } - - LastScanResult = result; - ScanCallback(result); - } - - processing = false; - - timerPreview.Change(delay, Timeout.Infinite); - - }, null, ScanningOptions.InitialDelayBeforeAnalyzingFrames, Timeout.Infinite); - } - - async Task GetFilteredCameraOrDefaultAsync(MobileBarcodeScanningOptions options) - { - var videoCaptureDevices = await DeviceInformation.FindAllAsync(DeviceClass.VideoCapture); - - var useFront = options.UseFrontCameraIfAvailable.HasValue && options.UseFrontCameraIfAvailable.Value; - - var selectedCamera = videoCaptureDevices.FirstOrDefault(vcd => vcd.EnclosureLocation != null - && ((!useFront && vcd.EnclosureLocation.Panel == Windows.Devices.Enumeration.Panel.Back) - || (useFront && vcd.EnclosureLocation.Panel == Windows.Devices.Enumeration.Panel.Front))); - - - // we fall back to the first camera that we can find. - if (selectedCamera == null) - { - var whichCamera = useFront ? "front" : "back"; - System.Diagnostics.Debug.WriteLine("Finding " + whichCamera + " camera failed, opening first available camera"); - selectedCamera = videoCaptureDevices.FirstOrDefault(); - } - - return selectedCamera; - } - - protected override void OnPointerPressed(PointerRoutedEventArgs e) - { - System.Diagnostics.Debug.WriteLine("AutoFocus requested"); - base.OnPointerPressed(e); - var pt = e.GetCurrentPoint(captureElement); - new Task(() => { AutoFocusAsync((int)pt.Position.X, (int)pt.Position.Y, true); }); - } - - Timer timerPreview; - MediaCapture mediaCapture; - - bool stopping = false; - bool isMediaCaptureInitialized = false; - - volatile bool processing = false; - volatile bool isAnalyzing = false; - - public Action ScanCallback { get; set; } - public MobileBarcodeScanningOptions ScanningOptions { get; set; } - public MobileBarcodeScannerBase Scanner { get; set; } - public UIElement CustomOverlay { get; set; } - public string TopText { get; set; } - public string BottomText { get; set; } - public bool UseCustomOverlay { get; set; } - public bool ContinuousScanning { get; set; } - - public Result LastScanResult { get; set; } - - - public bool IsTorchOn - { - get - { - return HasTorch && mediaCapture.VideoDeviceController.TorchControl.Enabled; - } - } - - public bool IsFocusSupported - { - get - { - return mediaCapture != null - && isMediaCaptureInitialized - && mediaCapture.VideoDeviceController != null - && mediaCapture.VideoDeviceController.FocusControl != null - && mediaCapture.VideoDeviceController.FocusControl.Supported; - } - } - - private async Task SetupAutoFocus() - { - if (IsFocusSupported) - { - var focusControl = mediaCapture.VideoDeviceController.FocusControl; - - var focusSettings = new FocusSettings(); - - if (ScanningOptions.DisableAutofocus) - { - focusSettings.Mode = FocusMode.Manual; - focusSettings.Distance = ManualFocusDistance.Nearest; - focusControl.Configure(focusSettings); - return; - } - - focusSettings.AutoFocusRange = focusControl.SupportedFocusRanges.Contains(AutoFocusRange.FullRange) - ? AutoFocusRange.FullRange - : focusControl.SupportedFocusRanges.FirstOrDefault(); - - var supportedFocusModes = focusControl.SupportedFocusModes; - if (supportedFocusModes.Contains(FocusMode.Continuous)) - { - focusSettings.Mode = FocusMode.Continuous; - } - else if (supportedFocusModes.Contains(FocusMode.Auto)) - { - focusSettings.Mode = FocusMode.Auto; - } - - if (focusSettings.Mode == FocusMode.Continuous || focusSettings.Mode == FocusMode.Auto) - { - focusSettings.WaitForFocus = false; - focusControl.Configure(focusSettings); - await focusControl.FocusAsync(); - } - } - } - - public void Torch(bool on) - { - if (HasTorch) - mediaCapture.VideoDeviceController.TorchControl.Enabled = on; - } - - public void ToggleTorch() - { - if (HasTorch) - Torch(!IsTorchOn); - } - - public bool HasTorch - { - get - { - return mediaCapture != null - && mediaCapture.VideoDeviceController != null - && mediaCapture.VideoDeviceController.TorchControl != null - && mediaCapture.VideoDeviceController.TorchControl.Supported; - } - } - - public async void AutoFocus () - { - await AutoFocusAsync(0, 0, false); - } - - public async void AutoFocus (int x, int y) - { - await AutoFocusAsync(x, y, true); - } - - public async Task AutoFocusAsync(int x, int y, bool useCoordinates) - { - if (ScanningOptions.DisableAutofocus) - return; - - if (IsFocusSupported && mediaCapture?.CameraStreamState == CameraStreamState.Streaming) - { - var focusControl = mediaCapture.VideoDeviceController.FocusControl; - var roiControl = mediaCapture.VideoDeviceController.RegionsOfInterestControl; - try - { - if (roiControl.AutoFocusSupported && roiControl.MaxRegions > 0) - { - if (useCoordinates) - { - var props = mediaCapture.VideoDeviceController.GetMediaStreamProperties(MediaStreamType.VideoPreview); - - var previewEncodingProperties = GetPreviewResolution(props); - var previewRect = GetPreviewStreamRectInControl(previewEncodingProperties, captureElement); - var focusPreview = ConvertUiTapToPreviewRect(new Point(x, y), new Size(20, 20), previewRect); - var regionOfInterest = new RegionOfInterest - { - AutoFocusEnabled = true, - BoundsNormalized = true, - Bounds = focusPreview, - Type = RegionOfInterestType.Unknown, - Weight = 100 - }; - await roiControl.SetRegionsAsync(new[] { regionOfInterest }, true); - - var focusRange = focusControl.SupportedFocusRanges.Contains(AutoFocusRange.FullRange) - ? AutoFocusRange.FullRange - : focusControl.SupportedFocusRanges.FirstOrDefault(); - - var focusMode = focusControl.SupportedFocusModes.Contains(FocusMode.Single) - ? FocusMode.Single - : focusControl.SupportedFocusModes.FirstOrDefault(); - - var settings = new FocusSettings - { - Mode = focusMode, - AutoFocusRange = focusRange, - }; - - focusControl.Configure(settings); - } - else - { - // If no region provided, clear any regions and reset focus - await roiControl.ClearRegionsAsync(); - } - } - - await focusControl.FocusAsync(); - } - catch (Exception ex) - { - System.Diagnostics.Debug.WriteLine("AutoFocusAsync Error: {0}", ex); - } - } - } - - public async Task StopScanningAsync() - { - if (stopping) - return; - - stopping = true; - isAnalyzing = false; - - displayRequest.RequestRelease(); - - try - { - if (IsTorchOn) - Torch(false); - if (isMediaCaptureInitialized) - await mediaCapture.StopPreviewAsync(); - if (UseCustomOverlay && CustomOverlay != null) - gridCustomOverlay.Children.Remove(CustomOverlay); - } - catch { } - finally { - //second execution from sample will crash if the object is not properly disposed (always on mobile, sometimes on desktop) - if (mediaCapture != null) - mediaCapture.Dispose(); - } - - //this solves a crash occuring when the user rotates the screen after the QR scanning is closed - displayInformation.OrientationChanged -= displayInformation_OrientationChanged; - - if (timerPreview != null) - timerPreview.Change(Timeout.Infinite, Timeout.Infinite); - stopping = false; - } - - public async Task Cancel() - { - LastScanResult = null; - - await StopScanningAsync(); - - ScanCallback?.Invoke(null); - } - - public async void Dispose() - { - await StopScanningAsync(); - gridCustomOverlay?.Children?.Clear(); - } - - protected override void OnTapped(TappedRoutedEventArgs e) - { - base.OnTapped(e); - - //TODO: Focus - } - //protected override void OnTap(System.Windows.Input.GestureEventArgs e) - //{ - // base.OnTap(e); - - // if (_reader != null) - // { - // //var pos = e.GetPosition(this); - // _reader.Focus(); - // } - //} - - private void buttonToggleFlash_Click(object sender, RoutedEventArgs e) - { - ToggleTorch(); - } - - /// - /// Gets the current orientation of the UI in relation to the device and applies a corrective rotation to the preview - /// - private async Task SetPreviewRotationAsync(IMediaEncodingProperties props) - { - // Only need to update the orientation if the camera is mounted on the device. - if (mediaCapture == null) - return; - - // Calculate which way and how far to rotate the preview. - int rotationDegrees; - VideoRotation sourceRotation; - CalculatePreviewRotation(out sourceRotation, out rotationDegrees); - - // Set preview rotation in the preview source. - mediaCapture.SetPreviewRotation(sourceRotation); - - // Add rotation metadata to the preview stream to make sure the aspect ratio / dimensions match when rendering and getting preview frames - //var props = mediaCapture.VideoDeviceController.GetMediaStreamProperties(MediaStreamType.VideoPreview); - props.Properties.Add(RotationKey, rotationDegrees); - await mediaCapture.VideoDeviceController.SetMediaStreamPropertiesAsync(MediaStreamType.VideoPreview, props); - - var currentPreviewResolution = GetPreviewResolution(props); - // Setup a frame to use as the input settings - videoFrame = new VideoFrame(Windows.Graphics.Imaging.BitmapPixelFormat.Bgra8, (int)currentPreviewResolution.Width, (int)currentPreviewResolution.Height); - } - - private Size GetPreviewResolution(IMediaEncodingProperties props) - { - // Get our preview properties - var previewProperties = props as VideoEncodingProperties; - if (previewProperties != null) - { - var streamWidth = previewProperties.Width; - var streamHeight = previewProperties.Height; - - // For portrait orientations, the width and height need to be swapped - if (displayOrientation == DisplayOrientations.Portrait || displayOrientation == DisplayOrientations.PortraitFlipped) - { - streamWidth = previewProperties.Height; - streamHeight = previewProperties.Width; - } - - return new Size(streamWidth, streamHeight); - } - - return default(Size); - } - - /// - /// Reads the current orientation of the app and calculates the VideoRotation necessary to ensure the preview is rendered in the correct orientation. - /// - /// The rotation value to use in MediaCapture.SetPreviewRotation. - /// The accompanying rotation metadata with which to tag the preview stream. - private void CalculatePreviewRotation(out VideoRotation sourceRotation, out int rotationDegrees) - { - // Note that in some cases, the rotation direction needs to be inverted if the preview is being mirrored. - switch (displayInformation.CurrentOrientation) - { - case DisplayOrientations.Portrait: - if (mirroringPreview) - { - rotationDegrees = 270; - sourceRotation = VideoRotation.Clockwise270Degrees; - } - else - { - rotationDegrees = 90; - sourceRotation = VideoRotation.Clockwise90Degrees; - } - break; - - case DisplayOrientations.LandscapeFlipped: - // No need to invert this rotation, as rotating 180 degrees is the same either way. - rotationDegrees = 180; - sourceRotation = VideoRotation.Clockwise180Degrees; - break; - - case DisplayOrientations.PortraitFlipped: - if (mirroringPreview) - { - rotationDegrees = 90; - sourceRotation = VideoRotation.Clockwise90Degrees; - } - else - { - rotationDegrees = 270; - sourceRotation = VideoRotation.Clockwise270Degrees; - } - break; - - case DisplayOrientations.Landscape: - default: - rotationDegrees = 0; - sourceRotation = VideoRotation.None; - break; - } - } - - /// - /// Applies the necessary rotation to a tap on a CaptureElement (with Stretch mode set to Uniform) to account for device orientation - /// - /// The location, in UI coordinates, of the user tap - /// The size, in UI coordinates, of the desired focus rectangle - /// The area within the CaptureElement that is actively showing the preview, and is not part of the letterboxed area - /// A Rect that can be passed to the MediaCapture Focus and RegionsOfInterest APIs, with normalized bounds in the orientation of the native stream - private Rect ConvertUiTapToPreviewRect(Point tap, Size size, Rect previewRect) - { - // Adjust for the resulting focus rectangle to be centered around the position - double left = tap.X - size.Width / 2, top = tap.Y - size.Height / 2; - - // Get the information about the active preview area within the CaptureElement (in case it's letterboxed) - double previewWidth = previewRect.Width, previewHeight = previewRect.Height; - double previewLeft = previewRect.Left, previewTop = previewRect.Top; - - // Transform the left and top of the tap to account for rotation - switch (displayOrientation) - { - case DisplayOrientations.Portrait: - var tempLeft = left; - - left = top; - top = previewRect.Width - tempLeft; - break; - case DisplayOrientations.LandscapeFlipped: - left = previewRect.Width - left; - top = previewRect.Height - top; - break; - case DisplayOrientations.PortraitFlipped: - var tempTop = top; - - top = left; - left = previewRect.Width - tempTop; - break; - } - - // For portrait orientations, the information about the active preview area needs to be rotated - if (displayOrientation == DisplayOrientations.Portrait || displayOrientation == DisplayOrientations.PortraitFlipped) - { - previewWidth = previewRect.Height; - previewHeight = previewRect.Width; - previewLeft = previewRect.Top; - previewTop = previewRect.Left; - } - - // Normalize width and height of the focus rectangle - var width = size.Width / previewWidth; - var height = size.Height / previewHeight; - - // Shift rect left and top to be relative to just the active preview area - left -= previewLeft; - top -= previewTop; - - // Normalize left and top - left /= previewWidth; - top /= previewHeight; - - // Ensure rectangle is fully contained within the active preview area horizontally - left = Math.Max(left, 0); - left = Math.Min(1 - width, left); - - // Ensure rectangle is fully contained within the active preview area vertically - top = Math.Max(top, 0); - top = Math.Min(1 - height, top); - - // Create and return resulting rectangle - return new Rect(left, top, width, height); - } - - /// - /// Calculates the size and location of the rectangle that contains the preview stream within the preview control, when the scaling mode is Uniform - /// - /// The resolution at which the preview is running - /// The control that is displaying the preview using Uniform as the scaling mode - /// - private static Rect GetPreviewStreamRectInControl(Size previewResolution, CaptureElement previewControl) - { - var result = new Rect(); - - // In case this function is called before everything is initialized correctly, return an empty result - if (previewControl == null || previewControl.ActualHeight < 1 || previewControl.ActualWidth < 1 || - previewResolution.Height < 1 || previewResolution.Width < 1) - { - return result; - } - - var streamWidth = previewResolution.Width; - var streamHeight = previewResolution.Height; - - // Start by assuming the preview display area in the control spans the entire width and height both (this is corrected in the next if for the necessary dimension) - result.Width = previewControl.ActualWidth; - result.Height = previewControl.ActualHeight; - - // If UI is "wider" than preview, letterboxing will be on the sides - if ((previewControl.ActualWidth / previewControl.ActualHeight > streamWidth / (double)streamHeight)) - { - var scale = previewControl.ActualHeight / streamHeight; - var scaledWidth = streamWidth * scale; - - result.X = (previewControl.ActualWidth - scaledWidth) / 2.0; - result.Width = scaledWidth; - } - else // Preview stream is "wider" than UI, so letterboxing will be on the top+bottom - { - var scale = previewControl.ActualWidth / streamWidth; - var scaledHeight = streamHeight * scale; - - result.Y = (previewControl.ActualHeight - scaledHeight) / 2.0; - result.Height = scaledHeight; - } - - return result; - } - } -} diff --git a/Source/ZXing.Net.Mobile.WindowsUniversal/project.json b/Source/ZXing.Net.Mobile.WindowsUniversal/project.json deleted file mode 100644 index e7fd3aeca..000000000 --- a/Source/ZXing.Net.Mobile.WindowsUniversal/project.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "dependencies": { - "Microsoft.NETCore.UniversalWindowsPlatform": "6.0.1" - }, - "frameworks": { - "uap10.0": {} - }, - "runtimes": { - "win10-arm": {}, - "win10-arm-aot": {}, - "win10-x86": {}, - "win10-x86-aot": {}, - "win10-x64": {}, - "win10-x64-aot": {} - } -} \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.iOS/AVCaptureScannerView.cs b/Source/ZXing.Net.Mobile.iOS/AVCaptureScannerView.cs deleted file mode 100644 index 970f6b05e..000000000 --- a/Source/ZXing.Net.Mobile.iOS/AVCaptureScannerView.cs +++ /dev/null @@ -1,775 +0,0 @@ -using System; -using System.Linq; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -using Foundation; -using AVFoundation; -using CoreFoundation; -using CoreGraphics; -using CoreMedia; -using CoreVideo; -using ObjCRuntime; -using UIKit; - -using ZXing.Common; -using ZXing.Mobile; - -namespace ZXing.Mobile -{ - public class AVCaptureScannerView : UIView, IZXingScanner, IScannerSessionHost - { - public AVCaptureScannerView() - { - } - - public AVCaptureScannerView(IntPtr handle) : base(handle) - { - } - - public AVCaptureScannerView (CGRect frame) : base(frame) - { - } - - AVCaptureSession session; - AVCaptureVideoPreviewLayer previewLayer; - //AVCaptureVideoDataOutput output; - //OutputRecorder outputRecorder; - //DispatchQueue queue; - Action resultCallback; - volatile bool stopped = true; - - volatile bool foundResult = false; - CaptureDelegate captureDelegate; - - UIView layerView; - UIView overlayView = null; - - public event Action OnCancelButtonPressed; - - public string CancelButtonText { get;set; } - public string FlashButtonText { get;set; } - - public MobileBarcodeScanningOptions ScanningOptions { get; set; } - - void Setup() - { - if (overlayView != null) - overlayView.RemoveFromSuperview (); - - if (UseCustomOverlayView && CustomOverlayView != null) - overlayView = CustomOverlayView; - else { - overlayView = new ZXingDefaultOverlayView (new CGRect (0, 0, this.Frame.Width, this.Frame.Height), - TopText, BottomText, CancelButtonText, FlashButtonText, - () => { - var evt = OnCancelButtonPressed; - if (evt != null) - evt(); - }, ToggleTorch); - } - - if (overlayView != null) - { - /* UITapGestureRecognizer tapGestureRecognizer = new UITapGestureRecognizer (); - - tapGestureRecognizer.AddTarget (() => { - - var pt = tapGestureRecognizer.LocationInView(overlayView); - - Focus(pt); - - Console.WriteLine("OVERLAY TOUCH: " + pt.X + ", " + pt.Y); - - }); - tapGestureRecognizer.CancelsTouchesInView = false; - tapGestureRecognizer.NumberOfTapsRequired = 1; - tapGestureRecognizer.NumberOfTouchesRequired = 1; - - overlayView.AddGestureRecognizer (tapGestureRecognizer);*/ - - overlayView.Frame = new CGRect(0, 0, this.Frame.Width, this.Frame.Height); - overlayView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; - - - } - } - - - bool torch = false; - bool analyzing = true; - DateTime lastAnalysis = DateTime.UtcNow.AddYears (-99); - bool wasScanned = false; - bool working = false; - - - bool SetupCaptureSession () - { - var availableResolutions = new List (); - - var consideredResolutions = new Dictionary { - { AVCaptureSession.Preset352x288, new CameraResolution { Width = 352, Height = 288 } }, - { AVCaptureSession.PresetMedium, new CameraResolution { Width = 480, Height = 360 } }, //480x360 - { AVCaptureSession.Preset640x480, new CameraResolution { Width = 640, Height = 480 } }, - { AVCaptureSession.Preset1280x720, new CameraResolution { Width = 1280, Height = 720 } }, - { AVCaptureSession.Preset1920x1080, new CameraResolution { Width = 1920, Height = 1080 } } - }; - - // configure the capture session for low resolution, change this if your code - // can cope with more data or volume - session = new AVCaptureSession () { - SessionPreset = AVCaptureSession.Preset640x480 - }; - - // create a device input and attach it to the session -// var captureDevice = AVCaptureDevice.DefaultDeviceWithMediaType (AVMediaType.Video); - AVCaptureDevice captureDevice = null; - var devices = AVCaptureDevice.DevicesWithMediaType(AVMediaType.Video); - foreach (var device in devices) - { - captureDevice = device; - if (ScanningOptions.UseFrontCameraIfAvailable.HasValue && - ScanningOptions.UseFrontCameraIfAvailable.Value && - device.Position == AVCaptureDevicePosition.Front) - - break; //Front camera successfully set - else if (device.Position == AVCaptureDevicePosition.Back && (!ScanningOptions.UseFrontCameraIfAvailable.HasValue || !ScanningOptions.UseFrontCameraIfAvailable.Value)) - break; //Back camera succesfully set - } - if (captureDevice == null){ - Console.WriteLine ("No captureDevice - this won't work on the simulator, try a physical device"); - if (overlayView != null) - { - this.AddSubview (overlayView); - this.BringSubviewToFront (overlayView); - } - return false; - } - - CameraResolution resolution = null; - - // Find resolution - // Go through the resolutions we can even consider - foreach (var cr in consideredResolutions) { - // Now check to make sure our selected device supports the resolution - // so we can add it to the list to pick from - if (captureDevice.SupportsAVCaptureSessionPreset (cr.Key)) - availableResolutions.Add (cr.Value); - } - - resolution = ScanningOptions.GetResolution (availableResolutions); - - // See if the user selected a resolution - if (resolution != null) { - // Now get the preset string from the resolution chosen - var preset = (from c in consideredResolutions - where c.Value.Width == resolution.Width - && c.Value.Height == resolution.Height - select c.Key).FirstOrDefault (); - - // If we found a matching preset, let's set it on the session - if (!string.IsNullOrEmpty(preset)) - session.SessionPreset = preset; - } - - var input = AVCaptureDeviceInput.FromDevice (captureDevice); - if (input == null){ - Console.WriteLine ("No input - this won't work on the simulator, try a physical device"); - if (overlayView != null) - { - this.AddSubview (overlayView); - this.BringSubviewToFront (overlayView); - } - return false; - } - else - session.AddInput (input); - - - foundResult = false; - //Detect barcodes with built in avcapture stuff - AVCaptureMetadataOutput metadataOutput = new AVCaptureMetadataOutput(); - - captureDelegate = new CaptureDelegate (metaDataObjects => - { - if (!analyzing) - return; - - //Console.WriteLine("Found MetaData Objects"); - - var msSinceLastPreview = (DateTime.UtcNow - lastAnalysis).TotalMilliseconds; - - if (msSinceLastPreview < ScanningOptions.DelayBetweenAnalyzingFrames - || (wasScanned && msSinceLastPreview < ScanningOptions.DelayBetweenContinuousScans) - || working) - //|| CancelTokenSource.IsCancellationRequested) - { - return; - } - - try { - working = true; - wasScanned = false; - lastAnalysis = DateTime.UtcNow; - - var mdo = metaDataObjects.FirstOrDefault(); - - var readableObj = mdo as AVMetadataMachineReadableCodeObject; - - if (readableObj == null) - return; - - wasScanned = true; - - var zxingFormat = ZXingBarcodeFormatFromAVCaptureBarcodeFormat(readableObj.Type.ToString()); - - var rs = new ZXing.Result(readableObj.StringValue, null, null, zxingFormat); - - resultCallback(rs); - } finally { - working = false; - } - }); - - metadataOutput.SetDelegate (captureDelegate, DispatchQueue.MainQueue); - session.AddOutput (metadataOutput); - - //Setup barcode formats - if (ScanningOptions.PossibleFormats != null && ScanningOptions.PossibleFormats.Count > 0) - { - #if __UNIFIED__ - var formats = AVMetadataObjectType.None; - - foreach (var f in ScanningOptions.PossibleFormats) - formats |= AVCaptureBarcodeFormatFromZXingBarcodeFormat (f); - - formats &= ~AVMetadataObjectType.None; - - metadataOutput.MetadataObjectTypes = formats; - #else - var formats = new List (); - - foreach (var f in ScanningOptions.PossibleFormats) - formats.AddRange (AVCaptureBarcodeFormatFromZXingBarcodeFormat (f)); - - metadataOutput.MetadataObjectTypes = (from f in formats.Distinct () select new NSString(f)).ToArray(); - #endif - } - else - metadataOutput.MetadataObjectTypes = metadataOutput.AvailableMetadataObjectTypes; - - - - - - previewLayer = new AVCaptureVideoPreviewLayer(session); - - // //Framerate set here (15 fps) - // if (previewLayer.RespondsToSelector(new Selector("connection"))) - // { - // if (UIDevice.CurrentDevice.CheckSystemVersion (7, 0)) - // { - // var perf1 = PerformanceCounter.Start (); - - // NSError lockForConfigErr = null; - - // captureDevice.LockForConfiguration (out lockForConfigErr); - // if (lockForConfigErr == null) - // { - // captureDevice.ActiveVideoMinFrameDuration = new CMTime (1, 10); - // captureDevice.UnlockForConfiguration (); - // } - - // PerformanceCounter.Stop (perf1, "PERF: ActiveVideoMinFrameDuration Took {0} ms"); - // } - // else - // previewLayer.Connection.VideoMinFrameDuration = new CMTime(1, 10); - // } - - #if __UNIFIED__ - previewLayer.VideoGravity = AVLayerVideoGravity.ResizeAspectFill; - #else - previewLayer.LayerVideoGravity = AVLayerVideoGravity.ResizeAspectFill; - #endif - previewLayer.Frame = new CGRect(0, 0, this.Frame.Width, this.Frame.Height); - previewLayer.Position = new CGPoint(this.Layer.Bounds.Width / 2, (this.Layer.Bounds.Height / 2)); - - layerView = new UIView(new CGRect(0, 0, this.Frame.Width, this.Frame.Height)); - layerView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; - layerView.Layer.AddSublayer(previewLayer); - - this.AddSubview(layerView); - - ResizePreview(UIApplication.SharedApplication.StatusBarOrientation); - - if (overlayView != null) - { - this.AddSubview (overlayView); - this.BringSubviewToFront (overlayView); - - //overlayView.LayoutSubviews (); - } - - session.StartRunning (); - - Console.WriteLine ("RUNNING!!!"); - - - - //output.AlwaysDiscardsLateVideoFrames = true; - - - Console.WriteLine("SetupCamera Finished"); - - //session.AddOutput (output); - //session.StartRunning (); - - - if (captureDevice.IsFocusModeSupported(AVCaptureFocusMode.ContinuousAutoFocus)) - { - NSError err = null; - if (captureDevice.LockForConfiguration(out err)) - { - if (captureDevice.IsFocusModeSupported(AVCaptureFocusMode.ContinuousAutoFocus)) - captureDevice.FocusMode = AVCaptureFocusMode.ContinuousAutoFocus; - else if (captureDevice.IsFocusModeSupported(AVCaptureFocusMode.AutoFocus)) - captureDevice.FocusMode = AVCaptureFocusMode.AutoFocus; - - if (captureDevice.IsExposureModeSupported (AVCaptureExposureMode.ContinuousAutoExposure)) - captureDevice.ExposureMode = AVCaptureExposureMode.ContinuousAutoExposure; - else if (captureDevice.IsExposureModeSupported(AVCaptureExposureMode.AutoExpose)) - captureDevice.ExposureMode = AVCaptureExposureMode.AutoExpose; - - if (captureDevice.IsWhiteBalanceModeSupported (AVCaptureWhiteBalanceMode.ContinuousAutoWhiteBalance)) - captureDevice.WhiteBalanceMode = AVCaptureWhiteBalanceMode.ContinuousAutoWhiteBalance; - else if (captureDevice.IsWhiteBalanceModeSupported (AVCaptureWhiteBalanceMode.AutoWhiteBalance)) - captureDevice.WhiteBalanceMode = AVCaptureWhiteBalanceMode.AutoWhiteBalance; - - if (UIDevice.CurrentDevice.CheckSystemVersion (7, 0) && captureDevice.AutoFocusRangeRestrictionSupported) - captureDevice.AutoFocusRangeRestriction = AVCaptureAutoFocusRangeRestriction.Near; - - if (captureDevice.FocusPointOfInterestSupported) - captureDevice.FocusPointOfInterest = new CGPoint(0.5f, 0.5f); - - if (captureDevice.ExposurePointOfInterestSupported) - captureDevice.ExposurePointOfInterest = new CGPoint (0.5f, 0.5f); - - captureDevice.UnlockForConfiguration(); - } - else - Console.WriteLine("Failed to Lock for Config: " + err.Description); - } - - return true; - } - - public void DidRotate(UIInterfaceOrientation orientation) - { - ResizePreview (orientation); - - this.LayoutSubviews (); - - // if (overlayView != null) - // overlayView.LayoutSubviews (); - } - - public void ResizePreview (UIInterfaceOrientation orientation) - { - if (previewLayer == null) - return; - - previewLayer.Frame = new CGRect(0, 0, this.Frame.Width, this.Frame.Height); - - if (previewLayer.RespondsToSelector (new Selector ("connection")) && previewLayer.Connection != null) - { - switch (orientation) - { - case UIInterfaceOrientation.LandscapeLeft: - previewLayer.Connection.VideoOrientation = AVCaptureVideoOrientation.LandscapeLeft; - break; - case UIInterfaceOrientation.LandscapeRight: - previewLayer.Connection.VideoOrientation = AVCaptureVideoOrientation.LandscapeRight; - break; - case UIInterfaceOrientation.Portrait: - previewLayer.Connection.VideoOrientation = AVCaptureVideoOrientation.Portrait; - break; - case UIInterfaceOrientation.PortraitUpsideDown: - previewLayer.Connection.VideoOrientation = AVCaptureVideoOrientation.PortraitUpsideDown; - break; - } - } - } - - public void Focus(CGPoint pointOfInterest) - { - //Get the device - if (AVMediaType.Video == null) - return; - - var device = AVCaptureDevice.DefaultDeviceWithMediaType(AVMediaType.Video); - - if (device == null) - return; - - //See if it supports focusing on a point - if (device.FocusPointOfInterestSupported && !device.AdjustingFocus) - { - NSError err = null; - - //Lock device to config - if (device.LockForConfiguration(out err)) - { - Console.WriteLine("Focusing at point: " + pointOfInterest.X + ", " + pointOfInterest.Y); - - //Focus at the point touched - device.FocusPointOfInterest = pointOfInterest; - device.FocusMode = AVCaptureFocusMode.ContinuousAutoFocus; - device.UnlockForConfiguration(); - } - } - } - - - - #region IZXingScanner implementation - public void StartScanning (Action scanResultHandler, MobileBarcodeScanningOptions options = null) - { - if (!analyzing) - analyzing = true; - - if (!stopped) - return; - - Setup (); - - this.ScanningOptions = options; - this.resultCallback = scanResultHandler; - - Console.WriteLine("StartScanning"); - - this.InvokeOnMainThread(() => { - if (!SetupCaptureSession()) - { - //Setup 'simulated' view: - Console.WriteLine("Capture Session FAILED"); - - } - - if (Runtime.Arch == Arch.SIMULATOR) - { - var simView = new UIView(new CGRect(0, 0, this.Frame.Width, this.Frame.Height)); - simView.BackgroundColor = UIColor.LightGray; - simView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; - this.InsertSubview(simView, 0); - - } - }); - - stopped = false; - } - - - public void StopScanning() - { - if (stopped) - return; - - Console.WriteLine("Stopping..."); - - //Try removing all existing outputs prior to closing the session - try - { - while (session.Outputs.Length > 0) - session.RemoveOutput (session.Outputs [0]); - } - catch { } - - //Try to remove all existing inputs prior to closing the session - try - { - while (session.Inputs.Length > 0) - session.RemoveInput (session.Inputs [0]); - } - catch { } - - if (session.Running) - session.StopRunning(); - - stopped = true; - } - - public void PauseAnalysis () - { - analyzing = false; - } - - public void ResumeAnalysis () - { - analyzing = true; - } - - public void Torch (bool on) - { - try - { - NSError err; - - var device = AVCaptureDevice.DefaultDeviceWithMediaType(AVMediaType.Video); - if (device.HasFlash || device.HasTorch) { - device.LockForConfiguration(out err); - - if (on) - { - if (device.HasTorch) - device.TorchMode = AVCaptureTorchMode.On; - if (device.HasFlash) - device.FlashMode = AVCaptureFlashMode.On; - } - else - { - if (device.HasTorch) - device.TorchMode = AVCaptureTorchMode.Off; - if (device.HasFlash) - device.FlashMode = AVCaptureFlashMode.Off; - } - - device.UnlockForConfiguration(); - } - device = null; - - torch = on; - } - catch { } - } - - public void ToggleTorch() - { - Torch(!IsTorchOn); - } - - public void AutoFocus () - { - //Doesn't do much on iOS :( - } - - public void AutoFocus (int x, int y) - { - //Doesn't do much on iOS :( - } - - public string TopText { get;set; } - public string BottomText { get;set; } - - - public UIView CustomOverlayView { get; set; } - public bool UseCustomOverlayView { get; set; } - public bool IsAnalyzing { get { return analyzing; } } - public bool IsTorchOn { get { return torch; } } - - bool? hasTorch = null; - public bool HasTorch { - get { - if (hasTorch.HasValue) - return hasTorch.Value; - - var device = AVCaptureDevice.DefaultDeviceWithMediaType(AVMediaType.Video); - hasTorch = device.HasFlash || device.HasTorch; - return hasTorch.Value; - } - } - #endregion - - public static bool SupportsAllRequestedBarcodeFormats(IEnumerable formats) - { - var supported = new List () { - BarcodeFormat.AZTEC, BarcodeFormat.CODE_128, BarcodeFormat.CODE_39, - BarcodeFormat.CODE_93, BarcodeFormat.EAN_13, BarcodeFormat.EAN_8, - BarcodeFormat.PDF_417, BarcodeFormat.QR_CODE, BarcodeFormat.UPC_E, - BarcodeFormat.DATA_MATRIX, BarcodeFormat.ITF, - BarcodeFormat.All_1D - }; - - return !formats.Any (f => !supported.Contains (f)); - } - - BarcodeFormat ZXingBarcodeFormatFromAVCaptureBarcodeFormat(string avMetadataObjectType) - { - switch(avMetadataObjectType) - { - case "AztecCode": - return BarcodeFormat.AZTEC; - case "Code128Code": - return BarcodeFormat.CODE_128; - case "Code39Code": - return BarcodeFormat.CODE_39; - case "Code39Mod43Code": - return BarcodeFormat.CODE_39; - case "Code93Code": - return BarcodeFormat.CODE_93; - case "EAN13Code": - return BarcodeFormat.EAN_13; - case "EAN8Code": - return BarcodeFormat.EAN_8; - case "PDF417Code": - return BarcodeFormat.PDF_417; - case "QRCode": - return BarcodeFormat.QR_CODE; - case "UPCECode": - return BarcodeFormat.UPC_E; - case "DataMatrixCode": - return BarcodeFormat.DATA_MATRIX; - case "Interleaved2of5Code": - return BarcodeFormat.ITF; - default: - return BarcodeFormat.QR_CODE; - } - } - - #if __UNIFIED__ - AVMetadataObjectType AVCaptureBarcodeFormatFromZXingBarcodeFormat(BarcodeFormat zxingBarcodeFormat) - { - AVMetadataObjectType formats = AVMetadataObjectType.None; - - switch (zxingBarcodeFormat) - { - case BarcodeFormat.AZTEC: - formats |= AVMetadataObjectType.AztecCode; - break; - case BarcodeFormat.CODE_128: - formats |= AVMetadataObjectType.Code128Code; - break; - case BarcodeFormat.CODE_39: - formats |= AVMetadataObjectType.Code39Code; - formats |= AVMetadataObjectType.Code39Mod43Code; - break; - case BarcodeFormat.CODE_93: - formats |= AVMetadataObjectType.Code93Code; - break; - case BarcodeFormat.EAN_13: - formats |= AVMetadataObjectType.EAN13Code; - break; - case BarcodeFormat.EAN_8: - formats |= AVMetadataObjectType.EAN8Code; - break; - case BarcodeFormat.PDF_417: - formats |= AVMetadataObjectType.PDF417Code; - break; - case BarcodeFormat.QR_CODE: - formats |= AVMetadataObjectType.QRCode; - break; - case BarcodeFormat.UPC_E: - formats |= AVMetadataObjectType.UPCECode; - break; - case BarcodeFormat.All_1D: - formats |= AVMetadataObjectType.UPCECode; - formats |= AVMetadataObjectType.EAN13Code; - formats |= AVMetadataObjectType.EAN8Code; - formats |= AVMetadataObjectType.Code39Code; - formats |= AVMetadataObjectType.Code39Mod43Code; - formats |= AVMetadataObjectType.Code93Code; - break; - case BarcodeFormat.DATA_MATRIX: - formats |= AVMetadataObjectType.DataMatrixCode; - break; - case BarcodeFormat.ITF: - formats |= AVMetadataObjectType.ITF14Code; - break; - case BarcodeFormat.CODABAR: - case BarcodeFormat.MAXICODE: - case BarcodeFormat.MSI: - case BarcodeFormat.PLESSEY: - case BarcodeFormat.RSS_14: - case BarcodeFormat.RSS_EXPANDED: - case BarcodeFormat.UPC_A: - //TODO: Throw exception? - break; - } - - return formats; - } - #else - string[] AVCaptureBarcodeFormatFromZXingBarcodeFormat(BarcodeFormat zxingBarcodeFormat) - { - List formats = new List (); - - switch (zxingBarcodeFormat) - { - case BarcodeFormat.AZTEC: - formats.Add (AVMetadataObject.TypeAztecCode); - break; - case BarcodeFormat.CODE_128: - formats.Add (AVMetadataObject.TypeCode128Code); - break; - case BarcodeFormat.CODE_39: - formats.Add (AVMetadataObject.TypeCode39Code); - formats.Add (AVMetadataObject.TypeCode39Mod43Code); - break; - case BarcodeFormat.CODE_93: - formats.Add (AVMetadataObject.TypeCode93Code); - break; - case BarcodeFormat.EAN_13: - formats.Add (AVMetadataObject.TypeEAN13Code); - break; - case BarcodeFormat.EAN_8: - formats.Add (AVMetadataObject.TypeEAN8Code); - break; - case BarcodeFormat.PDF_417: - formats.Add (AVMetadataObject.TypePDF417Code); - break; - case BarcodeFormat.QR_CODE: - formats.Add (AVMetadataObject.TypeQRCode); - break; - case BarcodeFormat.UPC_E: - formats.Add (AVMetadataObject.TypeUPCECode); - break; - case BarcodeFormat.All_1D: - formats.Add (AVMetadataObject.TypeUPCECode); - formats.Add (AVMetadataObject.TypeEAN13Code); - formats.Add (AVMetadataObject.TypeEAN8Code); - formats.Add (AVMetadataObject.TypeCode39Code); - formats.Add (AVMetadataObject.TypeCode39Mod43Code); - formats.Add (AVMetadataObject.TypeCode93Code); - break; - case BarcodeFormat.DATA_MATRIX: - formats.Add (AVMetadataObject.TypeDataMatrixCode); - break; - case BarcodeFormat.ITF: - formats.Add (AVMetadataObject.TypeITF14Code); - break; - case BarcodeFormat.CODABAR: - case BarcodeFormat.MAXICODE: - case BarcodeFormat.MSI: - case BarcodeFormat.PLESSEY: - case BarcodeFormat.RSS_14: - case BarcodeFormat.RSS_EXPANDED: - case BarcodeFormat.UPC_A: - //TODO: Throw exception? - break; - } - - return formats.ToArray(); - } - #endif - } - - - - - class CaptureDelegate : AVCaptureMetadataOutputObjectsDelegate - { - public CaptureDelegate (Action> onCapture) - { - OnCapture = onCapture; - } - - public Action> OnCapture { get;set; } - - public override void DidOutputMetadataObjects (AVCaptureMetadataOutput captureOutput, AVMetadataObject[] metadataObjects, AVCaptureConnection connection) - { - if (OnCapture != null && metadataObjects != null) - OnCapture (metadataObjects); - } - } -} - diff --git a/Source/ZXing.Net.Mobile.iOS/AVCaptureScannerViewController.cs b/Source/ZXing.Net.Mobile.iOS/AVCaptureScannerViewController.cs deleted file mode 100644 index 452a2764d..000000000 --- a/Source/ZXing.Net.Mobile.iOS/AVCaptureScannerViewController.cs +++ /dev/null @@ -1,203 +0,0 @@ -using System; -using System.Drawing; -using System.Text; -using System.Collections.Generic; - -using UIKit; -using Foundation; -using AVFoundation; -using CoreGraphics; - -using ZXing; - -namespace ZXing.Mobile -{ - public class AVCaptureScannerViewController : UIViewController, IScannerViewController - { - AVCaptureScannerView scannerView; - - public event Action OnScannedResult; - - public MobileBarcodeScanningOptions ScanningOptions { get;set; } - public MobileBarcodeScanner Scanner { get;set; } - public bool ContinuousScanning { get;set; } - - UIActivityIndicatorView loadingView; - UIView loadingBg; - - public AVCaptureScannerViewController(MobileBarcodeScanningOptions options, MobileBarcodeScanner scanner) - { - this.ScanningOptions = options; - this.Scanner = scanner; - - var appFrame = UIScreen.MainScreen.ApplicationFrame; - - View.Frame = new CGRect(0, 0, appFrame.Width, appFrame.Height); - View.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; - } - - public UIViewController AsViewController() - { - return this; - } - - public void Cancel() - { - this.InvokeOnMainThread(() => scannerView.StopScanning()); - } - - UIStatusBarStyle originalStatusBarStyle = UIStatusBarStyle.Default; - - public override void ViewDidLoad () - { - loadingBg = new UIView (this.View.Frame) { - BackgroundColor = UIColor.Black, - AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight - }; - loadingView = new UIActivityIndicatorView (UIActivityIndicatorViewStyle.WhiteLarge) { - AutoresizingMask = UIViewAutoresizing.FlexibleMargins - }; - loadingView.Frame = new CGRect ((this.View.Frame.Width - loadingView.Frame.Width) / 2, - (this.View.Frame.Height - loadingView.Frame.Height) / 2, - loadingView.Frame.Width, - loadingView.Frame.Height); - - loadingBg.AddSubview (loadingView); - View.AddSubview (loadingBg); - loadingView.StartAnimating (); - - scannerView = new AVCaptureScannerView(new CGRect(0, 0, this.View.Frame.Width, this.View.Frame.Height)); - scannerView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; - scannerView.UseCustomOverlayView = this.Scanner.UseCustomOverlay; - scannerView.CustomOverlayView = this.Scanner.CustomOverlay; - scannerView.TopText = this.Scanner.TopText; - scannerView.BottomText = this.Scanner.BottomText; - scannerView.CancelButtonText = this.Scanner.CancelButtonText; - scannerView.FlashButtonText = this.Scanner.FlashButtonText; - scannerView.OnCancelButtonPressed += () => { - Scanner.Cancel (); - }; - - this.View.AddSubview(scannerView); - this.View.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; - } - - public void Torch(bool on) - { - if (scannerView != null) - scannerView.Torch (on); - } - - public void ToggleTorch() - { - if (scannerView != null) - scannerView.ToggleTorch (); - } - - public bool IsTorchOn - { - get { return scannerView.IsTorchOn; } - } - - public void PauseAnalysis () - { - scannerView.PauseAnalysis (); - } - - public void ResumeAnalysis () - { - scannerView.ResumeAnalysis (); - } - - public override void ViewDidAppear (bool animated) - { - originalStatusBarStyle = UIApplication.SharedApplication.StatusBarStyle; - - if (UIDevice.CurrentDevice.CheckSystemVersion (7, 0)) - { - UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.Default; - SetNeedsStatusBarAppearanceUpdate (); - } - else - UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.BlackTranslucent, false); - - Console.WriteLine("Starting to scan..."); - - scannerView.StartScanning(result => { - - if (!ContinuousScanning) { - Console.WriteLine("Stopping scan..."); - scannerView.StopScanning(); - } - - var evt = this.OnScannedResult; - if (evt != null) - evt(result); - }, ScanningOptions); - } - - public override void ViewDidDisappear (bool animated) - { - if (scannerView != null) - scannerView.StopScanning(); - } - - public override void ViewWillDisappear(bool animated) - { - UIApplication.SharedApplication.SetStatusBarStyle(originalStatusBarStyle, false); - - //if (scannerView != null) - // scannerView.StopScanning(); - - //scannerView.RemoveFromSuperview(); - //scannerView.Dispose(); - //scannerView = null; - } - - public override void DidRotate (UIInterfaceOrientation fromInterfaceOrientation) - { - if (scannerView != null) - scannerView.DidRotate (this.InterfaceOrientation); - - //overlayView.LayoutSubviews(); - } - public override bool ShouldAutorotate () - { - if (ScanningOptions.AutoRotate != null) - { - return (bool)ScanningOptions.AutoRotate; - } - return false; - } - - public override UIInterfaceOrientationMask GetSupportedInterfaceOrientations () - { - return UIInterfaceOrientationMask.All; - } - - void HandleOnScannerSetupComplete () - { - BeginInvokeOnMainThread (() => - { - if (loadingView != null && loadingBg != null && loadingView.IsAnimating) - { - loadingView.StopAnimating (); - - UIView.BeginAnimations("zoomout"); - - UIView.SetAnimationDuration(2.0f); - UIView.SetAnimationCurve(UIViewAnimationCurve.EaseOut); - - loadingBg.Transform = CGAffineTransform.MakeScale(2.0f, 2.0f); - loadingBg.Alpha = 0.0f; - - UIView.CommitAnimations(); - - - loadingBg.RemoveFromSuperview(); - } - }); - } - } -} - diff --git a/Source/ZXing.Net.Mobile.iOS/AssemblyInfo.cs b/Source/ZXing.Net.Mobile.iOS/AssemblyInfo.cs deleted file mode 100644 index 3f94339d6..000000000 --- a/Source/ZXing.Net.Mobile.iOS/AssemblyInfo.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -// Information about this assembly is defined by the following attributes. -// Change them to the values specific to your project. - -[assembly: AssemblyTitle("ZXing.Net.Mobile.iOS")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("redth")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". -// The form "{Major}.{Minor}.*" will automatically update the build and revision, -// and "{Major}.{Minor}.{Build}.*" will update just the revision. - -[assembly: AssemblyVersion("1.0.*")] - -// The following attributes are used to specify the signing key for the assembly, -// if desired. See the Mono documentation for more information about signing. - -//[assembly: AssemblyDelaySign(false)] -//[assembly: AssemblyKeyFile("")] - diff --git a/Source/ZXing.Net.Mobile.iOS/BitmapRenderer.cs b/Source/ZXing.Net.Mobile.iOS/BitmapRenderer.cs deleted file mode 100644 index 6fd5373a0..000000000 --- a/Source/ZXing.Net.Mobile.iOS/BitmapRenderer.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using ZXing.Rendering; - -using Foundation; -using CoreFoundation; -using CoreGraphics; -using UIKit; - -using ZXing.Common; - -namespace ZXing.Mobile -{ - public class BitmapRenderer : IBarcodeRenderer - { - - public UIImage Render(BitMatrix matrix, BarcodeFormat format, string content) - { - return Render (matrix, format, content, new EncodingOptions()); - } - - public UIImage Render(BitMatrix matrix, BarcodeFormat format, string content, EncodingOptions options) - { - UIGraphics.BeginImageContext(new CGSize(matrix.Width, matrix.Height)); - var context = UIGraphics.GetCurrentContext(); - - var black = new CGColor(0f,0f,0f); - var white = new CGColor(1.0f, 1.0f, 1.0f); - - for (int x = 0; x < matrix.Width; x++) - { - for (int y = 0; y < matrix.Height; y++) - { - context.SetFillColor(matrix[x, y] ? black : white); - context.FillRect(new CGRect(x, y, 1, 1)); - } - } - - - var img = UIGraphics.GetImageFromCurrentImageContext(); - - UIGraphics.EndImageContext(); - - return img; - } - } -} diff --git a/Source/ZXing.Net.Mobile.iOS/CVPixelBufferBGRA32LuminanceSource.cs b/Source/ZXing.Net.Mobile.iOS/CVPixelBufferBGRA32LuminanceSource.cs deleted file mode 100644 index da4b1f57e..000000000 --- a/Source/ZXing.Net.Mobile.iOS/CVPixelBufferBGRA32LuminanceSource.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using CoreVideo; -using ZXing; - -namespace ZXing.Mobile -{ - public class CVPixelBufferBGRA32LuminanceSource : BaseLuminanceSource - { - public unsafe CVPixelBufferBGRA32LuminanceSource(byte* cvPixelByteArray, int cvPixelByteArrayLength, int width, int height) - : base(width, height) - { - CalculateLuminance(cvPixelByteArray, cvPixelByteArrayLength); - } - - public CVPixelBufferBGRA32LuminanceSource (byte[] luminances, int width, int height) : - base (luminances, width, height) - { - - } - - unsafe void CalculateLuminance(byte* rgbRawBytes, int bytesLen) - { - for (int rgbIndex = 0, luminanceIndex = 0; rgbIndex < bytesLen && luminanceIndex < luminances.Length; luminanceIndex++) - { - // Calculate luminance cheaply, favoring green. - var b = rgbRawBytes[rgbIndex++]; - var g = rgbRawBytes[rgbIndex++]; - var r = rgbRawBytes[rgbIndex++]; - var alpha = rgbRawBytes[rgbIndex++]; - var luminance = (byte)((RChannelWeight * r + GChannelWeight * g + BChannelWeight * b) >> ChannelWeight); - luminances[luminanceIndex] = (byte)(((luminance * alpha) >> 8) + (255 * (255 - alpha) >> 8)); - } - } - - protected override LuminanceSource CreateLuminanceSource(byte[] newLuminances, int width, int height) - { - return new CVPixelBufferBGRA32LuminanceSource(newLuminances, width, height); - } - } -} diff --git a/Source/ZXing.Net.Mobile.iOS/MobileBarcodeScanner.cs b/Source/ZXing.Net.Mobile.iOS/MobileBarcodeScanner.cs deleted file mode 100644 index 0210f49a9..000000000 --- a/Source/ZXing.Net.Mobile.iOS/MobileBarcodeScanner.cs +++ /dev/null @@ -1,229 +0,0 @@ -using System; -using System.Threading; -using System.Threading.Tasks; - -using Foundation; -using CoreFoundation; -using UIKit; - -namespace ZXing.Mobile -{ - public class MobileBarcodeScanner : MobileBarcodeScannerBase - { - //ZxingCameraViewController viewController; - IScannerViewController viewController; - - UIViewController appController; - ManualResetEvent scanResultResetEvent = new ManualResetEvent(false); - - public MobileBarcodeScanner (UIViewController delegateController) - { - appController = delegateController; - } - - public MobileBarcodeScanner () - { - foreach (var window in UIApplication.SharedApplication.Windows) - { - if (window.RootViewController != null) - { - appController = window.RootViewController; - break; - } - } - } - - public Task Scan (bool useAVCaptureEngine) - { - return Scan (new MobileBarcodeScanningOptions (), useAVCaptureEngine); - } - - - public override Task Scan (MobileBarcodeScanningOptions options) - { - return Scan (options, false); - } - - - public override void ScanContinuously (MobileBarcodeScanningOptions options, Action scanHandler) - { - ScanContinuously (options, false, scanHandler); - } - - public void ScanContinuously (MobileBarcodeScanningOptions options, bool useAVCaptureEngine, Action scanHandler) - { - try - { - Version sv = new Version (0, 0, 0); - Version.TryParse (UIDevice.CurrentDevice.SystemVersion, out sv); - - var is7orgreater = sv.Major >= 7; - var allRequestedFormatsSupported = true; - - if (useAVCaptureEngine) - allRequestedFormatsSupported = AVCaptureScannerView.SupportsAllRequestedBarcodeFormats(options.PossibleFormats); - - this.appController.InvokeOnMainThread(() => { - - - if (useAVCaptureEngine && is7orgreater && allRequestedFormatsSupported) - { - viewController = new AVCaptureScannerViewController(options, this); - viewController.ContinuousScanning = true; - } - else - { - if (useAVCaptureEngine && !is7orgreater) - Console.WriteLine("Not iOS 7 or greater, cannot use AVCapture for barcode decoding, using ZXing instead"); - else if (useAVCaptureEngine && !allRequestedFormatsSupported) - Console.WriteLine("Not all requested barcode formats were supported by AVCapture, using ZXing instead"); - - viewController = new ZXing.Mobile.ZXingScannerViewController(options, this); - viewController.ContinuousScanning = true; - } - - viewController.OnScannedResult += barcodeResult => { - - // If null, stop scanning was called - if (barcodeResult == null) { - ((UIViewController)viewController).InvokeOnMainThread(() => { - ((UIViewController)viewController).DismissViewController(true, null); - }); - } - - scanHandler (barcodeResult); - }; - - appController.PresentViewController((UIViewController)viewController, true, null); - }); - } - catch (Exception ex) - { - Console.WriteLine(ex); - } - } - - public Task Scan (MobileBarcodeScanningOptions options, bool useAVCaptureEngine) - { - return Task.Factory.StartNew(() => { - - try - { - scanResultResetEvent.Reset(); - - Result result = null; - - Version sv = new Version (0, 0, 0); - Version.TryParse (UIDevice.CurrentDevice.SystemVersion, out sv); - - var is7orgreater = sv.Major >= 7; - var allRequestedFormatsSupported = true; - - if (useAVCaptureEngine) - allRequestedFormatsSupported = AVCaptureScannerView.SupportsAllRequestedBarcodeFormats(options.PossibleFormats); - - this.appController.InvokeOnMainThread(() => { - - - if (useAVCaptureEngine && is7orgreater && allRequestedFormatsSupported) - { - viewController = new AVCaptureScannerViewController(options, this); - } - else - { - if (useAVCaptureEngine && !is7orgreater) - Console.WriteLine("Not iOS 7 or greater, cannot use AVCapture for barcode decoding, using ZXing instead"); - else if (useAVCaptureEngine && !allRequestedFormatsSupported) - Console.WriteLine("Not all requested barcode formats were supported by AVCapture, using ZXing instead"); - - viewController = new ZXing.Mobile.ZXingScannerViewController(options, this); - } - - viewController.OnScannedResult += barcodeResult => { - - ((UIViewController)viewController).InvokeOnMainThread(() => { - - viewController.Cancel(); - - // Handle error situation that occurs when user manually closes scanner in the same moment that a QR code is detected - try { - ((UIViewController) viewController).DismissViewController(true, () => { - result = barcodeResult; - scanResultResetEvent.Set(); - }); - } catch (ObjectDisposedException) { - // In all likelihood, iOS has decided to close the scanner at this point. But just in case it executes the - // post-scan code instead, set the result so we will not get a NullReferenceException. - result = barcodeResult; - scanResultResetEvent.Set(); - } - }); - }; - - appController.PresentViewController((UIViewController)viewController, true, null); - }); - - scanResultResetEvent.WaitOne(); - ((UIViewController)viewController).Dispose(); - - return result; - } - catch (Exception ex) - { - Console.WriteLine(ex); - return null; - } - }); - - } - - public override void Cancel () - { - if (viewController != null) - { - ((UIViewController)viewController).InvokeOnMainThread(() => { - viewController.Cancel(); - - // Calling with animated:true here will result in a blank screen when the scanner is closed on iOS 7. - ((UIViewController)viewController).DismissViewController(false, null); - }); - } - - scanResultResetEvent.Set(); - } - - public override void Torch (bool on) - { - if (viewController != null) - viewController.Torch (on); - } - - public override void ToggleTorch () - { - viewController.ToggleTorch(); - } - - public override void AutoFocus () - { - //Does nothing on iOS - } - - public override void PauseAnalysis () - { - viewController.PauseAnalysis (); - } - - public override void ResumeAnalysis () - { - viewController.ResumeAnalysis (); - } - - public override bool IsTorchOn { - get { - return viewController.IsTorchOn; - } - } - public UIView CustomOverlay { get;set; } - } -} - diff --git a/Source/ZXing.Net.Mobile.iOS/RGBLuminanceSourceiOS.cs b/Source/ZXing.Net.Mobile.iOS/RGBLuminanceSourceiOS.cs deleted file mode 100644 index d6a057ceb..000000000 --- a/Source/ZXing.Net.Mobile.iOS/RGBLuminanceSourceiOS.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -using UIKit; -using CoreGraphics; - -namespace ZXing.Mobile -{ - public class RGBLuminanceSourceiOS : RGBLuminanceSource - { - public RGBLuminanceSourceiOS (UIImage d) - : base((int)d.CGImage.Width, (int)d.CGImage.Height) - { - CalculateLuminance(d); - } - - void CalculateLuminance(UIImage d) - { - var imageRef = d.CGImage; - var width = (int)imageRef.Width; - var height = (int)imageRef.Height; - var colorSpace = CGColorSpace.CreateDeviceRGB(); - - var rawData = Marshal.AllocHGlobal(height * width * 4); - - try - { - var flags = CGBitmapFlags.PremultipliedFirst | CGBitmapFlags.ByteOrder32Little; - var context = new CGBitmapContext(rawData, width, height, 8, 4 * width, - colorSpace, (CGImageAlphaInfo)flags); - - context.DrawImage(new CGRect(0.0f, 0.0f, (float)width, (float)height), imageRef); - var pixelData = new byte[height * width * 4]; - Marshal.Copy(rawData, pixelData, 0, pixelData.Length); - - CalculateLuminance(pixelData, BitmapFormat.BGRA32); - } - finally - { - Marshal.FreeHGlobal(rawData); - } - } - } -} - diff --git a/Source/ZXing.Net.Mobile.iOS/ZXing.Net.Mobile.iOS.csproj b/Source/ZXing.Net.Mobile.iOS/ZXing.Net.Mobile.iOS.csproj deleted file mode 100644 index 90b5a41b4..000000000 --- a/Source/ZXing.Net.Mobile.iOS/ZXing.Net.Mobile.iOS.csproj +++ /dev/null @@ -1,97 +0,0 @@ - - - - Debug - iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A} - {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Library - ZXing.Mobile - ZXingNetMobile - - - True - full - False - ..\..\Build\Debug\ios-unified\ - DEBUG - prompt - 4 - False - None - True - obj\unified\$(Platform)\$(Configuration)\ - true - - - none - False - ..\..\Build\Release\ios-unified\ - prompt - 4 - False - None - obj\unified\$(Platform)\$(Configuration)\ - true - - - True - full - False - ..\..\Build\Debug\ios-unified\ - __UNIFIED__;__MOBILE__;__IOS__;DEBUG - prompt - 4 - False - iPhone Developer - True - obj\unified\$(Platform)\$(Configuration)\ - true - - - none - False - ..\..\Build\Release\ios-unified\ - __UNIFIED__;__MOBILE__;__IOS__; - prompt - 4 - False - iPhone Developer - obj\unified\$(Platform)\$(Configuration)\ - true - - - ZXingNetMobile - - - - - - - - - - - - - - - - - - - - - - - - - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB} - ZXing.Net.Mobile.Core - - - {24b441f2-cbe9-4405-9fd0-72ebcbea0ec3} - zxing.portable - - - \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.iOS/ZXingScannerViewController.cs b/Source/ZXing.Net.Mobile.iOS/ZXingScannerViewController.cs deleted file mode 100644 index 2e1a5e4a5..000000000 --- a/Source/ZXing.Net.Mobile.iOS/ZXingScannerViewController.cs +++ /dev/null @@ -1,216 +0,0 @@ -using System; -using System.Text; -using System.Collections.Generic; -using System.Threading.Tasks; - -using UIKit; -using Foundation; -using AVFoundation; -using CoreGraphics; - -using ZXing; - -namespace ZXing.Mobile -{ - public class ZXingScannerViewController : UIViewController, IScannerViewController - { - ZXingScannerView scannerView; - - public event Action OnScannedResult; - - public MobileBarcodeScanningOptions ScanningOptions { get;set; } - public MobileBarcodeScanner Scanner { get;set; } - public bool ContinuousScanning { get;set; } - - UIActivityIndicatorView loadingView; - UIView loadingBg; - - public UIView CustomLoadingView { get; set; } - - public ZXingScannerViewController(MobileBarcodeScanningOptions options, MobileBarcodeScanner scanner) - { - this.ScanningOptions = options; - this.Scanner = scanner; - - var appFrame = UIScreen.MainScreen.ApplicationFrame; - - this.View.Frame = new CGRect(0, 0, appFrame.Width, appFrame.Height); - this.View.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; - } - - public UIViewController AsViewController() - { - return this; - } - - public void Cancel() - { - this.InvokeOnMainThread (scannerView.StopScanning); - } - - UIStatusBarStyle originalStatusBarStyle = UIStatusBarStyle.Default; - - public override void ViewDidLoad () - { - loadingBg = new UIView (this.View.Frame) { BackgroundColor = UIColor.Black, AutoresizingMask = UIViewAutoresizing.FlexibleDimensions }; - loadingView = new UIActivityIndicatorView (UIActivityIndicatorViewStyle.WhiteLarge) - { - AutoresizingMask = UIViewAutoresizing.FlexibleMargins - }; - loadingView.Frame = new CGRect ((this.View.Frame.Width - loadingView.Frame.Width) / 2, - (this.View.Frame.Height - loadingView.Frame.Height) / 2, - loadingView.Frame.Width, - loadingView.Frame.Height); - - loadingBg.AddSubview (loadingView); - View.AddSubview (loadingBg); - loadingView.StartAnimating (); - - scannerView = new ZXingScannerView(new CGRect(0, 0, View.Frame.Width, View.Frame.Height)); - scannerView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; - scannerView.UseCustomOverlayView = this.Scanner.UseCustomOverlay; - scannerView.CustomOverlayView = this.Scanner.CustomOverlay; - scannerView.TopText = this.Scanner.TopText; - scannerView.BottomText = this.Scanner.BottomText; - scannerView.CancelButtonText = this.Scanner.CancelButtonText; - scannerView.FlashButtonText = this.Scanner.FlashButtonText; - scannerView.OnCancelButtonPressed += delegate { - Scanner.Cancel (); - }; - - //this.View.AddSubview(scannerView); - this.View.InsertSubviewBelow (scannerView, loadingView); - - this.View.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; - } - - public void Torch(bool on) - { - if (scannerView != null) - scannerView.Torch (on); - } - - public void ToggleTorch() - { - if (scannerView != null) - scannerView.ToggleTorch (); - } - - public void PauseAnalysis () - { - scannerView.PauseAnalysis (); - } - - public void ResumeAnalysis () - { - scannerView.ResumeAnalysis (); - } - - public bool IsTorchOn - { - get { return scannerView.IsTorchOn; } - } - - public override void ViewDidAppear (bool animated) - { - scannerView.OnScannerSetupComplete += HandleOnScannerSetupComplete; - - originalStatusBarStyle = UIApplication.SharedApplication.StatusBarStyle; - - if (UIDevice.CurrentDevice.CheckSystemVersion (7, 0)) - { - UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.Default; - SetNeedsStatusBarAppearanceUpdate (); - } - else - UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.BlackTranslucent, false); - - Console.WriteLine("Starting to scan..."); - - Task.Factory.StartNew (() => - { - BeginInvokeOnMainThread(() => scannerView.StartScanning (result => { - - if (!ContinuousScanning) { - Console.WriteLine ("Stopping scan..."); - scannerView.StopScanning (); - } - - var evt = this.OnScannedResult; - if (evt != null) - evt (result); - - },this.ScanningOptions)); - }); - } - - public override void ViewDidDisappear (bool animated) - { - if (scannerView != null) - scannerView.StopScanning(); - - scannerView.OnScannerSetupComplete -= HandleOnScannerSetupComplete; - } - - public override void ViewWillDisappear(bool animated) - { - UIApplication.SharedApplication.SetStatusBarStyle(originalStatusBarStyle, false); - } - - public override void DidRotate (UIInterfaceOrientation fromInterfaceOrientation) - { - if (scannerView != null) - scannerView.DidRotate (this.InterfaceOrientation); - - //overlayView.LayoutSubviews(); - } - public override bool ShouldAutorotate () - { - if (ScanningOptions.AutoRotate != null) - { - return (bool)ScanningOptions.AutoRotate; - } - return false; - } - - public override UIInterfaceOrientationMask GetSupportedInterfaceOrientations () - { - return UIInterfaceOrientationMask.All; - } - - [Obsolete ("Deprecated in iOS6. Replace it with both GetSupportedInterfaceOrientations and PreferredInterfaceOrientationForPresentation")] - public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation) - { - if (ScanningOptions.AutoRotate != null) - { - return (bool)ScanningOptions.AutoRotate; - } - return false; - } - - void HandleOnScannerSetupComplete () - { - BeginInvokeOnMainThread (() => - { - if (loadingView != null && loadingBg != null && loadingView.IsAnimating) - { - loadingView.StopAnimating (); - - UIView.BeginAnimations("zoomout"); - - UIView.SetAnimationDuration(2.0f); - UIView.SetAnimationCurve(UIViewAnimationCurve.EaseOut); - - loadingBg.Transform = CGAffineTransform.MakeScale(2.0f, 2.0f); - loadingBg.Alpha = 0.0f; - - UIView.CommitAnimations(); - - - loadingBg.RemoveFromSuperview(); - } - }); - } - } -} - diff --git a/Tests/Tests.MonoTouch/DecodingTests.cs b/Tests/Tests.MonoTouch/DecodingTests.cs deleted file mode 100644 index 0ac4e902e..000000000 --- a/Tests/Tests.MonoTouch/DecodingTests.cs +++ /dev/null @@ -1,110 +0,0 @@ -using System; -using NUnit; -using NUnit.Framework; -using ZXing; -using ZXing.Common; -using System.Drawing; -using MonoTouch.UIKit; - -namespace Tests.MonoTouch -{ - public class DecodingTests - { - - [Test] - public void Decode_QRCode() - { - AssertDecode ("qrcode.png", "http://google.com"); - } - - [Test] - public void Decode_Aztec() - { - AssertDecode ("aztec.png", "This is Aztec Code"); - } - - [Test] - public void Decode_Codabar() - { - AssertDecode ("codabar.png", "1234567"); - } - - [Test] - public void Decode_Code128() - { - AssertDecode ("code128.png", "1234567"); - } - - [Test] - public void Decode_Code39() - { - AssertDecode ("code39.png", "1234567"); - } - - [Test] - public void Decode_Code93() - { - AssertDecode ("code93.png", "THIS IS CODE93"); - } - - [Test] - public void Decode_Datamatrix() - { - AssertDecode ("datamatrix.png", "DATAMATRIX"); - } - - [Test] - public void Decode_Ean13() - { - AssertDecode ("ean13.gif", "1234567890128"); - } - - [Test] - public void Decode_Ean8() - { - AssertDecode ("ean8.png", "12345670"); - } - - [Test] - public void Decode_Itf() - { - AssertDecode ("itf.png", "ITF"); - } - - [Test] - public void Decode_PDF417() - { - AssertDecode ("pdf417.png", "pdf417"); - } - - [Test] - public void Decode_UpcA() - { - AssertDecode ("upca.png", "123456789012"); - } - - [Test] - public void Decode_UpcE() - { - AssertDecode ("upce.png", "01234565"); - } - - void AssertDecode(string img, string expectedValue) - { - var uimg = UIImage.FromFile("Images/" + img); - - - var barcodeReader = new BarcodeReader(null, (brimg) => { - - return new RGBLuminanceSource(uimg); - - }, null, null); //(p, w, h, f) => new RGBLuminanceSource(p, w, h, RGBLuminanceSource.BitmapFormat.Unknown)); - - var r = barcodeReader.Decode(uimg); - Assert.IsNotNull(r, "No Result Found"); - Assert.IsTrue(r.Text.Equals(expectedValue, StringComparison.InvariantCultureIgnoreCase), - "Actual: " + r.Text + " Expected: " + expectedValue); - } - } -} - diff --git a/Tests/Tests.MonoTouch/Info.plist b/Tests/Tests.MonoTouch/Info.plist deleted file mode 100644 index 8653860cf..000000000 --- a/Tests/Tests.MonoTouch/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - UIDeviceFamily - - 1 - 2 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - MinimumOSVersion - 3.2 - - diff --git a/Tests/Tests.MonoTouch/Tests.MonoTouch.csproj b/Tests/Tests.MonoTouch/Tests.MonoTouch.csproj deleted file mode 100644 index ae6c1c79f..000000000 --- a/Tests/Tests.MonoTouch/Tests.MonoTouch.csproj +++ /dev/null @@ -1,148 +0,0 @@ - - - - Debug - iPhoneSimulator - 10.0.0 - 2.0 - {D1D95851-7322-469C-AD0E-9EAB545302AD} - {6BC8ED88-2882-458C-8E55-DFD12B67127B};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Exe - Tests.MonoTouch - Resources - TestsMonoTouch - - - true - full - false - bin\iPhoneSimulator\Debug - DEBUG; - prompt - 4 - true - None - false - - - none - true - bin\iPhoneSimulator\Release - prompt - 4 - false - None - - - true - full - false - bin\iPhone\Debug - DEBUG; - prompt - 4 - iPhone Developer - true - false - - - none - true - bin\iPhone\Release - prompt - 4 - false - iPhone Developer - - - none - true - bin\iPhone\Ad-Hoc - prompt - 4 - false - iPhone Distribution - true - Automatic:AdHoc - - - none - true - bin\iPhone\AppStore - prompt - 4 - false - Automatic:AppStore - iPhone Distribution - - - - - - - - - - - - - - - - - - - - - - - - {BD0FA561-182D-4A89-BAA7-228693B07862} - zxing.monotouch - - - - - Images\aztec.png - - - Images\codabar.png - - - Images\code128.png - - - Images\code39.png - - - Images\code93.png - - - Images\datamatrix.png - - - Images\ean8.png - - - Images\itf.png - - - Images\pdf417.png - - - Images\qrcode.png - - - Images\upca.png - - - Images\upce.png - - - Images\ean13.gif - - - Images\itf.gif - - - \ No newline at end of file diff --git a/Tests/Tests.MonoTouch/UnitTestAppDelegate.cs b/Tests/Tests.MonoTouch/UnitTestAppDelegate.cs deleted file mode 100644 index fc4d1c255..000000000 --- a/Tests/Tests.MonoTouch/UnitTestAppDelegate.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -using MonoTouch.Foundation; -using MonoTouch.UIKit; -using MonoTouch.NUnit.UI; - -namespace Tests.MonoTouch -{ - // The UIApplicationDelegate for the application. This class is responsible for launching the - // User Interface of the application, as well as listening (and optionally responding) to - // application events from iOS. - [Register ("UnitTestAppDelegate")] - public partial class UnitTestAppDelegate : UIApplicationDelegate - { - // class-level declarations - UIWindow window; - TouchRunner runner; - - // - // This method is invoked when the application has loaded and is ready to run. In this - // method you should instantiate the window, load the UI into it and then make the window - // visible. - // - // You have 17 seconds to return from this method, or iOS will terminate your application. - // - public override bool FinishedLaunching (UIApplication app, NSDictionary options) - { - // create a new window instance based on the screen size - window = new UIWindow (UIScreen.MainScreen.Bounds); - runner = new TouchRunner (window); - - // register every tests included in the main application/assembly - runner.Add (System.Reflection.Assembly.GetExecutingAssembly ()); - - window.RootViewController = new UINavigationController (runner.GetViewController ()); - - // make the window visible - window.MakeKeyAndVisible (); - - return true; - } - } -} - diff --git a/Tests/ZXing.Net.Mobile-Test-Script.docx b/Tests/ZXing.Net.Mobile-Test-Script.docx deleted file mode 100644 index 370e064d8..000000000 Binary files a/Tests/ZXing.Net.Mobile-Test-Script.docx and /dev/null differ diff --git a/Tests/ZXing.Net.Mobile.NUnit/Images/aztec.png b/Tests/ZXing.Net.Mobile.NUnit/Images/aztec.png deleted file mode 100644 index 7369038a1..000000000 Binary files a/Tests/ZXing.Net.Mobile.NUnit/Images/aztec.png and /dev/null differ diff --git a/Tests/ZXing.Net.Mobile.NUnit/Images/codabar.png b/Tests/ZXing.Net.Mobile.NUnit/Images/codabar.png deleted file mode 100644 index 550dd7731..000000000 Binary files a/Tests/ZXing.Net.Mobile.NUnit/Images/codabar.png and /dev/null differ diff --git a/Tests/ZXing.Net.Mobile.NUnit/Images/code128.png b/Tests/ZXing.Net.Mobile.NUnit/Images/code128.png deleted file mode 100644 index 3cc15b1e9..000000000 Binary files a/Tests/ZXing.Net.Mobile.NUnit/Images/code128.png and /dev/null differ diff --git a/Tests/ZXing.Net.Mobile.NUnit/Images/code39.png b/Tests/ZXing.Net.Mobile.NUnit/Images/code39.png deleted file mode 100644 index 9b6e66729..000000000 Binary files a/Tests/ZXing.Net.Mobile.NUnit/Images/code39.png and /dev/null differ diff --git a/Tests/ZXing.Net.Mobile.NUnit/Images/code93.png b/Tests/ZXing.Net.Mobile.NUnit/Images/code93.png deleted file mode 100644 index 095e7c45a..000000000 Binary files a/Tests/ZXing.Net.Mobile.NUnit/Images/code93.png and /dev/null differ diff --git a/Tests/ZXing.Net.Mobile.NUnit/Images/datamatrix.png b/Tests/ZXing.Net.Mobile.NUnit/Images/datamatrix.png deleted file mode 100644 index d2e00a818..000000000 Binary files a/Tests/ZXing.Net.Mobile.NUnit/Images/datamatrix.png and /dev/null differ diff --git a/Tests/ZXing.Net.Mobile.NUnit/Images/ean13.gif b/Tests/ZXing.Net.Mobile.NUnit/Images/ean13.gif deleted file mode 100644 index 956202123..000000000 Binary files a/Tests/ZXing.Net.Mobile.NUnit/Images/ean13.gif and /dev/null differ diff --git a/Tests/ZXing.Net.Mobile.NUnit/Images/ean8.png b/Tests/ZXing.Net.Mobile.NUnit/Images/ean8.png deleted file mode 100644 index 6342334a2..000000000 Binary files a/Tests/ZXing.Net.Mobile.NUnit/Images/ean8.png and /dev/null differ diff --git a/Tests/ZXing.Net.Mobile.NUnit/Images/itf.gif b/Tests/ZXing.Net.Mobile.NUnit/Images/itf.gif deleted file mode 100644 index a1a620289..000000000 Binary files a/Tests/ZXing.Net.Mobile.NUnit/Images/itf.gif and /dev/null differ diff --git a/Tests/ZXing.Net.Mobile.NUnit/Images/itf.png b/Tests/ZXing.Net.Mobile.NUnit/Images/itf.png deleted file mode 100644 index 264fed601..000000000 Binary files a/Tests/ZXing.Net.Mobile.NUnit/Images/itf.png and /dev/null differ diff --git a/Tests/ZXing.Net.Mobile.NUnit/Images/l2of5small.png b/Tests/ZXing.Net.Mobile.NUnit/Images/l2of5small.png deleted file mode 100644 index 18df1e407..000000000 Binary files a/Tests/ZXing.Net.Mobile.NUnit/Images/l2of5small.png and /dev/null differ diff --git a/Tests/ZXing.Net.Mobile.NUnit/Images/l2of5verysmall.png b/Tests/ZXing.Net.Mobile.NUnit/Images/l2of5verysmall.png deleted file mode 100644 index 92e9713cf..000000000 Binary files a/Tests/ZXing.Net.Mobile.NUnit/Images/l2of5verysmall.png and /dev/null differ diff --git a/Tests/ZXing.Net.Mobile.NUnit/Images/pdf417.png b/Tests/ZXing.Net.Mobile.NUnit/Images/pdf417.png deleted file mode 100644 index a97b772f4..000000000 Binary files a/Tests/ZXing.Net.Mobile.NUnit/Images/pdf417.png and /dev/null differ diff --git a/Tests/ZXing.Net.Mobile.NUnit/Images/qrcode.png b/Tests/ZXing.Net.Mobile.NUnit/Images/qrcode.png deleted file mode 100644 index 2fab2b024..000000000 Binary files a/Tests/ZXing.Net.Mobile.NUnit/Images/qrcode.png and /dev/null differ diff --git a/Tests/ZXing.Net.Mobile.NUnit/Images/upca.png b/Tests/ZXing.Net.Mobile.NUnit/Images/upca.png deleted file mode 100644 index 094149a4d..000000000 Binary files a/Tests/ZXing.Net.Mobile.NUnit/Images/upca.png and /dev/null differ diff --git a/Tests/ZXing.Net.Mobile.NUnit/Images/upce.png b/Tests/ZXing.Net.Mobile.NUnit/Images/upce.png deleted file mode 100644 index 6209d6a5e..000000000 Binary files a/Tests/ZXing.Net.Mobile.NUnit/Images/upce.png and /dev/null differ diff --git a/Tests/ZXing.Net.Mobile.NUnit/RGBLuminanceSource.cs b/Tests/ZXing.Net.Mobile.NUnit/RGBLuminanceSource.cs deleted file mode 100644 index 24afedd89..000000000 --- a/Tests/ZXing.Net.Mobile.NUnit/RGBLuminanceSource.cs +++ /dev/null @@ -1,178 +0,0 @@ -//using System.Drawing.Imaging; -#if WINDOWS_PHONE -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; -#else -using System.Drawing; -#endif -using System; - -using ZXing; -using ZXing.Common; - -public class RGBLuminanceSource : LuminanceSource -{ - - private byte[] luminances; - private bool isRotated = false; - private bool __isRegionSelect = false; - private Rectangle __Region; - - public int Height - { - get - { - if (!isRotated) - return __height; - else - return __width; - } - - } - public int Width - { - get - { - if (!isRotated) - return __width; - else - return __height; - } - - } - private int __height; - private int __width; - - public RGBLuminanceSource(byte[] d, int W, int H) - : base(W, H) - { - __width = W; - __height = H; - int width = W; - int height = H; - // In order to measure pure decoding speed, we convert the entire image to a greyscale array - // up front, which is the same as the Y channel of the YUVLuminanceSource in the real app. - luminances = new byte[width * height]; - for (int y = 0; y < height; y++) - { - int offset = y * width; - for (int x = 0; x < width; x++) - { - int b = d[offset * 4 + x * 4]; - int g = d[offset * 4 + x * 4 + 1]; - int r = d[offset * 4 + x * 4 + 2]; - if (r == g && g == b) - { - // Image is already greyscale, so pick any channel. - luminances[offset + x] = (byte)r; - } - else - { - // Calculate luminance cheaply, favoring green. - luminances[offset + x] = (byte)((r + g + g + b) >> 2); - } - } - } - } - public RGBLuminanceSource(byte[] d, int W, int H, bool Is8Bit) - : base(W, H) - { - __width = W; - __height = H; - luminances = new byte[W * H]; - Buffer.BlockCopy(d, 0, luminances, 0, W * H); - } - - public RGBLuminanceSource(byte[] d, int W, int H, bool Is8Bit, Rectangle Region) - : base(W, H) - { - __width = (int)Region.Width; - __height = (int)Region.Height; - __Region = Region; - __isRegionSelect = true; - //luminances = Red.Imaging.Filters.CropArea(d, W, H, Region); - } - - #if !WINDOWS_PHONE - public RGBLuminanceSource(Bitmap d, int W, int H) - #else - public RGBLuminanceSource(WriteableBitmap d, int W, int H) - #endif - : base(W, H) - { - int width = __width = W; - int height = __height = H; - // In order to measure pure decoding speed, we convert the entire image to a greyscale array - // up front, which is the same as the Y channel of the YUVLuminanceSource in the real app. - luminances = new byte[width * height]; - //if (format == PixelFormat.Format8bppIndexed) - { - Color c; - for (int y = 0; y < height; y++) - { - int offset = y * width; - for (int x = 0; x < width; x++) - { - c = d.GetPixel(x, y); - luminances[offset + x] = (byte)(((int)c.R) << 16 | ((int)c.G) << 8 | ((int)c.B)); - } - } - } - } - override public byte[] getRow(int y, byte[] row) - { - if (isRotated == false) - { - int width = Width; - if (row == null || row.Length < width) - { - row = new byte[width]; - } - for (int i = 0; i < width; i++) - row[i] = luminances[y * width + i]; - //System.arraycopy(luminances, y * width, row, 0, width); - return row; - } - else - { - int width = __width; - int height = __height; - if (row == null || row.Length < height) - { - row = new byte[height]; - } - for (int i = 0; i < height; i++) - row[i] = luminances[i * width + y]; - //System.arraycopy(luminances, y * width, row, 0, width); - return row; - } - } - public override byte[] Matrix - { - get { return luminances; } - } - - public override LuminanceSource crop(int left, int top, int width, int height) - { - return base.crop(left, top, width, height); - } - public override LuminanceSource rotateCounterClockwise() - { - isRotated = true; - return this; - } - public bool RotateSupported - { - get - { - return true; - } - - } - - - - - -} diff --git a/Tests/ZXing.Net.Mobile.NUnit/Test.cs b/Tests/ZXing.Net.Mobile.NUnit/Test.cs deleted file mode 100644 index cf9d46f32..000000000 --- a/Tests/ZXing.Net.Mobile.NUnit/Test.cs +++ /dev/null @@ -1,166 +0,0 @@ -using System; -using System.Collections.Generic; -using NUnit.Framework; -using ZXing; - -namespace ZxingSharp.Mobile.Test -{ - [TestFixture] - public class DecodingTests - { - [Test] - public void DataMatrix() - { - var result = Decode("datamatrix.png", BarcodeFormat.DATA_MATRIX, new KeyValuePair[] { new KeyValuePair(DecodeHintType.PURE_BARCODE, "TRUE") }); - - Assert.IsNotNull(result, "NULL Result"); - Assert.IsTrue(result.Text.Equals("test", StringComparison.InvariantCultureIgnoreCase), "Result Text Incorrect: " + result.Text); - } - - [Test] - public void QrCode() - { - var result = Decode("qrcode.png", BarcodeFormat.QR_CODE, new KeyValuePair[] { new KeyValuePair(DecodeHintType.PURE_BARCODE, "TRUE") }); - - Assert.IsNotNull(result, "NULL Result"); - Assert.IsTrue(result.Text.Equals("http://google.com", StringComparison.InvariantCultureIgnoreCase), "Result Text Incorrect: " + result.Text); - } - - [Test] - public void Ean8() - { - var result = Decode("ean8.png", BarcodeFormat.EAN_8); - - Assert.IsNotNull(result, "NULL Result"); - Assert.IsTrue(result.Text.Equals("12345670"), "Result Text Incorrect: " + result.Text); - } - - [Test] - public void Ean13() - { - var result = Decode("ean13.gif", BarcodeFormat.EAN_13); - - Assert.IsNotNull(result, "NULL Result"); - Assert.IsTrue(result.Text.Equals("1234567890128"), "Result Text Incorrect: " + result.Text); - } - - [Test] - public void Code128() - { - var result = Decode("code128.png", BarcodeFormat.CODE_128); - - Assert.IsNotNull(result, "NULL Result"); - Assert.IsTrue(result.Text.Equals("1234567"), "Result Text Incorrect: " + result.Text); - } - - [Test] - public void Code39() - { - var result = Decode("code39.png", BarcodeFormat.CODE_39); - - Assert.IsNotNull(result, "NULL Result"); - Assert.IsTrue(result.Text.Equals("1234567"), "Result Text Incorrect: " + result.Text); - } - - [Test] - public void ITF() - { - var result = Decode("itf.png", BarcodeFormat.ITF); - - Assert.IsNotNull(result, "NULL Result"); - Assert.IsTrue(result.Text.Equals("1234567890123"), "Result Text Incorrect: " + result.Text); - } - - [Test] - public void Pdf417() - { - var result = Decode("pdf417.png", BarcodeFormat.PDF_417); - - Assert.IsNotNull(result, "NULL Result"); - Assert.IsTrue(result.Text.Equals("PDF417", StringComparison.InvariantCultureIgnoreCase), "Result Text Incorrect: " + result.Text); - } - - [Test] - public void UpcA() - { - var result = Decode("upca.png", BarcodeFormat.UPC_A); - - Assert.IsNotNull(result, "NULL Result"); - Assert.IsTrue(result.Text.Equals("123456789012"), "Result Text Incorrect: " + result.Text); - } - - [Test] - public void UpcE() - { - var result = Decode("upce.png", BarcodeFormat.UPC_E); - - Assert.IsNotNull(result, "NULL Result"); - Assert.IsTrue(result.Text.Equals("01234565"), "Result Text Incorrect: " + result.Text); - } - - [Test] - public void L2Of5Small() - { - var result = Decode("l2of5small.png"); - - Assert.IsNotNull (result, "NULL Result"); - } - - [Test] - public void L2Of5VerySmall() - { - var result = Decode("l2of5verysmall.png"); - - Assert.IsNotNull (result, "NULL Result"); - } - - public MultiFormatReader GetReader(BarcodeFormat? format, KeyValuePair[] additionalHints) - { - - var reader = new MultiFormatReader(); - - var hints = new Dictionary(); - - if (format.HasValue) - hints.Add(DecodeHintType.POSSIBLE_FORMATS, new List() { format.Value } ); - - - if (additionalHints != null) - foreach (var ah in additionalHints) - hints.Add(ah.Key, ah.Value); - - - reader.Hints = hints; - - return reader; - } - - public BinaryBitmap GetImage(string file) - { - var fullName = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Images", file); - - //Try to find it from the source code folder - if (!System.IO.File.Exists(fullName)) - fullName = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "..", "..", "Images", file); - - var bmp = new System.Drawing.Bitmap(fullName); - - var bin = new ZXing.Common.HybridBinarizer(new RGBLuminanceSource(bmp, bmp.Width, bmp.Height)); - - var i = new BinaryBitmap(bin); - - return i; - } - - Result Decode(string file, BarcodeFormat? format = null, KeyValuePair[] additionalHints = null) - { - var r = GetReader(format, additionalHints); - - var i = GetImage(file); - - var result = r.decode(i); // decode(i); - - return result; - } - } -} diff --git a/Tests/ZXing.Net.Mobile.NUnit/ZXing.Net.Mobile.NUnit.csproj b/Tests/ZXing.Net.Mobile.NUnit/ZXing.Net.Mobile.NUnit.csproj deleted file mode 100644 index 4344fbaea..000000000 --- a/Tests/ZXing.Net.Mobile.NUnit/ZXing.Net.Mobile.NUnit.csproj +++ /dev/null @@ -1,71 +0,0 @@ - - - - Debug - AnyCPU - 12.0.0 - 2.0 - {638781A7-5053-4915-AAEB-0A1FF148180E} - Library - ZXing.Net.Mobile.NUnit - ZXing.Net.Mobile.NUnit - v4.5 - - - true - full - false - bin\Debug - DEBUG; - prompt - 4 - false - - - full - true - bin\Release - prompt - 4 - false - - - - - - - - - - - - - - {24074395-0196-4204-B516-CB6DBA2FC4B9} - zxing.vs2012 - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tests/ZXing.Net.Mobile.Test.sln b/Tests/ZXing.Net.Mobile.Test.sln deleted file mode 100644 index 6d543441c..000000000 --- a/Tests/ZXing.Net.Mobile.Test.sln +++ /dev/null @@ -1,23 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.NUnit", "ZXing.Net.Mobile.NUnit\ZXing.Net.Mobile.NUnit.csproj", "{638781A7-5053-4915-AAEB-0A1FF148180E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {638781A7-5053-4915-AAEB-0A1FF148180E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {638781A7-5053-4915-AAEB-0A1FF148180E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {638781A7-5053-4915-AAEB-0A1FF148180E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {638781A7-5053-4915-AAEB-0A1FF148180E}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(MonoDevelopProperties) = preSolution - StartupItem = ZXing.Net.Mobile.NUnit\ZXing.Net.Mobile.NUnit.csproj - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/UITests/BarcodeDisplayServer/BarcodeDisplayServer.csproj b/UITests/BarcodeDisplayServer/BarcodeDisplayServer.csproj deleted file mode 100644 index 1f5f2a340..000000000 --- a/UITests/BarcodeDisplayServer/BarcodeDisplayServer.csproj +++ /dev/null @@ -1,76 +0,0 @@ - - - - Debug - AnyCPU - {7CBC957B-68E0-45D9-A857-B49E3B0C04B5} - {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Library - BarcodeDisplayServer - BarcodeDisplayServer - v6.0 - True - Resources\Resource.designer.cs - Resource - Properties\AndroidManifest.xml - Resources - Assets - true - - - true - full - false - bin\Debug - DEBUG; - prompt - 4 - false - None - - - true - bin\Release - prompt - 4 - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/UITests/BarcodeDisplayServer/BarcodeDisplayServer.sln b/UITests/BarcodeDisplayServer/BarcodeDisplayServer.sln deleted file mode 100644 index 4b79cb9a5..000000000 --- a/UITests/BarcodeDisplayServer/BarcodeDisplayServer.sln +++ /dev/null @@ -1,17 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BarcodeDisplayServer", "BarcodeDisplayServer.csproj", "{7CBC957B-68E0-45D9-A857-B49E3B0C04B5}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {7CBC957B-68E0-45D9-A857-B49E3B0C04B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7CBC957B-68E0-45D9-A857-B49E3B0C04B5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7CBC957B-68E0-45D9-A857-B49E3B0C04B5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7CBC957B-68E0-45D9-A857-B49E3B0C04B5}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection -EndGlobal diff --git a/UITests/BarcodeDisplayServer/HttpListenerService.cs b/UITests/BarcodeDisplayServer/HttpListenerService.cs deleted file mode 100644 index 6677e352e..000000000 --- a/UITests/BarcodeDisplayServer/HttpListenerService.cs +++ /dev/null @@ -1,111 +0,0 @@ -using System; -using System.Net; -using System.Threading; -using System.Threading.Tasks; -using Android.App; -using Android.Content; - -namespace BarcodeDisplayServer -{ - [BroadcastReceiver] - [IntentFilter (new [] { Intent.ActionBootCompleted })] - public class HttpListenerBootReceiver : BroadcastReceiver - { - // Broadcast receiver to start listener on boot - public override void OnReceive (Context context, Intent intent) - { - context.StartService (new Intent (context, typeof (HttpListenerService))); - } - } - - [Service] - public class HttpListenerService : IntentService - { - static bool running = false; - - protected override void OnHandleIntent (Intent intent) - { - // Make sure server is running - StartHttpServer (); - } - - public override bool StopService (Intent name) - { - // Trigger cancellation token for http listener when service stops - if (ctsHttp != null) - ctsHttp.Cancel (); - running = false; - return base.StopService (name); - } - - HttpListener httpListener; - CancellationTokenSource ctsHttp; - - void ProcessHttpRequest (HttpListenerContext context) - { - try { - string barcodeFormatStr = context.Request?.QueryString? ["format"] ?? "QR_CODE"; - string barcodeValue = context?.Request?.QueryString? ["value"] ?? ""; - string barcodeUrl = context?.Request?.QueryString? ["url"] ?? ""; - - // Pass along the querystring values - var intent = new Android.Content.Intent (this, typeof (MainActivity)); - intent.PutExtra ("FORMAT", barcodeFormatStr); - intent.PutExtra ("VALUE", barcodeValue); - intent.PutExtra ("URL", barcodeUrl); - intent.AddFlags (ActivityFlags.NewTask); - - // Start the activity to show the values - StartActivity (intent); - - // Return a success - context.Response.StatusCode = (int)HttpStatusCode.OK; - context.Response.StatusDescription = "OK"; - context.Response.Close (); - - } catch (Exception e) { - Console.WriteLine ("Error " + e.Message); - - context.Response.StatusCode = (int)HttpStatusCode.InternalServerError; - context.Response.Close (); - } - } - - void StartHttpServer () - { - if (running || httpListener != null) - return; - - running = true; - ctsHttp = new CancellationTokenSource (); - - // Setup our listener - httpListener = new HttpListener (); - httpListener.Prefixes.Add ("http://*:8158/"); - httpListener.Start (); - - var httpTask = Task.Factory.StartNew (() => { - while (!ctsHttp.IsCancellationRequested) { - try { - var httpContext = httpListener.GetContext (); - Task.Run (() => { - ProcessHttpRequest (httpContext); - }); - - } catch (Exception e) { - Android.Util.Log.Error ("BARCODE", "HttpListener Error: {0}", e.Message); - } - } - }, TaskCreationOptions.LongRunning); - - // Stop the listener after cancel token was issued - httpTask.ContinueWith (t => { - if (httpListener != null) - httpListener.Stop (); - httpListener = null; - }); - } - - } -} - diff --git a/UITests/BarcodeDisplayServer/MainActivity.cs b/UITests/BarcodeDisplayServer/MainActivity.cs deleted file mode 100644 index a17f687f5..000000000 --- a/UITests/BarcodeDisplayServer/MainActivity.cs +++ /dev/null @@ -1,96 +0,0 @@ -using Android.App; -using Android.Widget; -using Android.OS; -using Android.Content; - -namespace BarcodeDisplayServer -{ - [Activity (Label = "Barcode Display Server", - ScreenOrientation = Android.Content.PM.ScreenOrientation.Landscape, - LaunchMode = Android.Content.PM.LaunchMode.SingleTop, - MainLauncher = true, - Icon = "@mipmap/icon")] - public class MainActivity : Activity - { - ImageView imageViewBarcode; - - protected override void OnCreate (Bundle savedInstanceState) - { - base.OnCreate (savedInstanceState); - - // Set our view from the "main" layout resource - SetContentView (Resource.Layout.Main); - - imageViewBarcode = FindViewById (Resource.Id.imageViewBarcode); - - StartService (new Intent (this, typeof (HttpListenerService))); - } - - protected override void OnResume () - { - base.OnResume (); - - // Full screen - var opt = Android.Views.SystemUiFlags.LayoutStable - | Android.Views.SystemUiFlags.HideNavigation - | Android.Views.SystemUiFlags.Fullscreen - | Android.Views.SystemUiFlags.LayoutHideNavigation - | Android.Views.SystemUiFlags.LayoutFullscreen - | Android.Views.SystemUiFlags.ImmersiveSticky; - Window.DecorView.SystemUiVisibility = (Android.Views.StatusBarVisibility)opt; - } - - protected override void OnNewIntent (Android.Content.Intent intent) - { - base.OnNewIntent (intent); - - // Get the barcode options from the intent - var barcodeFormat = ZXing.BarcodeFormat.QR_CODE; - if (intent.HasExtra ("FORMAT")) - System.Enum.TryParse (intent.GetStringExtra ("FORMAT"), out barcodeFormat); - - var barcodeValue = string.Empty; - if (intent.HasExtra ("VALUE")) - barcodeValue = intent.GetStringExtra ("VALUE") ?? string.Empty; - - var barcodeUrl = string.Empty; - if (intent.HasExtra ("URL")) - barcodeUrl = intent.GetStringExtra ("URL") ?? string.Empty; - - // Can set from a URL or generate from a format/value - if (!string.IsNullOrEmpty (barcodeUrl)) { - SetBarcode (barcodeUrl); - } else if (!string.IsNullOrEmpty (barcodeValue)) { - SetBarcode (barcodeFormat, barcodeValue); - } - } - - void SetBarcode (string url) - { - Square.Picasso.Picasso.With (this) - .Load (url) - .Into (imageViewBarcode); - } - - void SetBarcode (ZXing.BarcodeFormat format, string value) - { - var w = new ZXing.BarcodeWriter (); - - w.Options = new ZXing.Common.EncodingOptions { - Width = imageViewBarcode.Width, - Height = imageViewBarcode.Height, - }; - w.Format = format; - - try { - using (var bitmap = w.Write (value)) { - imageViewBarcode.SetImageBitmap (bitmap); - } - } catch { - imageViewBarcode.SetImageDrawable (null); - } - } - } -} - - diff --git a/UITests/BarcodeDisplayServer/Properties/AndroidManifest.xml b/UITests/BarcodeDisplayServer/Properties/AndroidManifest.xml deleted file mode 100644 index b3d1eabc8..000000000 --- a/UITests/BarcodeDisplayServer/Properties/AndroidManifest.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/UITests/BarcodeDisplayServer/Properties/AssemblyInfo.cs b/UITests/BarcodeDisplayServer/Properties/AssemblyInfo.cs deleted file mode 100644 index a13ce5c4c..000000000 --- a/UITests/BarcodeDisplayServer/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using Android.App; - -// Information about this assembly is defined by the following attributes. -// Change them to the values specific to your project. - -[assembly: AssemblyTitle ("BarcodeDisplayServer")] -[assembly: AssemblyDescription ("")] -[assembly: AssemblyConfiguration ("")] -[assembly: AssemblyCompany ("Xamarin")] -[assembly: AssemblyProduct ("")] -[assembly: AssemblyCopyright ("Xamarin")] -[assembly: AssemblyTrademark ("")] -[assembly: AssemblyCulture ("")] - -// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". -// The form "{Major}.{Minor}.*" will automatically update the build and revision, -// and "{Major}.{Minor}.{Build}.*" will update just the revision. - -[assembly: AssemblyVersion ("1.0.0")] - -// The following attributes are used to specify the signing key for the assembly, -// if desired. See the Mono documentation for more information about signing. - -//[assembly: AssemblyDelaySign(false)] -//[assembly: AssemblyKeyFile("")] - diff --git a/UITests/BarcodeDisplayServer/Resources/AboutResources.txt b/UITests/BarcodeDisplayServer/Resources/AboutResources.txt deleted file mode 100644 index 10f52d460..000000000 --- a/UITests/BarcodeDisplayServer/Resources/AboutResources.txt +++ /dev/null @@ -1,44 +0,0 @@ -Images, layout descriptions, binary blobs and string dictionaries can be included -in your application as resource files. Various Android APIs are designed to -operate on the resource IDs instead of dealing with images, strings or binary blobs -directly. - -For example, a sample Android app that contains a user interface layout (main.axml), -an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) -would keep its resources in the "Resources" directory of the application: - -Resources/ - drawable/ - icon.png - - layout/ - main.axml - - values/ - strings.xml - -In order to get the build system to recognize Android resources, set the build action to -"AndroidResource". The native Android APIs do not operate directly with filenames, but -instead operate on resource IDs. When you compile an Android application that uses resources, -the build system will package the resources for distribution and generate a class called "R" -(this is an Android convention) that contains the tokens for each one of the resources -included. For example, for the above Resources layout, this is what the R class would expose: - -public class R { - public class drawable { - public const int icon = 0x123; - } - - public class layout { - public const int main = 0x456; - } - - public class strings { - public const int first_string = 0xabc; - public const int second_string = 0xbcd; - } -} - -You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main -to reference the layout/main.axml file, or R.strings.first_string to reference the first -string in the dictionary file values/strings.xml. diff --git a/UITests/BarcodeDisplayServer/Resources/layout/Main.axml b/UITests/BarcodeDisplayServer/Resources/layout/Main.axml deleted file mode 100644 index e68a27f88..000000000 --- a/UITests/BarcodeDisplayServer/Resources/layout/Main.axml +++ /dev/null @@ -1,16 +0,0 @@ - - - - \ No newline at end of file diff --git a/UITests/BarcodeDisplayServer/Resources/mipmap-hdpi/Icon.png b/UITests/BarcodeDisplayServer/Resources/mipmap-hdpi/Icon.png deleted file mode 100644 index f4c804644..000000000 Binary files a/UITests/BarcodeDisplayServer/Resources/mipmap-hdpi/Icon.png and /dev/null differ diff --git a/UITests/BarcodeDisplayServer/Resources/mipmap-mdpi/Icon.png b/UITests/BarcodeDisplayServer/Resources/mipmap-mdpi/Icon.png deleted file mode 100644 index ef1e1ee7d..000000000 Binary files a/UITests/BarcodeDisplayServer/Resources/mipmap-mdpi/Icon.png and /dev/null differ diff --git a/UITests/BarcodeDisplayServer/Resources/mipmap-xhdpi/Icon.png b/UITests/BarcodeDisplayServer/Resources/mipmap-xhdpi/Icon.png deleted file mode 100644 index b7e2e57aa..000000000 Binary files a/UITests/BarcodeDisplayServer/Resources/mipmap-xhdpi/Icon.png and /dev/null differ diff --git a/UITests/BarcodeDisplayServer/Resources/mipmap-xxhdpi/Icon.png b/UITests/BarcodeDisplayServer/Resources/mipmap-xxhdpi/Icon.png deleted file mode 100644 index 8d20a38d1..000000000 Binary files a/UITests/BarcodeDisplayServer/Resources/mipmap-xxhdpi/Icon.png and /dev/null differ diff --git a/UITests/BarcodeDisplayServer/Resources/mipmap-xxxhdpi/Icon.png b/UITests/BarcodeDisplayServer/Resources/mipmap-xxxhdpi/Icon.png deleted file mode 100644 index 6d9919c41..000000000 Binary files a/UITests/BarcodeDisplayServer/Resources/mipmap-xxxhdpi/Icon.png and /dev/null differ diff --git a/UITests/BarcodeDisplayServer/Resources/values/Strings.xml b/UITests/BarcodeDisplayServer/Resources/values/Strings.xml deleted file mode 100644 index 17a5c9ac2..000000000 --- a/UITests/BarcodeDisplayServer/Resources/values/Strings.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - Hello World, Click Me! - BarcodeDisplayServer - diff --git a/UITests/BarcodeDisplayServer/Resources/values/styles.xml b/UITests/BarcodeDisplayServer/Resources/values/styles.xml deleted file mode 100644 index a74217e02..000000000 --- a/UITests/BarcodeDisplayServer/Resources/values/styles.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - diff --git a/UITests/FormsSample.UITests/FormsSample.UITests.csproj b/UITests/FormsSample.UITests/FormsSample.UITests.csproj deleted file mode 100644 index cd5ef7631..000000000 --- a/UITests/FormsSample.UITests/FormsSample.UITests.csproj +++ /dev/null @@ -1,65 +0,0 @@ - - - - Debug - AnyCPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427} - Library - FormsSample.UITests - FormsSample.UITests - v4.5 - - - true - full - false - bin\Debug - DEBUG; - prompt - 4 - false - - - true - bin\Release - prompt - 4 - false - - - - - - - - - - - - {D8248617-D905-4F82-95B4-D4027C20278A} - FormsSample.Droid - False - False - - - {776B89DF-2915-4701-B8A3-127D3340C77F} - FormsSample.iOS - False - False - - - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB} - ZXing.Net.Mobile.Core - - - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3} - zxing.portable - - - - - - - - - \ No newline at end of file diff --git a/UITests/FormsSample.UITests/InitializationTests.cs b/UITests/FormsSample.UITests/InitializationTests.cs deleted file mode 100644 index 6f4900746..000000000 --- a/UITests/FormsSample.UITests/InitializationTests.cs +++ /dev/null @@ -1,106 +0,0 @@ -using NUnit.Framework; -using UITests.Shared; -using Xamarin.UITest; -using UITests.Shared; - -namespace UITests -{ - [TestFixture (Platform.Android)] - [TestFixture (Platform.iOS)] - public class InitializationTests - { - IApp app; - Platform platform; - - public InitializationTests (Platform platform) - { - this.platform = platform; - } - - [SetUp] - public void BeforeEachTest () - { - app = AppInitializer.StartApp ( - platform, - TestConsts.ApkFile, - TestConsts.iOSBundleId); - } - - [TearDown] - public void AfterEachTest () - { - app.ScreenshotIfFailed (); - } - - //[Test] - public void Repl () - { - app.Repl (); - } - - [Test] - public void DefaultOverlay_Initializes () - { - app.Screenshot ("App Launches"); - - app.Tap (q => q.Marked ("scanWithDefaultOverlay")); - - app.WaitForElement (q => q.Marked ("zxingScannerView")); - app.WaitForElement (q => q.Marked ("zxingDefaultOverlay")); - - app.Screenshot ("View Default Overlay"); - } - - [Test] - public void ContinuousScanning_Initializes () - { - app.Screenshot ("App Launches"); - - app.Tap (q => q.Marked ("scanContinuously")); - - app.WaitForElement (q => q.Marked ("zxingScannerView")); - app.WaitForElement (q => q.Marked ("zxingDefaultOverlay")); - - app.Screenshot ("View Continuous Scanner"); - } - - [Test] - public void CustomOverlay_Initializes () - { - app.Screenshot ("App Launches"); - - app.Tap (q => q.Marked ("scanWithCustomOverlay")); - - app.WaitForElement (q => q.Marked ("zxingScannerView")); - app.WaitForElement (q => q.Text ("Toggle Torch")); - - app.Screenshot ("View Custom Overlay Scanner"); - } - - [Test] - public void CustomPage_Initializes () - { - app.Screenshot ("App Launches"); - - app.Tap (q => q.Marked ("scanWithCustomPage")); - - app.WaitForElement (q => q.Marked ("zxingScannerView")); - app.WaitForElement (q => q.Marked ("zxingDefaultOverlay")); - - app.Screenshot ("View Custom Page Scanner"); - } - - [Test] - public void BarcodeGenerator_Initializes () - { - app.Screenshot ("App Launches"); - - app.Tap (q => q.Marked ("barcodeGenerator")); - - app.WaitForElement (q => q.Marked ("zxingBarcodeImageView")); - - app.Screenshot ("View Barcode"); - } - } -} - diff --git a/UITests/FormsSample.UITests/ScanningTests.cs b/UITests/FormsSample.UITests/ScanningTests.cs deleted file mode 100644 index f5a73e617..000000000 --- a/UITests/FormsSample.UITests/ScanningTests.cs +++ /dev/null @@ -1,35 +0,0 @@ -using NUnit.Framework; -using Xamarin.UITest; -using UITests.Shared; - -namespace UITests -{ - [TestFixture (Platform.Android)] - [TestFixture (Platform.iOS)] - public partial class ScanningTests - { - IApp app; - Platform platform; - - public ScanningTests (Platform platform) - { - this.platform = platform; - } - - [SetUp] - public void BeforeEachTest () - { - app = AppInitializer.StartApp ( - platform, - TestConsts.ApkFile, - TestConsts.iOSBundleId); - } - - [TearDown] - public void AfterEachTest () - { - app.ScreenshotIfFailed (); - } - } -} - diff --git a/UITests/FormsSample.UITests/TestConsts.cs b/UITests/FormsSample.UITests/TestConsts.cs deleted file mode 100644 index 5fd80c260..000000000 --- a/UITests/FormsSample.UITests/TestConsts.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -namespace UITests -{ - public static class TestConsts - { - public const string ApkFile = "../../../../Samples/Forms/Droid/bin/Release/com.zxing.formssample.apk"; - public const string iOSBundleId = "com.zxing.net.mobile.sample"; - } -} - diff --git a/UITests/Sample.Android.UITests/InitializationTests.cs b/UITests/Sample.Android.UITests/InitializationTests.cs deleted file mode 100644 index a372eb22e..000000000 --- a/UITests/Sample.Android.UITests/InitializationTests.cs +++ /dev/null @@ -1,101 +0,0 @@ -using NUnit.Framework; -using Xamarin.UITest; -using Xamarin.UITest.Android; -using UITests.Shared; - -namespace UITests -{ - [TestFixture] - public class InitializationTests - { - AndroidApp app; - Platform platform = Platform.Android; - - [SetUp] - public void BeforeEachTest () - { - app = (AndroidApp)AppInitializer.StartApp ( - platform, - TestConsts.ApkFile, - null); - - app.WakeUpAndroidDevice (); - } - - [TearDown] - public void AfterEachTest () - { - app.ScreenshotIfFailed (); - } - - // [Test] - public void Repl () - { - app.Repl (); - } - - [Test] - public void DefaultOverlay_Initializes () - { - app.TakeScreenshot ("App Launches"); - - app.Tap (q => q.Id ("buttonScanDefaultView")); - - app.WaitForElement (q => q.Class ("ZXingSurfaceView")); - app.WaitForElement (q => q.Class ("ZxingOverlayView")); - - app.TakeScreenshot ("View Default Scanner"); - } - - [Test] - public void ContinuousScanning_Initializes () - { - app.TakeScreenshot ("App Launches"); - - app.Tap (q => q.Id ("buttonScanContinuous")); - - app.WaitForElement (q => q.Class ("ZXingSurfaceView")); - app.WaitForElement (q => q.Class ("ZxingOverlayView")); - - app.TakeScreenshot ("View Continuous Scanner"); - } - - [Test] - public void CustomOverlay_Initializes () - { - app.TakeScreenshot ("App Launches"); - - app.Tap (q => q.Id ("buttonScanCustomView")); - - app.WaitForElement (q => q.Class ("ZXingSurfaceView")); - app.WaitForElement (q => q.Text ("Place a barcode in the camera viewfinder to scan it. Barcode will scan Automatically.")); - - app.TakeScreenshot ("View Custom Overlay Scanner"); - } - - [Test] - public void FragmentScanner_Initializes () - { - app.TakeScreenshot ("App Launches"); - - app.Tap (q => q.Id ("buttonFragment")); - - app.WaitForElement (q => q.Class ("ZXingSurfaceView")); - app.WaitForElement (q => q.Class ("ZxingOverlayView")); - - app.TakeScreenshot ("View Fragment Scanner"); - } - - [Test] - public void BarcodeGenerator_Initializes () - { - app.TakeScreenshot ("App Launches"); - - app.Tap (q => q.Id ("buttonGenerate")); - - app.WaitForElement (q => q.Class ("ImageView").Id ("imageBarcode")); - - app.TakeScreenshot ("View Barcode Generator"); - } - } -} diff --git a/UITests/Sample.Android.UITests/Sample.Android.UITests.csproj b/UITests/Sample.Android.UITests/Sample.Android.UITests.csproj deleted file mode 100644 index e93145104..000000000 --- a/UITests/Sample.Android.UITests/Sample.Android.UITests.csproj +++ /dev/null @@ -1,59 +0,0 @@ - - - - Debug - AnyCPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A} - Library - Sample.Android.UITests - Sample.Android.UITests - v4.5 - - - true - full - false - bin\Debug - DEBUG; - prompt - 4 - false - - - true - bin\Release - prompt - 4 - false - - - - - - - - - - - - {660D9346-D70B-4C54-8402-E5F6DF48E9AC} - Sample.Android - False - False - - - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3} - zxing.portable - - - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB} - ZXing.Net.Mobile.Core - - - - - - - - - \ No newline at end of file diff --git a/UITests/Sample.Android.UITests/ScanningTests.cs b/UITests/Sample.Android.UITests/ScanningTests.cs deleted file mode 100644 index efa0f6acb..000000000 --- a/UITests/Sample.Android.UITests/ScanningTests.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using NUnit.Framework; -using Xamarin.UITest; -using Xamarin.UITest.Android; -using UITests.Shared; - -namespace UITests -{ - [TestFixture] - public partial class ScanningTests - { - AndroidApp app; - Platform platform = Platform.Android; - - [SetUp] - public void BeforeEachTest () - { - app = (AndroidApp)AppInitializer.StartApp ( - platform, - TestConsts.ApkFile, - null); - - app.WakeUpAndroidDevice (); - } - - [TearDown] - public void AfterEachTest () - { - app.ScreenshotIfFailed (); - } - } -} diff --git a/UITests/Sample.Android.UITests/TestConsts.cs b/UITests/Sample.Android.UITests/TestConsts.cs deleted file mode 100644 index 8b287346c..000000000 --- a/UITests/Sample.Android.UITests/TestConsts.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace UITests -{ - public static class TestConsts - { - public const string ApkFile = "../../../../Samples/Android/Sample.Android/bin/Release/com.altusapps.zxingnetmobile.apk"; - } -} diff --git a/UITests/Sample.iOS.UITests/InitializationTests.cs b/UITests/Sample.iOS.UITests/InitializationTests.cs deleted file mode 100644 index 3c88dedfb..000000000 --- a/UITests/Sample.iOS.UITests/InitializationTests.cs +++ /dev/null @@ -1,101 +0,0 @@ -using NUnit.Framework; -using UITests.Shared; -using Xamarin.UITest; -using Xamarin.UITest.iOS; -using UITests.Shared; - -namespace UITests -{ - [TestFixture] - public class Tests - { - iOSApp app; - Platform platform = Platform.iOS; - - [SetUp] - public void BeforeEachTest () - { - app = (iOSApp) AppInitializer.StartApp ( - platform, - null, - TestConsts.iOSBundleId); - } - - [TearDown] - public void AfterEachTest () - { - app.ScreenshotIfFailed (); - } - - //[Test] - public void Repl () - { - app.Repl (); - } - - [Test] - public void DefaultOverlay_Initializes () - { - app.TakeScreenshot ("App Launches"); - - app.Tap (q => q.Marked ("Scan with Default View")); - - app.WaitForElement (q => q.Class ("ZXing_Mobile_ZXingScannerView")); - app.WaitForElement (q => q.Class ("ZXing_Mobile_ZXingDefaultOverlayView")); - - app.TakeScreenshot ("View Default Overlay"); - } - - [Test] - public void ContinuousScanning_Initializes () - { - app.TakeScreenshot ("App Launches"); - - app.Tap (q => q.Marked ("Scan Continuously")); - - app.WaitForElement (q => q.Class ("ZXing_Mobile_AVCaptureScannerView")); - app.WaitForElement (q => q.Class ("ZXing_Mobile_ZXingDefaultOverlayView")); - - app.TakeScreenshot ("View Continuous Scanner"); - } - - [Test] - public void CustomOverlay_Initializes () - { - app.TakeScreenshot ("App Launches"); - - app.Tap (q => q.Marked ("Scan with Custom View")); - - app.WaitForElement (q => q.Class ("ZXing_Mobile_ZXingScannerView")); - app.WaitForElement (q => q.Text ("Torch")); - - app.TakeScreenshot ("View Custom Overlay Scanner"); - } - - [Test] - public void AVCaptureEngine_Initializes () - { - app.TakeScreenshot ("App Launches"); - - app.Tap (q => q.Marked ("Scan with AVCapture Engine")); - - app.WaitForElement (q => q.Class ("ZXing_Mobile_AVCaptureScannerView")); - app.WaitForElement (q => q.Class ("ZXing_Mobile_ZXingDefaultOverlayView")); - - app.TakeScreenshot ("View AVCaptureEngine Scanner"); - } - - [Test] - public void BarcodeGenerator_Initializes () - { - app.TakeScreenshot ("App Launches"); - - app.Tap (q => q.Marked ("Generate Barcode")); - - app.WaitForElement (q => q.Class ("UIImageView")); - - app.TakeScreenshot ("View Barcode"); - } - } -} - diff --git a/UITests/Sample.iOS.UITests/Sample.iOS.UITests.csproj b/UITests/Sample.iOS.UITests/Sample.iOS.UITests.csproj deleted file mode 100644 index e4425bafb..000000000 --- a/UITests/Sample.iOS.UITests/Sample.iOS.UITests.csproj +++ /dev/null @@ -1,59 +0,0 @@ - - - - Debug - AnyCPU - {F60C523B-54E7-4283-95A8-01E405E55024} - Library - Sample.iOS.UITests - Sample.iOS.UITests - v4.5 - - - true - full - false - bin\Debug - DEBUG; - prompt - 4 - false - - - true - bin\Release - prompt - 4 - false - - - - - - - - - - - - {D119965B-BA8F-40D7-86B4-E9654E1014E2} - Sample.iOS - False - False - - - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3} - zxing.portable - - - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB} - ZXing.Net.Mobile.Core - - - - - - - - - \ No newline at end of file diff --git a/UITests/Sample.iOS.UITests/ScanningTests.cs b/UITests/Sample.iOS.UITests/ScanningTests.cs deleted file mode 100644 index a6ac7a6ad..000000000 --- a/UITests/Sample.iOS.UITests/ScanningTests.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using NUnit.Framework; -using Xamarin.UITest; -using Xamarin.UITest.Android; -using UITests.Shared; - -namespace UITests -{ - [TestFixture] - public partial class ScanningTests - { - AndroidApp app; - Platform platform = Platform.iOS; - - [SetUp] - public void BeforeEachTest () - { - app = (AndroidApp)AppInitializer.StartApp ( - platform, - null, - TestConsts.iOSBundleId); - } - - [TearDown] - public void AfterEachTest () - { - app.ScreenshotIfFailed (); - } - } -} diff --git a/UITests/Sample.iOS.UITests/TestConsts.cs b/UITests/Sample.iOS.UITests/TestConsts.cs deleted file mode 100644 index 17dcf7dfd..000000000 --- a/UITests/Sample.iOS.UITests/TestConsts.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace UITests -{ - public static class TestConsts - { - public const string iOSBundleId = "com.zxing.net.mobile.sample"; - } -} diff --git a/UITests/UITests.Shared/AppInitializer.cs b/UITests/UITests.Shared/AppInitializer.cs deleted file mode 100644 index f4939cf73..000000000 --- a/UITests/UITests.Shared/AppInitializer.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.IO; -using System.Linq; -using Xamarin.UITest; -using Xamarin.UITest.Queries; - -namespace UITests -{ - public class AppInitializer - { - public static IApp StartApp (Platform platform, string apkFile, string iosBundleId) - { - var deviceId = Environment.GetEnvironmentVariable ("XTC_DEVICE_ID") ?? ""; - - Console.WriteLine ("Using Device: " + deviceId); - - if (platform == Platform.Android) { - return ConfigureApp - .Android - .EnableLocalScreenshots () - .PreferIdeSettings () - .DeviceSerial (deviceId) - .ApkFile (apkFile) - .StartApp (); - } - - return ConfigureApp - .iOS - .EnableLocalScreenshots () - .PreferIdeSettings () - .DeviceIdentifier (deviceId) - .InstalledApp (iosBundleId) - .StartApp (); - } - } -} - diff --git a/UITests/UITests.Shared/ScanningTests.cs b/UITests/UITests.Shared/ScanningTests.cs deleted file mode 100644 index 8d2ae54f7..000000000 --- a/UITests/UITests.Shared/ScanningTests.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using NUnit.Framework; -using UITests.Shared; -using ZXing; - -namespace UITests -{ - public partial class ScanningTests - { - [Test] - public void Scan_QRCode_Succeeds () - { - const BarcodeFormat FORMAT = BarcodeFormat.QR_CODE; - const string VALUE = "Xamarin"; - - app.DisplayBarcode (FORMAT, VALUE); - app.InvokeScanner (FORMAT, platform); - - app.AssertUITestBackdoorResult (FORMAT, VALUE); - } - - [Test] - public void Scan_PDF417_Succeeds () - { - const BarcodeFormat FORMAT = BarcodeFormat.PDF_417; - const string VALUE = "Xamarin"; - - app.DisplayBarcode (FORMAT, VALUE); - app.InvokeScanner (FORMAT, platform); - - app.AssertUITestBackdoorResult (FORMAT, VALUE); - } - } -} - diff --git a/UITests/UITests.Shared/UITests.Shared.projitems b/UITests/UITests.Shared/UITests.Shared.projitems deleted file mode 100644 index d06465478..000000000 --- a/UITests/UITests.Shared/UITests.Shared.projitems +++ /dev/null @@ -1,16 +0,0 @@ - - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - true - {EB5B7B11-23D4-4427-B016-DAE1E79A77FD} - - - UITests.Shared - - - - - - - \ No newline at end of file diff --git a/UITests/UITests.Shared/UITests.Shared.shproj b/UITests/UITests.Shared/UITests.Shared.shproj deleted file mode 100644 index e298ace80..000000000 --- a/UITests/UITests.Shared/UITests.Shared.shproj +++ /dev/null @@ -1,11 +0,0 @@ - - - - {EB5B7B11-23D4-4427-B016-DAE1E79A77FD} - - - - - - - \ No newline at end of file diff --git a/UITests/UITests.Shared/Util.cs b/UITests/UITests.Shared/Util.cs deleted file mode 100644 index c47ee6cd7..000000000 --- a/UITests/UITests.Shared/Util.cs +++ /dev/null @@ -1,159 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Runtime.CompilerServices; -using NUnit.Framework; -using ZXing; - -namespace UITests.Shared -{ - public static class AppExtensions - { - public static void TakeScreenshot (this Xamarin.UITest.IApp app, string title, [CallerMemberName] string methodName = null) - { - var file = app.Screenshot (title); - - // Don't rename files if we're running in testcloud - if (Xamarin.UITest.TestEnvironment.IsTestCloud) - return; - - var method = new StackTrace ().GetFrame (1).GetMethod (); - string className = method.ReflectedType.Name; - string namespaceName = method.ReflectedType.Namespace; - - - var baseDir = Environment.GetEnvironmentVariable ("UITEST_SCREENSHOT_PATH") ?? AppDomain.CurrentDomain.BaseDirectory; - var newFile = string.Format ("{0}-{1}.jpg", methodName, title); - - var newSubDir = Path.Combine (app.Device.DeviceIdentifier, namespaceName, className); - var newDir = Path.Combine (baseDir, newSubDir); - - var fullPath = Path.Combine (newDir, newFile); - - Directory.CreateDirectory (newDir); - - Console.WriteLine ("Moving Screenshot -> " + fullPath); - - try { - if (File.Exists (fullPath)) - File.Delete (fullPath); - } catch { } - - file.MoveTo (fullPath); - } - - public static void WakeUpAndroidDevice (this Xamarin.UITest.IApp app) - { - // Test Cloud will handle this for us - if (Xamarin.UITest.TestEnvironment.IsTestCloud) - return; - - var adbExe = "adb"; - var ext = IsUnix () ? "" : ".exe"; - var androidHome = Environment.GetEnvironmentVariable ("ANDROID_HOME"); - if (!string.IsNullOrEmpty (androidHome) && Directory.Exists (androidHome)) - adbExe = Path.Combine (androidHome, "platform-tools", "adb" + ext); - - if (!File.Exists (adbExe)) - return; - - //get dumpsys for power stats which includes screen on/off info - string power = RunProcess (adbExe, "-s " + app.Device.DeviceIdentifier + " shell dumpsys power"); - - //checks if screen is on/off. Two versions for different android versions. - if (power.Contains ("mScreenOn=false") || power.Contains ("Display Power: state=OFF")) { - //Sends keycode for power on - RunProcess (adbExe, "-s " + app.Device.DeviceIdentifier + " shell input keyevent 26"); - //Sends keycode for menu button. This will unlock stock android lockscreen. - //Does nothing if lockscreen is disabled - RunProcess (adbExe, "-s " + app.Device.DeviceIdentifier + " shell input keyevent 82"); - } - } - - public static void ScreenshotIfFailed (this Xamarin.UITest.IApp app) - { - var status = TestContext.CurrentContext?.Result?.Status ?? TestStatus.Inconclusive; - - if (status == TestStatus.Failed) { - try { - app.TakeScreenshot ("Failure", TestContext.CurrentContext.Test.Name); - } catch { } - } - } - - public static bool IsUnix () - { - var platform = (int)Environment.OSVersion.Platform; - if (platform == (int)PlatformID.MacOSX) - return true; - if (platform == 4 || platform == 6 || platform == 128) - return true; - return false; - } - - public static string RunProcess (string executable, string args) - { - Console.WriteLine ("RunProcess -> " + executable + " " + args); - - var p = Process.Start (new ProcessStartInfo { - RedirectStandardOutput = true, - UseShellExecute = false, - FileName = executable, - Arguments = args - }); - - p.WaitForExit (10000); - return p.StandardOutput.ReadToEnd (); - } - - public static void DisplayBarcode (this Xamarin.UITest.IApp app, string url) - { - var host = Environment.GetEnvironmentVariable ("BARCODE_SERVER_URL") ?? "http://localhost:8158"; - var fullUrl = host + "?url=" + System.Net.WebUtility.UrlEncode (url); - - Console.WriteLine ("DisplayBarcode -> " + fullUrl); - - var webClient = new System.Net.WebClient (); - webClient.DownloadString (fullUrl); - } - - public static void DisplayBarcode (this Xamarin.UITest.IApp app, BarcodeFormat format, string value) - { - var host = Environment.GetEnvironmentVariable ("BARCODE_SERVER_URL"); - if (string.IsNullOrEmpty (host)) { - Console.WriteLine ("No Barcode Display Server specified, skipping..."); - return; - } - var fullUrl = host + "?format=" + System.Net.WebUtility.UrlEncode (format.ToString ()) + "&value=" + System.Net.WebUtility.UrlEncode (value); - - Console.WriteLine ("DisplayBarcode -> " + fullUrl); - - var webClient = new System.Net.WebClient (); - webClient.DownloadString (fullUrl); - } - - public static void InvokeScanner (this Xamarin.UITest.IApp app, BarcodeFormat format, Xamarin.UITest.Platform platform) - { - if (platform == Xamarin.UITest.Platform.iOS) - app.Invoke ("UITestBackdoorScan:", format.ToString ()); - else - app.Invoke ("UITestBackdoorScan", format.ToString ()); - } - - public static void AssertUITestBackdoorResult (this Xamarin.UITest.IApp app, BarcodeFormat format, string value) - { - // First wait for the result - app.WaitForElement (q => q.Marked ("Barcode Result"), "Barcode not scanned, no result found", TimeSpan.FromSeconds (10)); - - app.TakeScreenshot ("Scan Result Found"); - - var result = app.Query (q => q.Marked (format + "|" + value)); - - Assert.AreEqual (1, result.Count ()); - - app.Tap (q => q.Marked ("OK")); - } - } -} diff --git a/UITests/build.cake b/UITests/build.cake deleted file mode 100644 index 0e87c8e20..000000000 --- a/UITests/build.cake +++ /dev/null @@ -1,127 +0,0 @@ -#tool nuget:?package=NUnit.Runners&version=2.6.4 -#tool nuget:?package=Xamarin.UITest&version=2.0.8 -#addin nuget:?package=Cake.Xamarin - -var TARGET = Argument ("target", Argument ("t", "Default")); - -var ANDROID_DEVICES = (EnvironmentVariable ("ANDROID_DEVICES") ?? "").Split (';'); -var IOS_DEVICES = (EnvironmentVariable ("IOS_DEVICES") ?? "").Split (';'); -var NUNIT_PATH = GetFiles ("../packages/**/nunit.framework.dll").FirstOrDefault (); - -Task ("Samples").Does (() => -{ - EnsureDirectoryExists ("../output"); - - var sampleSlns = new Dictionary (); - sampleSlns.Add ("../ZXing.Net.Mobile.sln", "ReleaseMac"); - sampleSlns.Add ("../ZXing.Net.Mobile.Forms.sln", "ReleaseMac"); - sampleSlns.Add ("../Samples/Android/Sample.Android.sln", "Release"); - sampleSlns.Add ("../Samples/iOS/Sample.iOS.sln", "Release"); - sampleSlns.Add ("../Samples/Forms/Sample.Forms.Mac.sln", "Release"); - sampleSlns.Add ("../ZXing.Net.Mobile.UITests.sln", "Release"); - - foreach (var sln in sampleSlns) { - NuGetRestore (sln.Key); - DotNetBuild (sln.Key, c => c.Configuration = sln.Value); - } -}); - -Task ("Android.UITests") - .IsDependentOn ("Samples") - .Does (() => -{ - var uitests = "./Sample.Android.UITests/bin/Release/Sample.Android.UITests.dll"; - - var apk = AndroidPackage ("../Samples/Android/Sample.Android/Sample.Android.csproj", false, c => c.Configuration = "Release"); - Information ("APK: {0}", apk); - - foreach (var device in ANDROID_DEVICES) { - System.Environment.SetEnvironmentVariable ("XTC_DEVICE_ID", device); - Information ("Running Tests on: {0}", device); - UITest (uitests, new NUnitSettings { ResultsFile = "../output/UITestResult-Android-" + device + ".xml" }); - } -}); - -Task ("iOS.UITests") - .IsDependentOn ("Samples") - .Does (() => -{ - var uitests = "./Sample.iOS.UITests/bin/Debug/Sample.iOS.UITests.dll"; - - DotNetBuild ("../Samples/iOS/Sample.iOS.sln", c => { - c.Configuration = "Release"; - c.Properties ["Platform"] = new [] { "iPhone" }; - }); - - foreach (var device in IOS_DEVICES) { - System.Environment.SetEnvironmentVariable ("XTC_DEVICE_ID", device); - Information ("Running Tests on: {0}", device); - - // Use ios-deploy app to install the iOS .app to device first - // UITest requires it be already installed - // To get ios-deploy: - // brew install node - // npm install -g ios-deploy - StartProcess ("ios-deploy", new ProcessSettings { - Arguments = string.Format ("--uninstall --id \"{0}\" --bundle \"{1}\"", - device, - "../Samples/iOS/Sample.iOS/bin/iPhone/Release/ZXingNetMobileiOSSample.app") - }); - - UITest (uitests, new NUnitSettings { ResultsFile = "../output/UITestResult-iOS-" + device + ".xml" }); - } -}); - -Task ("Forms.Android.UITests") - .IsDependentOn ("Samples") - .Does (() => -{ - var uitests = "./FormsSample.UITests/bin/Debug/FormsSample.UITests.dll"; - - var apk = AndroidPackage ("../Samples/Forms/Droid/FormsSample.Droid.csproj", false, c => c.Configuration = "Release"); - Information ("APK: {0}", apk); - - foreach (var device in ANDROID_DEVICES) { - System.Environment.SetEnvironmentVariable ("XTC_DEVICE_ID", device); - Information ("Running Tests on: {0}", device); - UITest (uitests, new NUnitSettings { ResultsFile = "../output/UITestResult-FormsAndroid-" + device + ".xml" }); - } -}); - -Task ("Forms.iOS.UITests") - .IsDependentOn ("Samples") - .Does (() => -{ - var uitests = "./FormsSample.UITests/bin/Debug/FormsSample.UITests.dll"; - - DotNetBuild ("../Samples/Forms/iOS/FormsSample.iOS.csproj", c => { - c.Configuration = "Release"; - c.Properties ["Platform"] = new [] { "iPhone" }; - }); - - foreach (var device in IOS_DEVICES) { - System.Environment.SetEnvironmentVariable ("XTC_DEVICE_ID", device); - Information ("Running Tests on: {0}", device); - - // Use ios-deploy app to install the iOS .app to device first - // UITest requires it be already installed - // To get ios-deploy: - // brew install node - // npm install -g ios-deploy - StartProcess ("ios-deploy", new ProcessSettings { - Arguments = string.Format ("--uninstall --id \"{0}\" --bundle \"{1}\"", - device, - "../Samples/Forms/iOS/bin/iPhone/Release/FormsSampleiOS.app") - }); - - UITest (uitests, new NUnitSettings { ResultsFile = "../output/UITestResult-FormsiOS-" + device + ".xml" }); - } -}); - -Task ("All.UITests") - .IsDependentOn ("Android.UITests") - .IsDependentOn ("iOS.UITests") - .IsDependentOn ("Forms.Android.UITests") - .IsDependentOn ("Forms.iOS.UITests"); - -RunTarget (TARGET); \ No newline at end of file diff --git a/ZXing.Net.Mobile.Forms.nuspec b/ZXing.Net.Mobile.Forms.nuspec deleted file mode 100644 index fd33a5b94..000000000 --- a/ZXing.Net.Mobile.Forms.nuspec +++ /dev/null @@ -1,85 +0,0 @@ - - - - ZXing.Net.Mobile.Forms - $version$ - ZXing.Net.Mobile Barcode Scanner for Xamarin.Forms - Redth - http://raw.github.com/Redth/ZXing.Net.Mobile/master/License.md - http://github.com/Redth/ZXing.Net.Mobile - http://raw.github.com/Redth/ZXing.Net.Mobile/master/Art/ZXing.Net.Mobile-Icon.png - false - - ZXing.Net.Mobile is a C#/.NET library based on the open source Barcode Library: ZXing (Zebra Crossing), using the ZXing.Net Port. It works with Xamarin.iOS, Xamarin.Android, Windows Phone (Silverlight), and Windows Universal. The goal of ZXing.Net.Mobile is to make scanning barcodes as effortless and painless as possible in your own applications. - - See https://github.com/Redth/ZXing.Net.Mobile/releases for release notes. - - ZXing Barcode Scanning for your Xamarin.iOS, Xamarin.Android, Windows Phone (Silverlight), and Windows Universal apps! - - barcode, zxing, zxing.net, qr, scan, scanning, scanner - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ZXing.Net.Mobile.Forms.sln b/ZXing.Net.Mobile.Forms.sln deleted file mode 100644 index d02f75e2e..000000000 --- a/ZXing.Net.Mobile.Forms.sln +++ /dev/null @@ -1,598 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26228.9 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{2DC0C8D5-DF7F-4D96-886D-D7E83522C9BF}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "zxing.portable", "Source\ZXing.Net\Source\lib\zxing.portable.csproj", "{24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Android", "Source\ZXing.Net.Mobile.Android\ZXing.Net.Mobile.Android.csproj", "{AC17589E-C817-4FA8-B3EC-CCEB25E55E59}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.iOS", "Source\ZXing.Net.Mobile.iOS\ZXing.Net.Mobile.iOS.csproj", "{6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.WindowsUniversal", "Source\ZXing.Net.Mobile.WindowsUniversal\ZXing.Net.Mobile.WindowsUniversal.csproj", "{1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.WindowsRT", "Source\ZXing.Net.Mobile.WindowsRT\ZXing.Net.Mobile.WindowsRT.csproj", "{10EB06B2-7231-40DF-8930-7781C82B65DB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Portable", "Source\ZXing.Net.Mobile.Portable\ZXing.Net.Mobile.Portable.csproj", "{78407906-99C6-42B0-A511-973FC78C58CB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Core", "Source\ZXing.Net.Mobile.Core\ZXing.Net.Mobile.Core.csproj", "{7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Forms Libraries", "Forms Libraries", "{72EC3146-EA1B-4963-9248-55065728AF7F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Forms", "Source\ZXing.Net.Mobile.Forms\ZXing.Net.Mobile.Forms.csproj", "{8E54DB74-C094-4016-859A-D1C7F2509A58}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Forms.Android", "Source\ZXing.Net.Mobile.Forms.Android\ZXing.Net.Mobile.Forms.Android.csproj", "{DC2FF2AE-4090-4056-BBE4-087BDE6567BD}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Forms.WindowsUniversal", "Source\ZXing.Net.Mobile.Forms.WindowsUniversal\ZXing.Net.Mobile.Forms.WindowsUniversal.csproj", "{C785F56E-0D1D-492C-850B-4D882314F29B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Forms.iOS", "Source\ZXing.Net.Mobile.Forms.iOS\ZXing.Net.Mobile.Forms.iOS.csproj", "{8370ADB4-229C-4DEC-908F-B1A8FC155523}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|ARM = Debug|ARM - Debug|iPhone = Debug|iPhone - Debug|iPhoneSimulator = Debug|iPhoneSimulator - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|ARM = Release|ARM - Release|iPhone = Release|iPhone - Release|iPhoneSimulator = Release|iPhoneSimulator - Release|x64 = Release|x64 - Release|x86 = Release|x86 - ReleaseMac|Any CPU = ReleaseMac|Any CPU - ReleaseMac|ARM = ReleaseMac|ARM - ReleaseMac|iPhone = ReleaseMac|iPhone - ReleaseMac|iPhoneSimulator = ReleaseMac|iPhoneSimulator - ReleaseMac|x64 = ReleaseMac|x64 - ReleaseMac|x86 = ReleaseMac|x86 - ReleaseWin|Any CPU = ReleaseWin|Any CPU - ReleaseWin|ARM = ReleaseWin|ARM - ReleaseWin|iPhone = ReleaseWin|iPhone - ReleaseWin|iPhoneSimulator = ReleaseWin|iPhoneSimulator - ReleaseWin|x64 = ReleaseWin|x64 - ReleaseWin|x86 = ReleaseWin|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|ARM.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|ARM.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|iPhone.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|x64.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|x64.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|x86.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|x86.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|Any CPU.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|ARM.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|ARM.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|iPhone.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|iPhone.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|x64.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|x64.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|x86.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|x86.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|ARM.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|ARM.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|iPhone.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|iPhone.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|iPhoneSimulator.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|x64.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|x64.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|x86.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|x86.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|Any CPU.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|Any CPU.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|ARM.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|ARM.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|iPhone.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|iPhone.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|iPhoneSimulator.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|x64.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|x64.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|x86.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|x86.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|ARM.ActiveCfg = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|ARM.Build.0 = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|iPhone.Build.0 = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|x64.ActiveCfg = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|x64.Build.0 = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|x86.ActiveCfg = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|x86.Build.0 = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|Any CPU.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|ARM.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|ARM.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|iPhone.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|iPhone.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|x64.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|x64.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|x86.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|x86.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseMac|ARM.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseMac|ARM.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseMac|iPhone.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseMac|iPhone.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseMac|iPhoneSimulator.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseMac|x64.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseMac|x64.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseMac|x86.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseMac|x86.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseWin|Any CPU.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseWin|Any CPU.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseWin|ARM.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseWin|ARM.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseWin|iPhone.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseWin|iPhone.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseWin|iPhoneSimulator.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseWin|x64.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseWin|x64.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseWin|x86.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseWin|x86.Build.0 = Release|Any CPU - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|Any CPU.ActiveCfg = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|Any CPU.Build.0 = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|ARM.ActiveCfg = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|iPhone.ActiveCfg = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|iPhone.Build.0 = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|x64.ActiveCfg = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|x86.ActiveCfg = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|Any CPU.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|Any CPU.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|ARM.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|iPhone.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|iPhone.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|x64.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|x86.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseMac|Any CPU.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseMac|Any CPU.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseMac|ARM.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseMac|ARM.Build.0 = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseMac|iPhone.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseMac|iPhone.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseMac|iPhoneSimulator.Build.0 = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseMac|x64.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseMac|x64.Build.0 = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseMac|x86.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseMac|x86.Build.0 = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseWin|Any CPU.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseWin|Any CPU.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseWin|ARM.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseWin|ARM.Build.0 = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseWin|iPhone.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseWin|iPhone.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseWin|iPhoneSimulator.Build.0 = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseWin|x64.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseWin|x64.Build.0 = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseWin|x86.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseWin|x86.Build.0 = Release|iPhoneSimulator - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|ARM.ActiveCfg = Debug|ARM - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|ARM.Build.0 = Debug|ARM - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|iPhone.Build.0 = Debug|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|x64.ActiveCfg = Debug|x64 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|x64.Build.0 = Debug|x64 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|x86.ActiveCfg = Debug|x86 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|x86.Build.0 = Debug|x86 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|Any CPU.Build.0 = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|ARM.ActiveCfg = Release|ARM - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|ARM.Build.0 = Release|ARM - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|iPhone.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|iPhone.Build.0 = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|x64.ActiveCfg = Release|x64 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|x64.Build.0 = Release|x64 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|x86.ActiveCfg = Release|x86 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|x86.Build.0 = Release|x86 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseMac|ARM.ActiveCfg = Release|ARM - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseMac|ARM.Build.0 = Release|ARM - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseMac|iPhone.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseMac|iPhone.Build.0 = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseMac|iPhoneSimulator.Build.0 = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseMac|x64.ActiveCfg = Release|x64 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseMac|x64.Build.0 = Release|x64 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseMac|x86.ActiveCfg = Release|x86 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseMac|x86.Build.0 = Release|x86 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseWin|Any CPU.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseWin|Any CPU.Build.0 = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseWin|ARM.ActiveCfg = Release|ARM - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseWin|ARM.Build.0 = Release|ARM - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseWin|iPhone.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseWin|iPhone.Build.0 = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseWin|iPhoneSimulator.Build.0 = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseWin|x64.ActiveCfg = Release|x64 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseWin|x64.Build.0 = Release|x64 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseWin|x86.ActiveCfg = Release|x86 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseWin|x86.Build.0 = Release|x86 - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|ARM.ActiveCfg = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|ARM.Build.0 = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|iPhone.Build.0 = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|x64.ActiveCfg = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|x64.Build.0 = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|x86.ActiveCfg = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|x86.Build.0 = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|Any CPU.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|ARM.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|ARM.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|iPhone.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|iPhone.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|x64.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|x64.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|x86.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|x86.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|ARM.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|ARM.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|iPhone.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|iPhone.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|iPhoneSimulator.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|x64.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|x64.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|x86.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|x86.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|Any CPU.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|Any CPU.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|ARM.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|ARM.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|iPhone.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|iPhone.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|iPhoneSimulator.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|x64.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|x64.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|x86.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|x86.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|ARM.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|ARM.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|iPhone.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|x64.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|x64.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|x86.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|x86.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|Any CPU.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|ARM.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|ARM.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|iPhone.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|iPhone.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|x64.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|x64.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|x86.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|x86.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|ARM.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|ARM.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|iPhone.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|iPhone.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|iPhoneSimulator.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|x64.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|x64.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|x86.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|x86.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|Any CPU.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|Any CPU.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|ARM.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|ARM.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|iPhone.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|iPhone.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|iPhoneSimulator.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|x64.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|x64.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|x86.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|x86.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|ARM.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|ARM.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|iPhone.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|x64.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|x64.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|x86.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|x86.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|Any CPU.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|ARM.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|ARM.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|iPhone.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|iPhone.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|x64.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|x64.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|x86.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|x86.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|ARM.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|ARM.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|iPhone.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|iPhone.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|iPhoneSimulator.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|x64.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|x64.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|x86.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|x86.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|Any CPU.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|Any CPU.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|ARM.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|ARM.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|iPhone.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|iPhone.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|iPhoneSimulator.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|x64.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|x64.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|x86.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|x86.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|ARM.ActiveCfg = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|ARM.Build.0 = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|iPhone.Build.0 = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|x64.ActiveCfg = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|x64.Build.0 = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|x86.ActiveCfg = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|x86.Build.0 = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|Any CPU.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|ARM.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|ARM.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|iPhone.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|iPhone.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|x64.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|x64.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|x86.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|x86.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseMac|ARM.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseMac|ARM.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseMac|iPhone.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseMac|iPhone.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseMac|iPhoneSimulator.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseMac|x64.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseMac|x64.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseMac|x86.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseMac|x86.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseWin|Any CPU.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseWin|Any CPU.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseWin|ARM.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseWin|ARM.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseWin|iPhone.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseWin|iPhone.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseWin|iPhoneSimulator.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseWin|x64.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseWin|x64.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseWin|x86.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseWin|x86.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Debug|ARM.ActiveCfg = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Debug|ARM.Build.0 = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Debug|iPhone.Build.0 = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Debug|x64.ActiveCfg = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Debug|x64.Build.0 = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Debug|x86.ActiveCfg = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Debug|x86.Build.0 = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Release|Any CPU.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Release|ARM.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Release|ARM.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Release|iPhone.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Release|iPhone.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Release|x64.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Release|x64.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Release|x86.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Release|x86.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.ReleaseMac|ARM.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.ReleaseMac|ARM.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.ReleaseMac|iPhone.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.ReleaseMac|iPhone.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.ReleaseMac|iPhoneSimulator.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.ReleaseMac|x64.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.ReleaseMac|x64.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.ReleaseMac|x86.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.ReleaseMac|x86.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.ReleaseWin|Any CPU.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.ReleaseWin|Any CPU.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.ReleaseWin|ARM.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.ReleaseWin|ARM.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.ReleaseWin|iPhone.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.ReleaseWin|iPhone.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.ReleaseWin|iPhoneSimulator.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.ReleaseWin|x64.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.ReleaseWin|x64.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.ReleaseWin|x86.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.ReleaseWin|x86.Build.0 = Release|Any CPU - {C785F56E-0D1D-492C-850B-4D882314F29B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C785F56E-0D1D-492C-850B-4D882314F29B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C785F56E-0D1D-492C-850B-4D882314F29B}.Debug|ARM.ActiveCfg = Debug|ARM - {C785F56E-0D1D-492C-850B-4D882314F29B}.Debug|ARM.Build.0 = Debug|ARM - {C785F56E-0D1D-492C-850B-4D882314F29B}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {C785F56E-0D1D-492C-850B-4D882314F29B}.Debug|iPhone.Build.0 = Debug|Any CPU - {C785F56E-0D1D-492C-850B-4D882314F29B}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {C785F56E-0D1D-492C-850B-4D882314F29B}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {C785F56E-0D1D-492C-850B-4D882314F29B}.Debug|x64.ActiveCfg = Debug|x64 - {C785F56E-0D1D-492C-850B-4D882314F29B}.Debug|x64.Build.0 = Debug|x64 - {C785F56E-0D1D-492C-850B-4D882314F29B}.Debug|x86.ActiveCfg = Debug|x86 - {C785F56E-0D1D-492C-850B-4D882314F29B}.Debug|x86.Build.0 = Debug|x86 - {C785F56E-0D1D-492C-850B-4D882314F29B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C785F56E-0D1D-492C-850B-4D882314F29B}.Release|Any CPU.Build.0 = Release|Any CPU - {C785F56E-0D1D-492C-850B-4D882314F29B}.Release|ARM.ActiveCfg = Release|ARM - {C785F56E-0D1D-492C-850B-4D882314F29B}.Release|ARM.Build.0 = Release|ARM - {C785F56E-0D1D-492C-850B-4D882314F29B}.Release|iPhone.ActiveCfg = Release|Any CPU - {C785F56E-0D1D-492C-850B-4D882314F29B}.Release|iPhone.Build.0 = Release|Any CPU - {C785F56E-0D1D-492C-850B-4D882314F29B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {C785F56E-0D1D-492C-850B-4D882314F29B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {C785F56E-0D1D-492C-850B-4D882314F29B}.Release|x64.ActiveCfg = Release|x64 - {C785F56E-0D1D-492C-850B-4D882314F29B}.Release|x64.Build.0 = Release|x64 - {C785F56E-0D1D-492C-850B-4D882314F29B}.Release|x86.ActiveCfg = Release|x86 - {C785F56E-0D1D-492C-850B-4D882314F29B}.Release|x86.Build.0 = Release|x86 - {C785F56E-0D1D-492C-850B-4D882314F29B}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU - {C785F56E-0D1D-492C-850B-4D882314F29B}.ReleaseMac|ARM.ActiveCfg = Release|ARM - {C785F56E-0D1D-492C-850B-4D882314F29B}.ReleaseMac|ARM.Build.0 = Release|ARM - {C785F56E-0D1D-492C-850B-4D882314F29B}.ReleaseMac|iPhone.ActiveCfg = Release|Any CPU - {C785F56E-0D1D-492C-850B-4D882314F29B}.ReleaseMac|iPhone.Build.0 = Release|Any CPU - {C785F56E-0D1D-492C-850B-4D882314F29B}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|Any CPU - {C785F56E-0D1D-492C-850B-4D882314F29B}.ReleaseMac|iPhoneSimulator.Build.0 = Release|Any CPU - {C785F56E-0D1D-492C-850B-4D882314F29B}.ReleaseMac|x64.ActiveCfg = Release|x64 - {C785F56E-0D1D-492C-850B-4D882314F29B}.ReleaseMac|x64.Build.0 = Release|x64 - {C785F56E-0D1D-492C-850B-4D882314F29B}.ReleaseMac|x86.ActiveCfg = Release|x86 - {C785F56E-0D1D-492C-850B-4D882314F29B}.ReleaseMac|x86.Build.0 = Release|x86 - {C785F56E-0D1D-492C-850B-4D882314F29B}.ReleaseWin|Any CPU.ActiveCfg = Release|Any CPU - {C785F56E-0D1D-492C-850B-4D882314F29B}.ReleaseWin|Any CPU.Build.0 = Release|Any CPU - {C785F56E-0D1D-492C-850B-4D882314F29B}.ReleaseWin|ARM.ActiveCfg = Release|ARM - {C785F56E-0D1D-492C-850B-4D882314F29B}.ReleaseWin|ARM.Build.0 = Release|ARM - {C785F56E-0D1D-492C-850B-4D882314F29B}.ReleaseWin|iPhone.ActiveCfg = Release|Any CPU - {C785F56E-0D1D-492C-850B-4D882314F29B}.ReleaseWin|iPhone.Build.0 = Release|Any CPU - {C785F56E-0D1D-492C-850B-4D882314F29B}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|Any CPU - {C785F56E-0D1D-492C-850B-4D882314F29B}.ReleaseWin|iPhoneSimulator.Build.0 = Release|Any CPU - {C785F56E-0D1D-492C-850B-4D882314F29B}.ReleaseWin|x64.ActiveCfg = Release|x64 - {C785F56E-0D1D-492C-850B-4D882314F29B}.ReleaseWin|x64.Build.0 = Release|x64 - {C785F56E-0D1D-492C-850B-4D882314F29B}.ReleaseWin|x86.ActiveCfg = Release|x86 - {C785F56E-0D1D-492C-850B-4D882314F29B}.ReleaseWin|x86.Build.0 = Release|x86 - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Debug|ARM.ActiveCfg = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Debug|ARM.Build.0 = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Debug|iPhone.Build.0 = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Debug|x64.ActiveCfg = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Debug|x64.Build.0 = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Debug|x86.ActiveCfg = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Debug|x86.Build.0 = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Release|Any CPU.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Release|ARM.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Release|ARM.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Release|iPhone.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Release|iPhone.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Release|x64.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Release|x64.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Release|x86.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Release|x86.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.ReleaseMac|ARM.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.ReleaseMac|ARM.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.ReleaseMac|iPhone.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.ReleaseMac|iPhone.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.ReleaseMac|iPhoneSimulator.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.ReleaseMac|x64.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.ReleaseMac|x64.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.ReleaseMac|x86.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.ReleaseMac|x86.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.ReleaseWin|Any CPU.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.ReleaseWin|Any CPU.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.ReleaseWin|ARM.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.ReleaseWin|ARM.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.ReleaseWin|iPhone.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.ReleaseWin|iPhone.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.ReleaseWin|iPhoneSimulator.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.ReleaseWin|x64.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.ReleaseWin|x64.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.ReleaseWin|x86.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.ReleaseWin|x86.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3} = {2DC0C8D5-DF7F-4D96-886D-D7E83522C9BF} - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59} = {2DC0C8D5-DF7F-4D96-886D-D7E83522C9BF} - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A} = {2DC0C8D5-DF7F-4D96-886D-D7E83522C9BF} - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2} = {2DC0C8D5-DF7F-4D96-886D-D7E83522C9BF} - {10EB06B2-7231-40DF-8930-7781C82B65DB} = {2DC0C8D5-DF7F-4D96-886D-D7E83522C9BF} - {78407906-99C6-42B0-A511-973FC78C58CB} = {2DC0C8D5-DF7F-4D96-886D-D7E83522C9BF} - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB} = {2DC0C8D5-DF7F-4D96-886D-D7E83522C9BF} - {8E54DB74-C094-4016-859A-D1C7F2509A58} = {72EC3146-EA1B-4963-9248-55065728AF7F} - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD} = {72EC3146-EA1B-4963-9248-55065728AF7F} - {C785F56E-0D1D-492C-850B-4D882314F29B} = {72EC3146-EA1B-4963-9248-55065728AF7F} - {8370ADB4-229C-4DEC-908F-B1A8FC155523} = {72EC3146-EA1B-4963-9248-55065728AF7F} - EndGlobalSection -EndGlobal diff --git a/ZXing.Net.Mobile.Forms/PermissionsHandler.android.cs b/ZXing.Net.Mobile.Forms/PermissionsHandler.android.cs new file mode 100644 index 000000000..bf157720f --- /dev/null +++ b/ZXing.Net.Mobile.Forms/PermissionsHandler.android.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using ZXing.Mobile; +using System.Linq; +using Android.App; +using System.Threading.Tasks; +using Android.Content.PM; + +namespace ZXing.Net.Mobile.Forms.Android +{ + public static class PermissionsHandler + { + [Obsolete("Use ZXing.Net.Mobile.Android.PermissionsHandler.OnRequestPermissionsResult instead")] + public static void OnRequestPermissionsResult(int requestCode, string[] permissions, Permission[] grantResults) + { + // Forward the call to the generic android implementation + Android.PermissionsHandler.OnRequestPermissionsResult(requestCode, permissions, grantResults); + } + } +} diff --git a/ZXing.Net.Mobile.Forms/Platform.android.cs b/ZXing.Net.Mobile.Forms/Platform.android.cs new file mode 100644 index 000000000..5e76e43e5 --- /dev/null +++ b/ZXing.Net.Mobile.Forms/Platform.android.cs @@ -0,0 +1,13 @@ +using System; + +namespace ZXing.Net.Mobile.Forms.Android +{ + public static class Platform + { + public static void Init() + { + ZXing.Net.Mobile.Forms.Android.ZXingScannerViewRenderer.Init(); + ZXing.Net.Mobile.Forms.Android.ZXingBarcodeImageViewRenderer.Init(); + } + } +} diff --git a/ZXing.Net.Mobile.Forms/Platform.ios.cs b/ZXing.Net.Mobile.Forms/Platform.ios.cs new file mode 100644 index 000000000..a40f16753 --- /dev/null +++ b/ZXing.Net.Mobile.Forms/Platform.ios.cs @@ -0,0 +1,13 @@ +using System; + +namespace ZXing.Net.Mobile.Forms.iOS +{ + public static class Platform + { + public static void Init() + { + ZXing.Net.Mobile.Forms.iOS.ZXingScannerViewRenderer.Init(); + ZXing.Net.Mobile.Forms.iOS.ZXingBarcodeImageViewRenderer.Init(); + } + } +} diff --git a/ZXing.Net.Mobile.Forms/Platform.macos.cs b/ZXing.Net.Mobile.Forms/Platform.macos.cs new file mode 100644 index 000000000..8cd70adcd --- /dev/null +++ b/ZXing.Net.Mobile.Forms/Platform.macos.cs @@ -0,0 +1,12 @@ +using System; + +namespace ZXing.Net.Mobile.Forms +{ + public static class Platform + { + public static void Init() + { + ZXing.Net.Mobile.Forms.MacOS.ZXingBarcodeImageViewRenderer.Init(); + } + } +} \ No newline at end of file diff --git a/ZXing.Net.Mobile.Forms/Platform.tizen.cs b/ZXing.Net.Mobile.Forms/Platform.tizen.cs new file mode 100644 index 000000000..78f5c4e9f --- /dev/null +++ b/ZXing.Net.Mobile.Forms/Platform.tizen.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace ZXing.Net.Mobile.Forms.Tizen +{ + public static class Platform + { + public static void Init() + { + ZXingBarcodeImageViewRenderer.Init(); + ZXingScannerViewRenderer.Init(); + } + } +} diff --git a/ZXing.Net.Mobile.Forms/ZXing.Net.Mobile.Forms.csproj b/ZXing.Net.Mobile.Forms/ZXing.Net.Mobile.Forms.csproj new file mode 100644 index 000000000..0ecbe38cd --- /dev/null +++ b/ZXing.Net.Mobile.Forms/ZXing.Net.Mobile.Forms.csproj @@ -0,0 +1,107 @@ + + + netstandard2.0;Xamarin.iOS10;Xamarin.Mac20;MonoAndroid90;MonoAndroid10.0;tizen40 + $(TargetFrameworks);uap10.0.16299; + ZXing.Net.Mobile.Forms + ZXing.Net.Mobile.Forms + ZXing.Net.Mobile.Forms + icon.png + ZXing Barcode Scanning for your Xamarin.iOS, Xamarin.Android and Windows Universal apps! + barcode, zxing, zxing.net, qr, scan, scanning, scanner + ZXing.Net.Mobile Barcode Scanner for Xamarin.Forms + + ZXing.Net.Mobile is a C#/.NET library based on the open source Barcode Library: ZXing (Zebra Crossing), using the ZXing.Net Port. It works with Xamarin.iOS, Xamarin.Android, Windows Phone (Silverlight) and Windows Universal. The goal of ZXing.Net.Mobile is to make scanning barcodes as effortless and painless as possible in your own applications. + + See https://github.com/Redth/ZXing.Net.Mobile/releases for release notes. + + $(AssemblyName) ($(TargetFramework)) + 3.0.0.0 + 3.0.0.0 + 3.0.0 + $(Version)$(VersionSuffix) + Redth + Redth + en + © Redth + https://github.com/redth/ZXing.Net.Mobile + See: https://github.com/Redth/ZXing.Net.Mobile/releases + $(DefineConstants); + false + false + MIT + http://github.com/Redth/ZXing.Net.Mobile + portable + Debug;Release + + + true + + + + true + + true + + $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb + + + + + + + + + + + + + + + + + + + Windows Mobile Extensions for the UWP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ..\ZXing.Net\zxing.dll + + + \ No newline at end of file diff --git a/ZXing.Net.Mobile.Forms/ZXingBarcodeImageView.shared.cs b/ZXing.Net.Mobile.Forms/ZXingBarcodeImageView.shared.cs new file mode 100644 index 000000000..cdee66397 --- /dev/null +++ b/ZXing.Net.Mobile.Forms/ZXingBarcodeImageView.shared.cs @@ -0,0 +1,46 @@ +using Xamarin.Forms; +using ZXing.Common; + +namespace ZXing.Net.Mobile.Forms +{ + public class ZXingBarcodeImageView : Image + { + public ZXingBarcodeImageView() : base() + { + } + + public static readonly BindableProperty BarcodeFormatProperty = + BindableProperty.Create(nameof(BarcodeFormat), typeof(BarcodeFormat), typeof(ZXingBarcodeImageView), + defaultValue: BarcodeFormat.QR_CODE, + defaultBindingMode: BindingMode.TwoWay); + + public BarcodeFormat BarcodeFormat + { + get => (BarcodeFormat)GetValue(BarcodeFormatProperty); + set => SetValue(BarcodeFormatProperty, value); + } + + public static readonly BindableProperty BarcodeValueProperty = + BindableProperty.Create(nameof(BarcodeValue), typeof(string), typeof(ZXingBarcodeImageView), + defaultValue: string.Empty, + defaultBindingMode: BindingMode.TwoWay); + + public string BarcodeValue + { + get => (string)GetValue(BarcodeValueProperty); + set => SetValue(BarcodeValueProperty, value); + } + + public static readonly BindableProperty BarcodeOptionsProperty = + BindableProperty.Create(nameof(BarcodeOptions), typeof(EncodingOptions), typeof(ZXingBarcodeImageView), + defaultValue: new EncodingOptions(), + defaultBindingMode: BindingMode.TwoWay); + + public EncodingOptions BarcodeOptions + { + get => (EncodingOptions)GetValue(BarcodeOptionsProperty); + set => SetValue(BarcodeOptionsProperty, value); + } + } +} + diff --git a/ZXing.Net.Mobile.Forms/ZXingBarcodeImageViewRenderer.android.cs b/ZXing.Net.Mobile.Forms/ZXingBarcodeImageViewRenderer.android.cs new file mode 100644 index 000000000..a1cd3c095 --- /dev/null +++ b/ZXing.Net.Mobile.Forms/ZXingBarcodeImageViewRenderer.android.cs @@ -0,0 +1,74 @@ +using System; +using Xamarin.Forms; +using ZXing.Net.Mobile.Forms; +using ZXing.Net.Mobile.Forms.Android; +using Android.Runtime; +using Xamarin.Forms.Platform.Android; +using System.ComponentModel; +using Android.Widget; +using ZXing.Mobile; + +[assembly: ExportRenderer(typeof(ZXingBarcodeImageView), typeof(ZXingBarcodeImageViewRenderer))] +namespace ZXing.Net.Mobile.Forms.Android +{ + [Preserve(AllMembers = true)] + public class ZXingBarcodeImageViewRenderer : ViewRenderer + { + public ZXingBarcodeImageViewRenderer(global::Android.Content.Context context) : base(context) + { } + + public static void Init() + { + var temp = DateTime.Now; + } + + ZXingBarcodeImageView formsView; + ImageView imageView; + + protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) + { + Regenerate(); + + base.OnElementPropertyChanged(sender, e); + } + + protected override void OnElementChanged(ElementChangedEventArgs e) + { + formsView = Element; + + if (imageView == null) + { + imageView = new ImageView(Context); + + base.SetNativeControl(imageView); + } + + Regenerate(); + + base.OnElementChanged(e); + } + + void Regenerate() + { + if (formsView != null && !string.IsNullOrEmpty(formsView.BarcodeValue)) + { + var writer = new ZXing.Mobile.BarcodeWriter(); + + if (formsView != null && formsView.BarcodeOptions != null) + writer.Options = formsView.BarcodeOptions; + if (formsView != null && formsView.BarcodeFormat != null) + writer.Format = formsView.BarcodeFormat; + + var value = formsView != null ? formsView.BarcodeValue : string.Empty; + + Device.BeginInvokeOnMainThread(() => + { + var image = writer.Write(value); + + imageView.SetImageBitmap(image); + }); + } + } + } +} + diff --git a/ZXing.Net.Mobile.Forms/ZXingBarcodeImageViewRenderer.ios.cs b/ZXing.Net.Mobile.Forms/ZXingBarcodeImageViewRenderer.ios.cs new file mode 100644 index 000000000..4e268820a --- /dev/null +++ b/ZXing.Net.Mobile.Forms/ZXingBarcodeImageViewRenderer.ios.cs @@ -0,0 +1,74 @@ +using System; +using Xamarin.Forms; +using ZXing.Net.Mobile.Forms; +using ZXing.Net.Mobile.Forms.iOS; +using System.ComponentModel; +using System.Reflection; +using ZXing.Mobile; +using System.Threading.Tasks; +using Xamarin.Forms.Platform.iOS; +using Foundation; +using UIKit; + +[assembly: ExportRenderer(typeof(ZXingBarcodeImageView), typeof(ZXingBarcodeImageViewRenderer))] +namespace ZXing.Net.Mobile.Forms.iOS +{ + [Preserve(AllMembers = true)] + public class ZXingBarcodeImageViewRenderer : ViewRenderer + { + public static void Init() + { + var temp = DateTime.Now; + } + + ZXingBarcodeImageView formsView; + UIImageView imageView; + + protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) + { + Regenerate(); + + base.OnElementPropertyChanged(sender, e); + } + + protected override async void OnElementChanged(ElementChangedEventArgs e) + { + formsView = Element; + + if (imageView == null) + { + + imageView = new UIImageView { ContentMode = UIViewContentMode.ScaleAspectFit }; + + base.SetNativeControl(imageView); + } + + Regenerate(); + + base.OnElementChanged(e); + } + + void Regenerate() + { + if (formsView != null && formsView.BarcodeValue != null) + { + var writer = new ZXing.Mobile.BarcodeWriter(); + + if (formsView != null && formsView.BarcodeOptions != null) + writer.Options = formsView.BarcodeOptions; + if (formsView != null && formsView.BarcodeFormat != null) + writer.Format = formsView.BarcodeFormat; + + var value = formsView != null ? formsView.BarcodeValue : string.Empty; + + Device.BeginInvokeOnMainThread(() => + { + var image = writer.Write(value); + + imageView.Image = image; + }); + } + } + } +} + diff --git a/ZXing.Net.Mobile.Forms/ZXingBarcodeImageViewRenderer.macos.cs b/ZXing.Net.Mobile.Forms/ZXingBarcodeImageViewRenderer.macos.cs new file mode 100644 index 000000000..263df001d --- /dev/null +++ b/ZXing.Net.Mobile.Forms/ZXingBarcodeImageViewRenderer.macos.cs @@ -0,0 +1,74 @@ +using System; +using Xamarin.Forms; +using ZXing.Net.Mobile.Forms; +using ZXing.Net.Mobile.Forms.MacOS; +using System.ComponentModel; +using System.Reflection; +using ZXing.Mobile; +using System.Threading.Tasks; +using Xamarin.Forms.Platform.MacOS; +using Foundation; +using AppKit; + +[assembly: ExportRenderer(typeof(ZXingBarcodeImageView), typeof(ZXingBarcodeImageViewRenderer))] + +namespace ZXing.Net.Mobile.Forms.MacOS +{ + [Preserve(AllMembers = true)] + public class ZXingBarcodeImageViewRenderer : ViewRenderer + { + public static void Init() + { + var temp = DateTime.Now; + } + + ZXingBarcodeImageView formsView; + NSImageView imageView; + + protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) + { + Regenerate(); + + base.OnElementPropertyChanged(sender, e); + } + + protected override async void OnElementChanged(ElementChangedEventArgs e) + { + formsView = Element; + + if (imageView == null) + { + + imageView = new NSImageView(); + + base.SetNativeControl(imageView); + } + + Regenerate(); + + base.OnElementChanged(e); + } + + void Regenerate() + { + if (formsView != null && formsView.BarcodeValue != null) + { + var writer = new ZXing.Mobile.BarcodeWriter(); + + if (formsView != null && formsView.BarcodeOptions != null) + writer.Options = formsView.BarcodeOptions; + if (formsView != null && formsView.BarcodeFormat != null) + writer.Format = formsView.BarcodeFormat; + + var value = formsView != null ? formsView.BarcodeValue : string.Empty; + + Device.BeginInvokeOnMainThread(() => + { + var image = writer.Write(value); + + imageView.Image = image; + }); + } + } + } +} \ No newline at end of file diff --git a/ZXing.Net.Mobile.Forms/ZXingBarcodeImageViewRenderer.tizen.cs b/ZXing.Net.Mobile.Forms/ZXingBarcodeImageViewRenderer.tizen.cs new file mode 100644 index 000000000..e4f993558 --- /dev/null +++ b/ZXing.Net.Mobile.Forms/ZXingBarcodeImageViewRenderer.tizen.cs @@ -0,0 +1,70 @@ +using ElmSharp; +using System; +using System.ComponentModel; +using Xamarin.Forms; +using Xamarin.Forms.Internals; +using Xamarin.Forms.Platform.Tizen; +using ZXing.Net.Mobile.Forms; +using ZXing.Net.Mobile.Forms.Tizen; + +[assembly: ExportRenderer(typeof(ZXingBarcodeImageView), typeof(ZXingBarcodeImageViewRenderer))] +namespace ZXing.Net.Mobile.Forms.Tizen +{ + [Preserve(AllMembers = true)] + class ZXingBarcodeImageViewRenderer : ViewRenderer + { + ZXingBarcodeImageView formsView; + EvasImage imageView; + + public static void Init() + { + var temp = DateTime.Now; + } + + protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) + { + Regenerate(); + + base.OnElementPropertyChanged(sender, e); + } + + protected override void OnElementChanged(ElementChangedEventArgs e) + { + formsView = Element; + + if (imageView == null) + { + imageView = new EvasImage(Xamarin.Forms.Forms.NativeParent); + base.SetNativeControl(imageView); + } + + Regenerate(); + + base.OnElementChanged(e); + } + + void Regenerate() + { + if (formsView != null && formsView.BarcodeValue != null) + { + var writer = new ZXing.Mobile.BarcodeWriter(Xamarin.Forms.Forms.NativeParent); + + if (formsView != null && formsView.BarcodeOptions != null) + writer.Options = formsView.BarcodeOptions; + if (formsView != null && formsView.BarcodeFormat != null) + writer.Format = formsView.BarcodeFormat; + + var value = formsView != null ? formsView.BarcodeValue : string.Empty; + + Device.BeginInvokeOnMainThread(() => + { + var image = writer.Write(value); + imageView.SetSource(image); + imageView.IsFilled = true; + imageView.Resize(image.Size.Height, image.Size.Width); + imageView.Show(); + }); + } + } + } +} diff --git a/ZXing.Net.Mobile.Forms/ZXingBarcodeImageViewRenderer.uwp.cs b/ZXing.Net.Mobile.Forms/ZXingBarcodeImageViewRenderer.uwp.cs new file mode 100644 index 000000000..ca0fffc9a --- /dev/null +++ b/ZXing.Net.Mobile.Forms/ZXingBarcodeImageViewRenderer.uwp.cs @@ -0,0 +1,69 @@ +using System; +using Xamarin.Forms; +using ZXing.Net.Mobile.Forms; +using ZXing.Net.Mobile.Forms.WindowsUniversal; +using Xamarin.Forms.Platform.UWP; +using System.ComponentModel; +using System.Reflection; +using ZXing.Mobile; +using System.Threading.Tasks; + +[assembly: ExportRenderer(typeof(ZXingBarcodeImageView), typeof(ZXingBarcodeImageViewRenderer))] +namespace ZXing.Net.Mobile.Forms.WindowsUniversal +{ + public class ZXingBarcodeImageViewRenderer : ViewRenderer + { + public static void Init() + { + } + + ZXingBarcodeImageView formsView; + Windows.UI.Xaml.Controls.Image imageView; + + protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) + { + Regenerate(); + + base.OnElementPropertyChanged(sender, e); + } + + protected override void OnElementChanged(ElementChangedEventArgs e) + { + formsView = Element; + + if (imageView == null) + { + + imageView = new Windows.UI.Xaml.Controls.Image(); + + base.SetNativeControl(imageView); + } + + Regenerate(); + + base.OnElementChanged(e); + } + + void Regenerate() + { + if (formsView != null && formsView.BarcodeValue != null) + { + var writer = new ZXing.Mobile.BarcodeWriter(); + + if (formsView != null && formsView.BarcodeOptions != null) + writer.Options = formsView.BarcodeOptions; + if (formsView != null && formsView.BarcodeFormat != null) + writer.Format = formsView.BarcodeFormat; + + var value = formsView != null ? formsView.BarcodeValue : string.Empty; + + Device.BeginInvokeOnMainThread(() => + { + var image = writer.Write(value); + + imageView.Source = image; + }); + } + } + } +} diff --git a/ZXing.Net.Mobile.Forms/ZXingDefaultOverlay.shared.cs b/ZXing.Net.Mobile.Forms/ZXingDefaultOverlay.shared.cs new file mode 100644 index 000000000..730d8b502 --- /dev/null +++ b/ZXing.Net.Mobile.Forms/ZXingDefaultOverlay.shared.cs @@ -0,0 +1,134 @@ +using System; +using System.Windows.Input; +using Xamarin.Forms; + +namespace ZXing.Net.Mobile.Forms +{ + public class ZXingDefaultOverlay : Grid + { + readonly Label topText; + readonly Label botText; + readonly Button flash; + + public delegate void FlashButtonClickedDelegate(Button sender, EventArgs e); + public event FlashButtonClickedDelegate FlashButtonClicked; + + public ZXingDefaultOverlay() + { + BindingContext = this; + + VerticalOptions = LayoutOptions.FillAndExpand; + HorizontalOptions = LayoutOptions.FillAndExpand; + + RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) }); + RowDefinitions.Add(new RowDefinition { Height = new GridLength(2, GridUnitType.Star) }); + RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) }); + ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) }); + + + Children.Add(new BoxView + { + VerticalOptions = LayoutOptions.Fill, + HorizontalOptions = LayoutOptions.FillAndExpand, + BackgroundColor = Color.Black, + Opacity = 0.7, + }, 0, 0); + + Children.Add(new BoxView + { + VerticalOptions = LayoutOptions.Fill, + HorizontalOptions = LayoutOptions.FillAndExpand, + BackgroundColor = Color.Black, + Opacity = 0.7, + }, 0, 2); + + Children.Add(new BoxView + { + VerticalOptions = LayoutOptions.Center, + HorizontalOptions = LayoutOptions.FillAndExpand, + HeightRequest = 3, + BackgroundColor = Color.Red, + Opacity = 0.6, + }, 0, 1); + + topText = new Label + { + VerticalOptions = LayoutOptions.Center, + HorizontalOptions = LayoutOptions.Center, + TextColor = Color.White, + AutomationId = "zxingDefaultOverlay_TopTextLabel", + }; + topText.SetBinding(Label.TextProperty, new Binding(nameof(TopText))); + Children.Add(topText, 0, 0); + + botText = new Label + { + VerticalOptions = LayoutOptions.Center, + HorizontalOptions = LayoutOptions.Center, + TextColor = Color.White, + AutomationId = "zxingDefaultOverlay_BottomTextLabel", + }; + botText.SetBinding(Label.TextProperty, new Binding(nameof(BottomText))); + Children.Add(botText, 0, 2); + + flash = new Button + { + HorizontalOptions = LayoutOptions.End, + VerticalOptions = LayoutOptions.Start, + Text = "Flash", + TextColor = Color.White, + AutomationId = "zxingDefaultOverlay_FlashButton", + }; + flash.SetBinding(Button.IsVisibleProperty, new Binding(nameof(ShowFlashButton))); + flash.Clicked += (sender, e) => + { + FlashButtonClicked?.Invoke(flash, e); + }; + + Children.Add(flash, 0, 0); + } + + public static readonly BindableProperty TopTextProperty = + BindableProperty.Create(nameof(TopText), typeof(string), typeof(ZXingDefaultOverlay), string.Empty); + public string TopText + { + get => (string)GetValue(TopTextProperty); + set => SetValue(TopTextProperty, value); + } + + public static readonly BindableProperty BottomTextProperty = + BindableProperty.Create(nameof(BottomText), typeof(string), typeof(ZXingDefaultOverlay), string.Empty); + public string BottomText + { + get => (string)GetValue(BottomTextProperty); + set => SetValue(BottomTextProperty, value); + } + + public static readonly BindableProperty ShowFlashButtonProperty = + BindableProperty.Create(nameof(ShowFlashButton), typeof(bool), typeof(ZXingDefaultOverlay), false); + public bool ShowFlashButton + { + get => (bool)GetValue(ShowFlashButtonProperty); + set => SetValue(ShowFlashButtonProperty, value); + } + + public static BindableProperty FlashCommandProperty = + BindableProperty.Create(nameof(FlashCommand), typeof(ICommand), typeof(ZXingDefaultOverlay), + defaultValue: default(ICommand), + propertyChanged: OnFlashCommandChanged); + + public ICommand FlashCommand + { + get => (ICommand)GetValue(FlashCommandProperty); + set => SetValue(FlashCommandProperty, value); + } + + static void OnFlashCommandChanged(BindableObject bindable, object oldvalue, object newValue) + { + var overlay = bindable as ZXingDefaultOverlay; + if (overlay?.flash == null) + return; + overlay.flash.Command = newValue as Command; + } + } +} diff --git a/ZXing.Net.Mobile.Forms/ZXingScannerPage.shared.cs b/ZXing.Net.Mobile.Forms/ZXingScannerPage.shared.cs new file mode 100644 index 000000000..21d853f5e --- /dev/null +++ b/ZXing.Net.Mobile.Forms/ZXingScannerPage.shared.cs @@ -0,0 +1,183 @@ +using Xamarin.Forms; +using ZXing.Mobile; + +namespace ZXing.Net.Mobile.Forms +{ + public class ZXingScannerPage : ContentPage + { + readonly ZXingScannerView zxing; + readonly ZXingDefaultOverlay defaultOverlay = null; + + public ZXingScannerPage(MobileBarcodeScanningOptions options = null, View customOverlay = null) + : base() + { + zxing = new ZXingScannerView + { + HorizontalOptions = LayoutOptions.FillAndExpand, + VerticalOptions = LayoutOptions.FillAndExpand, + Options = options, + AutomationId = "zxingScannerView" + }; + + zxing.SetBinding(ZXingScannerView.IsTorchOnProperty, new Binding(nameof(IsTorchOn))); + zxing.SetBinding(ZXingScannerView.IsAnalyzingProperty, new Binding(nameof(IsAnalyzing))); + zxing.SetBinding(ZXingScannerView.IsScanningProperty, new Binding(nameof(IsScanning))); + zxing.SetBinding(ZXingScannerView.HasTorchProperty, new Binding(nameof(HasTorch))); + zxing.SetBinding(ZXingScannerView.ResultProperty, new Binding(nameof(Result))); + + zxing.OnScanResult += (result) + => OnScanResult?.Invoke(result); + + if (customOverlay == null) + { + defaultOverlay = new ZXingDefaultOverlay() { AutomationId = "zxingDefaultOverlay" }; + + defaultOverlay.SetBinding(ZXingDefaultOverlay.TopTextProperty, new Binding(nameof(DefaultOverlayTopText))); + defaultOverlay.SetBinding(ZXingDefaultOverlay.BottomTextProperty, new Binding(nameof(DefaultOverlayBottomText))); + defaultOverlay.SetBinding(ZXingDefaultOverlay.ShowFlashButtonProperty, new Binding(nameof(DefaultOverlayShowFlashButton))); + + DefaultOverlayTopText = "Hold your phone up to the barcode"; + DefaultOverlayBottomText = "Scanning will happen automatically"; + DefaultOverlayShowFlashButton = HasTorch; + + defaultOverlay.FlashButtonClicked += (sender, e) => + zxing.IsTorchOn = !zxing.IsTorchOn; + + Overlay = defaultOverlay; + } + else + { + Overlay = customOverlay; + } + + var grid = new Grid + { + VerticalOptions = LayoutOptions.FillAndExpand, + HorizontalOptions = LayoutOptions.FillAndExpand, + }; + grid.Children.Add(zxing); + grid.Children.Add(Overlay); + + // The root page of your application + Content = grid; + } + + #region Default Overlay Properties + + public static readonly BindableProperty DefaultOverlayTopTextProperty = + BindableProperty.Create(nameof(DefaultOverlayTopText), typeof(string), typeof(ZXingScannerPage), string.Empty); + public string DefaultOverlayTopText + { + get => (string)GetValue(DefaultOverlayTopTextProperty); + set => SetValue(DefaultOverlayTopTextProperty, value); + } + + public static readonly BindableProperty DefaultOverlayBottomTextProperty = + BindableProperty.Create(nameof(DefaultOverlayBottomText), typeof(string), typeof(ZXingScannerPage), string.Empty); + + public string DefaultOverlayBottomText + { + get => (string)GetValue(DefaultOverlayBottomTextProperty); + set => SetValue(DefaultOverlayBottomTextProperty, value); + } + + public static readonly BindableProperty DefaultOverlayShowFlashButtonProperty = + BindableProperty.Create(nameof(DefaultOverlayShowFlashButton), typeof(bool), typeof(ZXingScannerPage), false); + + public bool DefaultOverlayShowFlashButton + { + get => (bool)GetValue(DefaultOverlayShowFlashButtonProperty); + set => SetValue(DefaultOverlayShowFlashButtonProperty, value); + } + + #endregion + + public delegate void ScanResultDelegate(Result result); + public event ScanResultDelegate OnScanResult; + + public View Overlay { get; private set; } + + #region Functions + + public void ToggleTorch() + => zxing?.ToggleTorch(); + + protected override void OnAppearing() + { + base.OnAppearing(); + + zxing.IsScanning = true; + } + + protected override void OnDisappearing() + { + zxing.IsScanning = false; + + base.OnDisappearing(); + } + + public void PauseAnalysis() + { + if (zxing != null) + zxing.IsAnalyzing = false; + } + + public void ResumeAnalysis() + { + if (zxing != null) + zxing.IsAnalyzing = true; + } + + public void AutoFocus() + => zxing?.AutoFocus(); + + public void AutoFocus(int x, int y) + => zxing?.AutoFocus(x, y); + #endregion + + public static readonly BindableProperty IsTorchOnProperty = + BindableProperty.Create(nameof(IsTorchOn), typeof(bool), typeof(ZXingScannerPage), false); + + public bool IsTorchOn + { + get => (bool)GetValue(IsTorchOnProperty); + set => SetValue(IsTorchOnProperty, value); + } + + public static readonly BindableProperty IsAnalyzingProperty = + BindableProperty.Create(nameof(IsAnalyzing), typeof(bool), typeof(ZXingScannerPage), false); + + public bool IsAnalyzing + { + get => (bool)GetValue(IsAnalyzingProperty); + set => SetValue(IsAnalyzingProperty, value); + } + + public static readonly BindableProperty IsScanningProperty = + BindableProperty.Create(nameof(IsScanning), typeof(bool), typeof(ZXingScannerPage), false); + + public bool IsScanning + { + get => (bool)GetValue(IsScanningProperty); + set => SetValue(IsScanningProperty, value); + } + + public static readonly BindableProperty HasTorchProperty = + BindableProperty.Create(nameof(HasTorch), typeof(bool), typeof(ZXingScannerPage), false); + + public bool HasTorch + { + get => (bool)GetValue(HasTorchProperty); + set => SetValue(HasTorchProperty, value); + } + + public static readonly BindableProperty ResultProperty = + BindableProperty.Create(nameof(Result), typeof(Result), typeof(ZXingScannerPage), default(Result)); + + public Result Result + { + get => (Result)GetValue(ResultProperty); + set => SetValue(ResultProperty, value); + } + } +} diff --git a/ZXing.Net.Mobile.Forms/ZXingScannerView.shared.cs b/ZXing.Net.Mobile.Forms/ZXingScannerView.shared.cs new file mode 100644 index 000000000..84c7d610f --- /dev/null +++ b/ZXing.Net.Mobile.Forms/ZXingScannerView.shared.cs @@ -0,0 +1,94 @@ +using System; +using System.Windows.Input; +using Xamarin.Forms; +using ZXing.Mobile; + +namespace ZXing.Net.Mobile.Forms +{ + public class ZXingScannerView : View + { + public delegate void ScanResultDelegate(Result result); + public event ScanResultDelegate OnScanResult; + + public event Action AutoFocusRequested; + + public ZXingScannerView() + { + VerticalOptions = LayoutOptions.FillAndExpand; + HorizontalOptions = LayoutOptions.FillAndExpand; + } + + public void RaiseScanResult(Result result) + { + Result = result; + OnScanResult?.Invoke(Result); + ScanResultCommand?.Execute(Result); + } + + public void ToggleTorch() + => IsTorchOn = !IsTorchOn; + + public void AutoFocus() + => AutoFocusRequested?.Invoke(-1, -1); + + public void AutoFocus(int x, int y) + => AutoFocusRequested?.Invoke(x, y); + + public static readonly BindableProperty OptionsProperty = + BindableProperty.Create(nameof(Options), typeof(MobileBarcodeScanningOptions), typeof(ZXingScannerView), MobileBarcodeScanningOptions.Default); + + public MobileBarcodeScanningOptions Options + { + get => (MobileBarcodeScanningOptions)GetValue(OptionsProperty); + set => SetValue(OptionsProperty, value); + } + + public static readonly BindableProperty IsScanningProperty = + BindableProperty.Create(nameof(IsScanning), typeof(bool), typeof(ZXingScannerView), false); + + public bool IsScanning + { + get => (bool)GetValue(IsScanningProperty); + set => SetValue(IsScanningProperty, value); + } + + public static readonly BindableProperty IsTorchOnProperty = + BindableProperty.Create(nameof(IsTorchOn), typeof(bool), typeof(ZXingScannerView), false); + public bool IsTorchOn + { + get => (bool)GetValue(IsTorchOnProperty); + set => SetValue(IsTorchOnProperty, value); + } + + public static readonly BindableProperty HasTorchProperty = + BindableProperty.Create(nameof(HasTorch), typeof(bool), typeof(ZXingScannerView), false); + + public bool HasTorch + => (bool)GetValue(HasTorchProperty); + + public static readonly BindableProperty IsAnalyzingProperty = + BindableProperty.Create(nameof(IsAnalyzing), typeof(bool), typeof(ZXingScannerView), true); + + public bool IsAnalyzing + { + get => (bool)GetValue(IsAnalyzingProperty); + set => SetValue(IsAnalyzingProperty, value); + } + + public static readonly BindableProperty ResultProperty = + BindableProperty.Create(nameof(Result), typeof(Result), typeof(ZXingScannerView), default(Result)); + public Result Result + { + get => (Result)GetValue(ResultProperty); + set => SetValue(ResultProperty, value); + } + + public static readonly BindableProperty ScanResultCommandProperty = + BindableProperty.Create(nameof(ScanResultCommand), typeof(ICommand), typeof(ZXingScannerView), default(ICommand)); + public ICommand ScanResultCommand + { + get => (ICommand)GetValue(ScanResultCommandProperty); + set => SetValue(ScanResultCommandProperty, value); + } + } +} diff --git a/ZXing.Net.Mobile.Forms/ZXingScannerViewRenderer.android.cs b/ZXing.Net.Mobile.Forms/ZXingScannerViewRenderer.android.cs new file mode 100644 index 000000000..71e071bf3 --- /dev/null +++ b/ZXing.Net.Mobile.Forms/ZXingScannerViewRenderer.android.cs @@ -0,0 +1,130 @@ +using System; +using Xamarin.Forms; +using ZXing.Net.Mobile.Forms; +using ZXing.Net.Mobile.Forms.Android; +using Android.Runtime; +using Android.App; +using Xamarin.Forms.Platform.Android; +using Android.Views; +using System.ComponentModel; +using System.Reflection; +using Android.Widget; +using ZXing.Mobile; +using System.Threading.Tasks; +using System.Linq.Expressions; + +[assembly: ExportRenderer(typeof(ZXingScannerView), typeof(ZXingScannerViewRenderer))] +namespace ZXing.Net.Mobile.Forms.Android +{ + [Preserve(AllMembers = true)] + public class ZXingScannerViewRenderer : ViewRenderer + { + public ZXingScannerViewRenderer(global::Android.Content.Context context) + : base(context) + { + } + + public static void Init() + { + // Keep linker from stripping empty method + var temp = DateTime.Now; + } + + protected ZXingScannerView formsView; + + protected ZXingSurfaceView zxingSurface; + internal Task requestPermissionsTask; + + protected override async void OnElementChanged(ElementChangedEventArgs e) + { + base.OnElementChanged(e); + + formsView = Element; + + if (zxingSurface == null) + { + + // Process requests for autofocus + formsView.AutoFocusRequested += (x, y) => + { + if (zxingSurface != null) + { + if (x < 0 && y < 0) + zxingSurface.AutoFocus(); + else + zxingSurface.AutoFocus(x, y); + } + }; + + var cameraPermission = await Xamarin.Essentials.Permissions.RequestAsync(); + if (cameraPermission != Xamarin.Essentials.PermissionStatus.Granted) + { + Console.WriteLine("Missing Camera Permission"); + return; + } + + if (Xamarin.Essentials.Permissions.IsDeclaredInManifest("android.permission.FLASHLIGHT")) + { + var fp = await Xamarin.Essentials.Permissions.RequestAsync(); + if (fp != Xamarin.Essentials.PermissionStatus.Granted) + { + Console.WriteLine("Missing Flashlight Permission"); + return; + } + } + + zxingSurface = new ZXingSurfaceView(Context as Activity, formsView.Options); + zxingSurface.LayoutParameters = new LayoutParams(LayoutParams.MatchParent, LayoutParams.MatchParent); + + base.SetNativeControl(zxingSurface); + + if (formsView.IsScanning) + zxingSurface.StartScanning(formsView.RaiseScanResult, formsView.Options); + + if (formsView.IsTorchOn) + zxingSurface.Torch(true); + } + } + + protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) + { + base.OnElementPropertyChanged(sender, e); + + if (zxingSurface == null) + return; + + switch (e.PropertyName) + { + case nameof(ZXingScannerView.IsTorchOn): + zxingSurface.Torch(formsView.IsTorchOn); + break; + case nameof(ZXingScannerView.IsScanning): + if (formsView.IsScanning) + zxingSurface.StartScanning(formsView.RaiseScanResult, formsView.Options); + else + zxingSurface.StopScanning(); + break; + case nameof(ZXingScannerView.IsAnalyzing): + if (formsView.IsAnalyzing) + zxingSurface.ResumeAnalysis(); + else + zxingSurface.PauseAnalysis(); + break; + } + } + + public override bool OnTouchEvent(MotionEvent e) + { + var x = e.GetX(); + var y = e.GetY(); + + if (zxingSurface != null) + { + zxingSurface.AutoFocus((int)x, (int)y); + System.Diagnostics.Debug.WriteLine("Touch: x={0}, y={1}", x, y); + } + return base.OnTouchEvent(e); + } + } +} + diff --git a/ZXing.Net.Mobile.Forms/ZXingScannerViewRenderer.ios.cs b/ZXing.Net.Mobile.Forms/ZXingScannerViewRenderer.ios.cs new file mode 100644 index 000000000..18d4e0465 --- /dev/null +++ b/ZXing.Net.Mobile.Forms/ZXingScannerViewRenderer.ios.cs @@ -0,0 +1,121 @@ +using System; +using Xamarin.Forms; +using ZXing.Net.Mobile.Forms; +using Xamarin.Forms.Platform.iOS; +using System.ComponentModel; +using System.Reflection; +using Foundation; +using ZXing.Net.Mobile.Forms.iOS; +using UIKit; + +[assembly: ExportRenderer(typeof(ZXingScannerView), typeof(ZXingScannerViewRenderer))] +namespace ZXing.Net.Mobile.Forms.iOS +{ + [Preserve(AllMembers = true)] + public class ZXingScannerViewRenderer : ViewRenderer + { + // No-op to be called from app to prevent linker from stripping this out + public static void Init() + { + var _ = DateTime.Now; + } + + protected ZXingScannerView formsView; + protected ZXing.Mobile.ZXingScannerView zxingView; + + protected override async void OnElementChanged(ElementChangedEventArgs e) + { + AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; + + formsView = Element; + + if (zxingView == null) + { + + // Process requests for autofocus + formsView.AutoFocusRequested += (x, y) => + { + if (zxingView != null) + { + if (x < 0 && y < 0) + zxingView.AutoFocus(); + else + zxingView.AutoFocus(x, y); + } + }; + + var cameraPermission = await Xamarin.Essentials.Permissions.RequestAsync(); + if (cameraPermission != Xamarin.Essentials.PermissionStatus.Granted) + { + Console.WriteLine("Missing Camera Permission"); + return; + } + + zxingView = new ZXing.Mobile.ZXingScannerView(); + zxingView.UseCustomOverlayView = true; + zxingView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; + + base.SetNativeControl(zxingView); + + if (formsView.IsScanning) + zxingView.StartScanning(formsView.RaiseScanResult, formsView.Options); + + if (!formsView.IsAnalyzing) + zxingView.PauseAnalysis(); + + if (formsView.IsTorchOn) + zxingView.Torch(formsView.IsTorchOn); + } + + base.OnElementChanged(e); + } + + protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) + { + base.OnElementPropertyChanged(sender, e); + + if (zxingView == null) + return; + + switch (e.PropertyName) + { + case nameof(ZXingScannerView.IsTorchOn): + zxingView.Torch(formsView.IsTorchOn); + break; + case nameof(ZXingScannerView.IsScanning): + if (formsView.IsScanning) + zxingView.StartScanning(formsView.RaiseScanResult, formsView.Options); + else + zxingView.StopScanning(); + break; + case nameof(ZXingScannerView.IsAnalyzing): + if (formsView.IsAnalyzing) + zxingView.ResumeAnalysis(); + else + zxingView.PauseAnalysis(); + break; + } + } + + public override void TouchesEnded(NSSet touches, UIKit.UIEvent evt) + { + base.TouchesEnded(touches, evt); + + zxingView?.AutoFocus(); + } + + public override void LayoutSubviews() + { + base.LayoutSubviews(); + + // Find the best guess at current orientation + var o = UIApplication.SharedApplication.StatusBarOrientation; + if (ViewController != null) + o = ViewController.InterfaceOrientation; + + // Tell the native view to rotate + zxingView?.DidRotate(o); + } + } +} + diff --git a/ZXing.Net.Mobile.Forms/ZXingScannerViewRenderer.tizen.cs b/ZXing.Net.Mobile.Forms/ZXingScannerViewRenderer.tizen.cs new file mode 100644 index 000000000..65c17b054 --- /dev/null +++ b/ZXing.Net.Mobile.Forms/ZXingScannerViewRenderer.tizen.cs @@ -0,0 +1,88 @@ +using System; +using System.ComponentModel; +using Xamarin.Forms; +using Xamarin.Forms.Platform.Tizen; +using ZXing.Mobile; +using ZXing.Net.Mobile.Forms; +using ZXing.Net.Mobile.Forms.Tizen; + +[assembly: ExportRenderer(typeof(ZXingScannerView), typeof(ZXingScannerViewRenderer))] + +namespace ZXing.Net.Mobile.Forms.Tizen +{ + class ZXingScannerViewRenderer : ViewRenderer + { + protected ZXingScannerView formsView; + protected ZXingMediaView zxingWindow; + + public static void Init() + { + // Keep linker from stripping empty method + var temp = DateTime.Now; + } + + protected override void Dispose(bool disposing) + { + zxingWindow?.StopScanning(); + base.Dispose(disposing); + } + + protected override void OnElementChanged(ElementChangedEventArgs e) + { + base.OnElementChanged(e); + formsView = Element; + + if (zxingWindow == null) + { + formsView.AutoFocusRequested += (x, y) => + { + if (zxingWindow != null) + { + if (x < 0 && y < 0) + zxingWindow.AutoFocus(); + else + zxingWindow.AutoFocus(x, y); + } + }; + + zxingWindow = new ZXing.Mobile.ZXingMediaView(Xamarin.Forms.Forms.NativeParent); + zxingWindow.Show(); + base.SetNativeControl(zxingWindow); + + if (formsView.IsScanning) + zxingWindow.StartScanning(formsView.RaiseScanResult, formsView.Options); + if (!formsView.IsAnalyzing) + zxingWindow.PauseAnalysis(); + if (formsView.IsTorchOn) + zxingWindow.Torch(formsView.IsTorchOn); + } + } + + protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) + { + base.OnElementPropertyChanged(sender, e); + + if (zxingWindow != null) + { + switch (e.PropertyName) + { + case nameof(ZXingScannerView.IsTorchOn): + zxingWindow.Torch(formsView.IsTorchOn); + break; + case nameof(ZXingScannerView.IsScanning): + if (formsView.IsScanning) + zxingWindow.StartScanning(formsView.RaiseScanResult, formsView.Options); + else + zxingWindow.StopScanning(); + break; + case nameof(ZXingScannerView.IsAnalyzing): + if (formsView.IsAnalyzing) + zxingWindow.ResumeAnalysis(); + else + zxingWindow.PauseAnalysis(); + break; + } + } + } + } +} diff --git a/ZXing.Net.Mobile.Forms/ZXingScannerViewRenderer.uwp.cs b/ZXing.Net.Mobile.Forms/ZXingScannerViewRenderer.uwp.cs new file mode 100644 index 000000000..171529ba7 --- /dev/null +++ b/ZXing.Net.Mobile.Forms/ZXingScannerViewRenderer.uwp.cs @@ -0,0 +1,100 @@ +using System; +using Xamarin.Forms; +using ZXing.Net.Mobile.Forms; +using ZXing.Net.Mobile.Forms.WindowsUniversal; +using Xamarin.Forms.Platform.UWP; +using System.ComponentModel; +using System.Reflection; + +[assembly: ExportRenderer(typeof(ZXingScannerView), typeof(ZXingScannerViewRenderer))] +namespace ZXing.Net.Mobile.Forms.WindowsUniversal +{ + //[Preserve(AllMembers = true)] + public class ZXingScannerViewRenderer : ViewRenderer + { + public static void Init() + { + // Cause the assembly to load + } + + protected ZXingScannerView formsView; + + protected ZXing.Mobile.ZXingScannerControl zxingControl; + + protected override async void OnElementChanged(ElementChangedEventArgs e) + { + formsView = Element; + + if (formsView != null && zxingControl == null) + { + formsView.AutoFocusRequested += FormsView_AutoFocusRequested; + + var cameraPermission = await Xamarin.Essentials.Permissions.RequestAsync(); + if (cameraPermission != Xamarin.Essentials.PermissionStatus.Granted) + { + Console.WriteLine("Missing Camera Permission"); + return; + } + + zxingControl = new ZXing.Mobile.ZXingScannerControl(); + zxingControl.ContinuousScanning = true; + zxingControl.UseCustomOverlay = true; + + base.SetNativeControl(zxingControl); + + if (formsView.IsScanning) + zxingControl.StartScanning(formsView.RaiseScanResult, formsView.Options); + + if (!formsView.IsAnalyzing) + zxingControl.PauseAnalysis(); + + if (formsView.IsTorchOn) + zxingControl.Torch(formsView.IsTorchOn); + } + + // Shut the scanner down if necessary + if (formsView == null && e.NewElement == null && zxingControl != null) + { + zxingControl.StopScanning(); + } + + base.OnElementChanged(e); + } + + protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) + { + base.OnElementPropertyChanged(sender, e); + + if (zxingControl == null) + return; + + switch (e.PropertyName) + { + case nameof(ZXingScannerView.IsTorchOn): + zxingControl.Torch(formsView.IsTorchOn); + break; + case nameof(ZXingScannerView.IsScanning): + if (formsView.IsScanning) + zxingControl.StartScanning(formsView.RaiseScanResult, formsView.Options); + else + zxingControl.StopScanning(); + break; + case nameof(ZXingScannerView.IsAnalyzing): + if (formsView.IsAnalyzing) + zxingControl.ResumeAnalysis(); + else + zxingControl.PauseAnalysis(); + break; + } + } + + void FormsView_AutoFocusRequested(int x, int y) + => zxingControl.AutoFocus(x, y); + + protected override async void OnDisconnectVisualChildren() + { + await zxingControl?.StopScanningAsync(); + base.OnDisconnectVisualChildren(); + } + } +} diff --git a/ZXing.Net.Mobile.UITests.sln b/ZXing.Net.Mobile.UITests.sln deleted file mode 100644 index c153b72e2..000000000 --- a/ZXing.Net.Mobile.UITests.sln +++ /dev/null @@ -1,870 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26228.9 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{2DC0C8D5-DF7F-4D96-886D-D7E83522C9BF}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "zxing.portable", "Source\ZXing.Net\Source\lib\zxing.portable.csproj", "{24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Android", "Source\ZXing.Net.Mobile.Android\ZXing.Net.Mobile.Android.csproj", "{AC17589E-C817-4FA8-B3EC-CCEB25E55E59}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.iOS", "Source\ZXing.Net.Mobile.iOS\ZXing.Net.Mobile.iOS.csproj", "{6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Portable", "Source\ZXing.Net.Mobile.Portable\ZXing.Net.Mobile.Portable.csproj", "{78407906-99C6-42B0-A511-973FC78C58CB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Core", "Source\ZXing.Net.Mobile.Core\ZXing.Net.Mobile.Core.csproj", "{7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Forms Libraries", "Forms Libraries", "{72EC3146-EA1B-4963-9248-55065728AF7F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Forms", "Source\ZXing.Net.Mobile.Forms\ZXing.Net.Mobile.Forms.csproj", "{8E54DB74-C094-4016-859A-D1C7F2509A58}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Forms.Android", "Source\ZXing.Net.Mobile.Forms.Android\ZXing.Net.Mobile.Forms.Android.csproj", "{DC2FF2AE-4090-4056-BBE4-087BDE6567BD}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Forms.iOS", "Source\ZXing.Net.Mobile.Forms.iOS\ZXing.Net.Mobile.Forms.iOS.csproj", "{8370ADB4-229C-4DEC-908F-B1A8FC155523}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UITests", "UITests", "{FD73555C-A6FF-4BFB-86FF-D4333DF2AA3B}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{E5ED436F-3AC5-4A3E-AD32-AAAF9C16A782}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.Android", "Samples\Android\Sample.Android\Sample.Android.csproj", "{660D9346-D70B-4C54-8402-E5F6DF48E9AC}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.Android.UITests", "UITests\Sample.Android.UITests\Sample.Android.UITests.csproj", "{BFA131F2-086F-4B18-9920-81EBE09F0D6A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FormsSample", "Samples\Forms\Core\FormsSample.csproj", "{0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FormsSample.Droid", "Samples\Forms\Droid\FormsSample.Droid.csproj", "{D8248617-D905-4F82-95B4-D4027C20278A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FormsSample.UITests", "UITests\FormsSample.UITests\FormsSample.UITests.csproj", "{A0E994BB-0C73-4B4E-9133-D7DDD7866427}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FormsSample.iOS", "Samples\Forms\iOS\FormsSample.iOS.csproj", "{776B89DF-2915-4701-B8A3-127D3340C77F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.iOS.UITests", "UITests\Sample.iOS.UITests\Sample.iOS.UITests.csproj", "{F60C523B-54E7-4283-95A8-01E405E55024}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.iOS", "Samples\iOS\Sample.iOS\Sample.iOS.csproj", "{D119965B-BA8F-40D7-86B4-E9654E1014E2}" -EndProject -Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "UITests.Shared", "UITests\UITests.Shared\UITests.Shared.shproj", "{EB5B7B11-23D4-4427-B016-DAE1E79A77FD}" -EndProject -Global - GlobalSection(SharedMSBuildProjectFiles) = preSolution - UITests\UITests.Shared\UITests.Shared.projitems*{a0e994bb-0c73-4b4e-9133-d7ddd7866427}*SharedItemsImports = 4 - UITests\UITests.Shared\UITests.Shared.projitems*{bfa131f2-086f-4b18-9920-81ebe09f0d6a}*SharedItemsImports = 4 - UITests\UITests.Shared\UITests.Shared.projitems*{eb5b7b11-23d4-4427-b016-dae1e79a77fd}*SharedItemsImports = 13 - UITests\UITests.Shared\UITests.Shared.projitems*{f60c523b-54e7-4283-95a8-01e405e55024}*SharedItemsImports = 4 - EndGlobalSection - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Ad-Hoc|Any CPU = Ad-Hoc|Any CPU - Ad-Hoc|ARM = Ad-Hoc|ARM - Ad-Hoc|iPhone = Ad-Hoc|iPhone - Ad-Hoc|iPhoneSimulator = Ad-Hoc|iPhoneSimulator - Ad-Hoc|x64 = Ad-Hoc|x64 - Ad-Hoc|x86 = Ad-Hoc|x86 - AppStore|Any CPU = AppStore|Any CPU - AppStore|ARM = AppStore|ARM - AppStore|iPhone = AppStore|iPhone - AppStore|iPhoneSimulator = AppStore|iPhoneSimulator - AppStore|x64 = AppStore|x64 - AppStore|x86 = AppStore|x86 - Debug|Any CPU = Debug|Any CPU - Debug|ARM = Debug|ARM - Debug|iPhone = Debug|iPhone - Debug|iPhoneSimulator = Debug|iPhoneSimulator - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|ARM = Release|ARM - Release|iPhone = Release|iPhone - Release|iPhoneSimulator = Release|iPhoneSimulator - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|ARM.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|iPhone.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|x64.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|x86.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|ARM.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|ARM.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|iPhone.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|x64.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|x64.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|x86.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|x86.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|Any CPU.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|ARM.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|ARM.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|iPhone.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|iPhone.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|x64.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|x64.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|x86.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|x86.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Ad-Hoc|ARM.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Ad-Hoc|x64.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Ad-Hoc|x86.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.AppStore|Any CPU.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.AppStore|ARM.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.AppStore|ARM.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.AppStore|iPhone.Build.0 = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.AppStore|x64.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.AppStore|x64.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.AppStore|x86.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.AppStore|x86.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|ARM.ActiveCfg = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|ARM.Build.0 = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|iPhone.Build.0 = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|x64.ActiveCfg = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|x64.Build.0 = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|x86.ActiveCfg = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|x86.Build.0 = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|Any CPU.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|ARM.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|ARM.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|iPhone.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|iPhone.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|x64.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|x64.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|x86.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|x86.Build.0 = Release|Any CPU - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|Any CPU.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|Any CPU.Build.0 = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|ARM.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|ARM.Build.0 = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|iPhone.ActiveCfg = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|iPhone.Build.0 = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|x64.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|x64.Build.0 = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|x86.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|x86.Build.0 = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|Any CPU.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|Any CPU.Build.0 = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|ARM.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|ARM.Build.0 = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|iPhone.ActiveCfg = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|iPhone.Build.0 = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|iPhoneSimulator.Build.0 = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|x64.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|x64.Build.0 = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|x86.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|x86.Build.0 = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|Any CPU.ActiveCfg = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|Any CPU.Build.0 = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|ARM.ActiveCfg = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|iPhone.ActiveCfg = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|iPhone.Build.0 = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|x64.ActiveCfg = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|x86.ActiveCfg = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|Any CPU.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|Any CPU.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|ARM.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|iPhone.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|iPhone.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|x64.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|x86.ActiveCfg = Release|iPhone - {78407906-99C6-42B0-A511-973FC78C58CB}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Ad-Hoc|ARM.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Ad-Hoc|x64.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Ad-Hoc|x86.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.AppStore|Any CPU.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.AppStore|ARM.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.AppStore|ARM.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.AppStore|iPhone.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.AppStore|x64.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.AppStore|x64.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.AppStore|x86.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.AppStore|x86.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|ARM.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|ARM.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|iPhone.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|x64.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|x64.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|x86.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|x86.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|Any CPU.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|ARM.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|ARM.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|iPhone.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|iPhone.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|x64.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|x64.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|x86.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|x86.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|ARM.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|x64.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|x86.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|Any CPU.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|ARM.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|ARM.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|iPhone.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|x64.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|x64.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|x86.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|x86.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|ARM.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|ARM.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|iPhone.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|x64.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|x64.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|x86.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|x86.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|Any CPU.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|ARM.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|ARM.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|iPhone.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|iPhone.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|x64.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|x64.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|x86.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|x86.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Ad-Hoc|ARM.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Ad-Hoc|x64.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Ad-Hoc|x86.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.AppStore|Any CPU.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.AppStore|ARM.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.AppStore|ARM.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.AppStore|iPhone.Build.0 = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.AppStore|x64.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.AppStore|x64.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.AppStore|x86.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.AppStore|x86.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|ARM.ActiveCfg = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|ARM.Build.0 = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|iPhone.Build.0 = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|x64.ActiveCfg = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|x64.Build.0 = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|x86.ActiveCfg = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|x86.Build.0 = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|Any CPU.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|ARM.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|ARM.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|iPhone.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|iPhone.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|x64.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|x64.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|x86.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|x86.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Ad-Hoc|ARM.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Ad-Hoc|x64.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Ad-Hoc|x86.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.AppStore|Any CPU.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.AppStore|ARM.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.AppStore|ARM.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.AppStore|iPhone.Build.0 = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.AppStore|x64.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.AppStore|x64.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.AppStore|x86.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.AppStore|x86.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Debug|ARM.ActiveCfg = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Debug|ARM.Build.0 = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Debug|iPhone.Build.0 = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Debug|x64.ActiveCfg = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Debug|x64.Build.0 = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Debug|x86.ActiveCfg = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Debug|x86.Build.0 = Debug|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Release|Any CPU.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Release|ARM.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Release|ARM.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Release|iPhone.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Release|iPhone.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Release|x64.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Release|x64.Build.0 = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Release|x86.ActiveCfg = Release|Any CPU - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD}.Release|x86.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Ad-Hoc|ARM.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Ad-Hoc|x64.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Ad-Hoc|x86.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.AppStore|Any CPU.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.AppStore|ARM.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.AppStore|ARM.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.AppStore|iPhone.Build.0 = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.AppStore|x64.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.AppStore|x64.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.AppStore|x86.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.AppStore|x86.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Debug|ARM.ActiveCfg = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Debug|ARM.Build.0 = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Debug|iPhone.Build.0 = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Debug|x64.ActiveCfg = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Debug|x64.Build.0 = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Debug|x86.ActiveCfg = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Debug|x86.Build.0 = Debug|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Release|Any CPU.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Release|ARM.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Release|ARM.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Release|iPhone.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Release|iPhone.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Release|x64.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Release|x64.Build.0 = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Release|x86.ActiveCfg = Release|Any CPU - {8370ADB4-229C-4DEC-908F-B1A8FC155523}.Release|x86.Build.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|Any CPU.Deploy.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|ARM.Build.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|ARM.Deploy.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|x64.Build.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|x64.Deploy.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|x86.Build.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|x86.Deploy.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|Any CPU.Build.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|Any CPU.Deploy.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|ARM.ActiveCfg = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|ARM.Build.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|ARM.Deploy.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|iPhone.Build.0 = Debug|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|iPhoneSimulator.Deploy.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|x64.ActiveCfg = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|x64.Build.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|x64.Deploy.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|x86.ActiveCfg = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|x86.Build.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|x86.Deploy.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|ARM.ActiveCfg = Debug|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|ARM.Build.0 = Debug|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|iPhone.Build.0 = Debug|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|x64.ActiveCfg = Debug|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|x64.Build.0 = Debug|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|x86.ActiveCfg = Debug|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|x86.Build.0 = Debug|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|Any CPU.Build.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|ARM.ActiveCfg = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|ARM.Build.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|iPhone.ActiveCfg = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|iPhone.Build.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|x64.ActiveCfg = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|x64.Build.0 = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|x86.ActiveCfg = Release|Any CPU - {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|x86.Build.0 = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Ad-Hoc|ARM.Build.0 = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Ad-Hoc|x64.Build.0 = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Ad-Hoc|x86.Build.0 = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.AppStore|Any CPU.Build.0 = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.AppStore|ARM.ActiveCfg = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.AppStore|ARM.Build.0 = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.AppStore|iPhone.Build.0 = Debug|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.AppStore|x64.ActiveCfg = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.AppStore|x64.Build.0 = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.AppStore|x86.ActiveCfg = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.AppStore|x86.Build.0 = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Debug|ARM.ActiveCfg = Debug|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Debug|ARM.Build.0 = Debug|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Debug|iPhone.Build.0 = Debug|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Debug|x64.ActiveCfg = Debug|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Debug|x64.Build.0 = Debug|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Debug|x86.ActiveCfg = Debug|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Debug|x86.Build.0 = Debug|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Release|Any CPU.Build.0 = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Release|ARM.ActiveCfg = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Release|ARM.Build.0 = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Release|iPhone.ActiveCfg = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Release|iPhone.Build.0 = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Release|x64.ActiveCfg = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Release|x64.Build.0 = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Release|x86.ActiveCfg = Release|Any CPU - {BFA131F2-086F-4B18-9920-81EBE09F0D6A}.Release|x86.Build.0 = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Ad-Hoc|ARM.Build.0 = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Ad-Hoc|x64.Build.0 = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Ad-Hoc|x86.Build.0 = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.AppStore|Any CPU.Build.0 = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.AppStore|ARM.ActiveCfg = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.AppStore|ARM.Build.0 = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.AppStore|iPhone.Build.0 = Debug|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.AppStore|x64.ActiveCfg = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.AppStore|x64.Build.0 = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.AppStore|x86.ActiveCfg = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.AppStore|x86.Build.0 = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Debug|ARM.ActiveCfg = Debug|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Debug|ARM.Build.0 = Debug|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Debug|iPhone.Build.0 = Debug|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Debug|x64.ActiveCfg = Debug|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Debug|x64.Build.0 = Debug|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Debug|x86.ActiveCfg = Debug|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Debug|x86.Build.0 = Debug|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Release|Any CPU.Build.0 = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Release|ARM.ActiveCfg = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Release|ARM.Build.0 = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Release|iPhone.ActiveCfg = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Release|iPhone.Build.0 = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Release|x64.ActiveCfg = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Release|x64.Build.0 = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Release|x86.ActiveCfg = Release|Any CPU - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90}.Release|x86.Build.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Ad-Hoc|Any CPU.Deploy.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Ad-Hoc|ARM.Build.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Ad-Hoc|ARM.Deploy.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Ad-Hoc|x64.Build.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Ad-Hoc|x64.Deploy.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Ad-Hoc|x86.Build.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Ad-Hoc|x86.Deploy.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.AppStore|Any CPU.Build.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.AppStore|Any CPU.Deploy.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.AppStore|ARM.ActiveCfg = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.AppStore|ARM.Build.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.AppStore|ARM.Deploy.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.AppStore|iPhone.Build.0 = Debug|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.AppStore|iPhoneSimulator.Deploy.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.AppStore|x64.ActiveCfg = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.AppStore|x64.Build.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.AppStore|x64.Deploy.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.AppStore|x86.ActiveCfg = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.AppStore|x86.Build.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.AppStore|x86.Deploy.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Debug|ARM.ActiveCfg = Debug|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Debug|ARM.Build.0 = Debug|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Debug|iPhone.Build.0 = Debug|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Debug|x64.ActiveCfg = Debug|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Debug|x64.Build.0 = Debug|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Debug|x86.ActiveCfg = Debug|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Debug|x86.Build.0 = Debug|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Release|Any CPU.Build.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Release|ARM.ActiveCfg = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Release|ARM.Build.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Release|iPhone.ActiveCfg = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Release|iPhone.Build.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Release|x64.ActiveCfg = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Release|x64.Build.0 = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Release|x86.ActiveCfg = Release|Any CPU - {D8248617-D905-4F82-95B4-D4027C20278A}.Release|x86.Build.0 = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Ad-Hoc|ARM.Build.0 = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Ad-Hoc|x64.Build.0 = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Ad-Hoc|x86.Build.0 = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.AppStore|Any CPU.Build.0 = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.AppStore|ARM.ActiveCfg = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.AppStore|ARM.Build.0 = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.AppStore|iPhone.Build.0 = Debug|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.AppStore|x64.ActiveCfg = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.AppStore|x64.Build.0 = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.AppStore|x86.ActiveCfg = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.AppStore|x86.Build.0 = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Debug|ARM.ActiveCfg = Debug|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Debug|ARM.Build.0 = Debug|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Debug|iPhone.Build.0 = Debug|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Debug|x64.ActiveCfg = Debug|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Debug|x64.Build.0 = Debug|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Debug|x86.ActiveCfg = Debug|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Debug|x86.Build.0 = Debug|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Release|Any CPU.Build.0 = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Release|ARM.ActiveCfg = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Release|ARM.Build.0 = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Release|iPhone.ActiveCfg = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Release|iPhone.Build.0 = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Release|x64.ActiveCfg = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Release|x64.Build.0 = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Release|x86.ActiveCfg = Release|Any CPU - {A0E994BB-0C73-4B4E-9133-D7DDD7866427}.Release|x86.Build.0 = Release|Any CPU - {776B89DF-2915-4701-B8A3-127D3340C77F}.Ad-Hoc|Any CPU.ActiveCfg = Release|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.Ad-Hoc|Any CPU.Build.0 = Release|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.Ad-Hoc|ARM.ActiveCfg = Release|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.Ad-Hoc|ARM.Build.0 = Release|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.Ad-Hoc|iPhone.ActiveCfg = Release|iPhone - {776B89DF-2915-4701-B8A3-127D3340C77F}.Ad-Hoc|iPhone.Build.0 = Release|iPhone - {776B89DF-2915-4701-B8A3-127D3340C77F}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.Ad-Hoc|x64.ActiveCfg = Release|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.Ad-Hoc|x64.Build.0 = Release|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.Ad-Hoc|x86.ActiveCfg = Release|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.Ad-Hoc|x86.Build.0 = Release|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.AppStore|Any CPU.ActiveCfg = Release|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.AppStore|Any CPU.Build.0 = Release|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.AppStore|ARM.ActiveCfg = Release|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.AppStore|ARM.Build.0 = Release|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.AppStore|iPhone.ActiveCfg = Release|iPhone - {776B89DF-2915-4701-B8A3-127D3340C77F}.AppStore|iPhone.Build.0 = Release|iPhone - {776B89DF-2915-4701-B8A3-127D3340C77F}.AppStore|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.AppStore|iPhoneSimulator.Build.0 = Release|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.AppStore|x64.ActiveCfg = Release|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.AppStore|x64.Build.0 = Release|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.AppStore|x86.ActiveCfg = Release|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.AppStore|x86.Build.0 = Release|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.Debug|ARM.ActiveCfg = Debug|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.Debug|ARM.Build.0 = Debug|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.Debug|iPhone.ActiveCfg = Debug|iPhone - {776B89DF-2915-4701-B8A3-127D3340C77F}.Debug|iPhone.Build.0 = Debug|iPhone - {776B89DF-2915-4701-B8A3-127D3340C77F}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.Debug|x64.ActiveCfg = Debug|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.Debug|x64.Build.0 = Debug|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.Debug|x86.ActiveCfg = Debug|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.Debug|x86.Build.0 = Debug|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.Release|Any CPU.ActiveCfg = Release|iPhone - {776B89DF-2915-4701-B8A3-127D3340C77F}.Release|Any CPU.Build.0 = Release|iPhone - {776B89DF-2915-4701-B8A3-127D3340C77F}.Release|ARM.ActiveCfg = Release|iPhone - {776B89DF-2915-4701-B8A3-127D3340C77F}.Release|ARM.Build.0 = Release|iPhone - {776B89DF-2915-4701-B8A3-127D3340C77F}.Release|iPhone.ActiveCfg = Release|iPhone - {776B89DF-2915-4701-B8A3-127D3340C77F}.Release|iPhone.Build.0 = Release|iPhone - {776B89DF-2915-4701-B8A3-127D3340C77F}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator - {776B89DF-2915-4701-B8A3-127D3340C77F}.Release|x64.ActiveCfg = Release|iPhone - {776B89DF-2915-4701-B8A3-127D3340C77F}.Release|x64.Build.0 = Release|iPhone - {776B89DF-2915-4701-B8A3-127D3340C77F}.Release|x86.ActiveCfg = Release|iPhone - {776B89DF-2915-4701-B8A3-127D3340C77F}.Release|x86.Build.0 = Release|iPhone - {F60C523B-54E7-4283-95A8-01E405E55024}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Ad-Hoc|ARM.Build.0 = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Ad-Hoc|x64.Build.0 = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Ad-Hoc|x86.Build.0 = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.AppStore|Any CPU.Build.0 = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.AppStore|ARM.ActiveCfg = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.AppStore|ARM.Build.0 = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.AppStore|iPhone.Build.0 = Debug|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.AppStore|x64.ActiveCfg = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.AppStore|x64.Build.0 = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.AppStore|x86.ActiveCfg = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.AppStore|x86.Build.0 = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Debug|ARM.ActiveCfg = Debug|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Debug|ARM.Build.0 = Debug|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Debug|iPhone.Build.0 = Debug|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Debug|x64.ActiveCfg = Debug|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Debug|x64.Build.0 = Debug|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Debug|x86.ActiveCfg = Debug|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Debug|x86.Build.0 = Debug|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Release|Any CPU.Build.0 = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Release|ARM.ActiveCfg = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Release|ARM.Build.0 = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Release|iPhone.ActiveCfg = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Release|iPhone.Build.0 = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Release|x64.ActiveCfg = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Release|x64.Build.0 = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Release|x86.ActiveCfg = Release|Any CPU - {F60C523B-54E7-4283-95A8-01E405E55024}.Release|x86.Build.0 = Release|Any CPU - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Ad-Hoc|Any CPU.ActiveCfg = Ad-Hoc|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Ad-Hoc|ARM.ActiveCfg = Ad-Hoc|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Ad-Hoc|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Ad-Hoc|iPhoneSimulator.Build.0 = Ad-Hoc|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Ad-Hoc|x64.ActiveCfg = Ad-Hoc|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Ad-Hoc|x86.ActiveCfg = Ad-Hoc|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.AppStore|Any CPU.ActiveCfg = AppStore|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.AppStore|ARM.ActiveCfg = AppStore|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.AppStore|iPhone.ActiveCfg = AppStore|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.AppStore|iPhone.Build.0 = AppStore|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.AppStore|iPhoneSimulator.ActiveCfg = AppStore|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.AppStore|iPhoneSimulator.Build.0 = AppStore|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.AppStore|x64.ActiveCfg = AppStore|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.AppStore|x86.ActiveCfg = AppStore|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|ARM.ActiveCfg = Debug|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|ARM.Build.0 = Debug|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|iPhone.ActiveCfg = Debug|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|iPhone.Build.0 = Debug|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|x64.ActiveCfg = Debug|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|x64.Build.0 = Debug|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|x86.ActiveCfg = Debug|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|x86.Build.0 = Debug|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|Any CPU.ActiveCfg = Release|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|Any CPU.Build.0 = Release|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|ARM.ActiveCfg = Release|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|ARM.Build.0 = Release|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|iPhone.ActiveCfg = Release|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|iPhone.Build.0 = Release|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|x64.ActiveCfg = Release|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|x64.Build.0 = Release|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|x86.ActiveCfg = Release|iPhone - {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|x86.Build.0 = Release|iPhone - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3} = {2DC0C8D5-DF7F-4D96-886D-D7E83522C9BF} - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59} = {2DC0C8D5-DF7F-4D96-886D-D7E83522C9BF} - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A} = {2DC0C8D5-DF7F-4D96-886D-D7E83522C9BF} - {78407906-99C6-42B0-A511-973FC78C58CB} = {2DC0C8D5-DF7F-4D96-886D-D7E83522C9BF} - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB} = {2DC0C8D5-DF7F-4D96-886D-D7E83522C9BF} - {8E54DB74-C094-4016-859A-D1C7F2509A58} = {72EC3146-EA1B-4963-9248-55065728AF7F} - {DC2FF2AE-4090-4056-BBE4-087BDE6567BD} = {72EC3146-EA1B-4963-9248-55065728AF7F} - {8370ADB4-229C-4DEC-908F-B1A8FC155523} = {72EC3146-EA1B-4963-9248-55065728AF7F} - {660D9346-D70B-4C54-8402-E5F6DF48E9AC} = {E5ED436F-3AC5-4A3E-AD32-AAAF9C16A782} - {BFA131F2-086F-4B18-9920-81EBE09F0D6A} = {FD73555C-A6FF-4BFB-86FF-D4333DF2AA3B} - {0DAF97CA-02DB-4E4F-9163-B8F14EAE2D90} = {E5ED436F-3AC5-4A3E-AD32-AAAF9C16A782} - {D8248617-D905-4F82-95B4-D4027C20278A} = {E5ED436F-3AC5-4A3E-AD32-AAAF9C16A782} - {A0E994BB-0C73-4B4E-9133-D7DDD7866427} = {FD73555C-A6FF-4BFB-86FF-D4333DF2AA3B} - {776B89DF-2915-4701-B8A3-127D3340C77F} = {E5ED436F-3AC5-4A3E-AD32-AAAF9C16A782} - {F60C523B-54E7-4283-95A8-01E405E55024} = {FD73555C-A6FF-4BFB-86FF-D4333DF2AA3B} - {D119965B-BA8F-40D7-86B4-E9654E1014E2} = {E5ED436F-3AC5-4A3E-AD32-AAAF9C16A782} - {EB5B7B11-23D4-4427-B016-DAE1E79A77FD} = {FD73555C-A6FF-4BFB-86FF-D4333DF2AA3B} - EndGlobalSection -EndGlobal diff --git a/ZXing.Net.Mobile.WP8.sln b/ZXing.Net.Mobile.WP8.sln deleted file mode 100644 index 92f0ebc04..000000000 --- a/ZXing.Net.Mobile.WP8.sln +++ /dev/null @@ -1,401 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{2DC0C8D5-DF7F-4D96-886D-D7E83522C9BF}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "zxing.portable", "Source\ZXing.Net\Source\lib\zxing.portable.csproj", "{24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.WindowsRT", "Source\ZXing.Net.Mobile.WindowsRT\ZXing.Net.Mobile.WindowsRT.csproj", "{10EB06B2-7231-40DF-8930-7781C82B65DB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Portable", "Source\ZXing.Net.Mobile.Portable\ZXing.Net.Mobile.Portable.csproj", "{78407906-99C6-42B0-A511-973FC78C58CB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Core", "Source\ZXing.Net.Mobile.Core\ZXing.Net.Mobile.Core.csproj", "{7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Forms Libraries", "Forms Libraries", "{72EC3146-EA1B-4963-9248-55065728AF7F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.WindowsPhone", "Source\ZXing.Net.Mobile.WindowsPhone\ZXing.Net.Mobile.WindowsPhone.csproj", "{C9EFC2F6-AC4C-446C-8FBF-91824B00431D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Forms", "Source\ZXing.Net.Mobile.Forms\ZXing.Net.Mobile.Forms.csproj", "{8E54DB74-C094-4016-859A-D1C7F2509A58}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Forms.WindowsPhone", "Source\ZXing.Net.Mobile.Forms.WindowsPhone\ZXing.Net.Mobile.Forms.WindowsPhone.csproj", "{9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|ARM = Debug|ARM - Debug|iPhone = Debug|iPhone - Debug|iPhoneSimulator = Debug|iPhoneSimulator - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|ARM = Release|ARM - Release|iPhone = Release|iPhone - Release|iPhoneSimulator = Release|iPhoneSimulator - Release|x64 = Release|x64 - Release|x86 = Release|x86 - ReleaseMac|Any CPU = ReleaseMac|Any CPU - ReleaseMac|ARM = ReleaseMac|ARM - ReleaseMac|iPhone = ReleaseMac|iPhone - ReleaseMac|iPhoneSimulator = ReleaseMac|iPhoneSimulator - ReleaseMac|x64 = ReleaseMac|x64 - ReleaseMac|x86 = ReleaseMac|x86 - ReleaseWin|Any CPU = ReleaseWin|Any CPU - ReleaseWin|ARM = ReleaseWin|ARM - ReleaseWin|iPhone = ReleaseWin|iPhone - ReleaseWin|iPhoneSimulator = ReleaseWin|iPhoneSimulator - ReleaseWin|x64 = ReleaseWin|x64 - ReleaseWin|x86 = ReleaseWin|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|ARM.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|ARM.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|iPhone.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|x64.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|x64.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|x86.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|x86.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|Any CPU.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|ARM.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|ARM.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|iPhone.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|iPhone.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|x64.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|x64.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|x86.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|x86.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|ARM.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|ARM.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|iPhone.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|iPhone.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|iPhoneSimulator.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|x64.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|x64.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|x86.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|x86.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|Any CPU.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|Any CPU.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|ARM.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|ARM.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|iPhone.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|iPhone.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|iPhoneSimulator.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|x64.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|x64.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|x86.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|x86.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|ARM.ActiveCfg = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|ARM.Build.0 = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|iPhone.Build.0 = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|x64.ActiveCfg = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|x64.Build.0 = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|x86.ActiveCfg = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|x86.Build.0 = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|Any CPU.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|ARM.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|ARM.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|iPhone.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|iPhone.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|x64.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|x64.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|x86.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|x86.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|ARM.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|ARM.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|iPhone.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|iPhone.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|iPhoneSimulator.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|x64.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|x64.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|x86.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|x86.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|Any CPU.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|Any CPU.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|ARM.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|ARM.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|iPhone.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|iPhone.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|iPhoneSimulator.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|x64.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|x64.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|x86.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|x86.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|ARM.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|ARM.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|iPhone.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|x64.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|x64.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|x86.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|x86.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|Any CPU.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|ARM.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|ARM.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|iPhone.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|iPhone.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|x64.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|x64.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|x86.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|x86.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|ARM.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|ARM.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|iPhone.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|iPhone.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|iPhoneSimulator.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|x64.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|x64.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|x86.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|x86.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|Any CPU.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|Any CPU.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|ARM.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|ARM.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|iPhone.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|iPhone.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|iPhoneSimulator.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|x64.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|x64.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|x86.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|x86.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|ARM.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|ARM.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|iPhone.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|x64.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|x64.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|x86.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|x86.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|Any CPU.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|ARM.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|ARM.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|iPhone.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|iPhone.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|x64.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|x64.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|x86.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|x86.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|ARM.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|ARM.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|iPhone.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|iPhone.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|iPhoneSimulator.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|x64.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|x64.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|x86.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|x86.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|Any CPU.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|Any CPU.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|ARM.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|ARM.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|iPhone.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|iPhone.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|iPhoneSimulator.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|x64.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|x64.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|x86.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|x86.Build.0 = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Debug|ARM.ActiveCfg = Debug|ARM - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Debug|ARM.Build.0 = Debug|ARM - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Debug|iPhone.Build.0 = Debug|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Debug|x64.ActiveCfg = Debug|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Debug|x64.Build.0 = Debug|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Debug|x86.ActiveCfg = Debug|x86 - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Debug|x86.Build.0 = Debug|x86 - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Release|Any CPU.Build.0 = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Release|ARM.ActiveCfg = Release|ARM - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Release|ARM.Build.0 = Release|ARM - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Release|iPhone.ActiveCfg = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Release|iPhone.Build.0 = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Release|x64.ActiveCfg = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Release|x64.Build.0 = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Release|x86.ActiveCfg = Release|x86 - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.Release|x86.Build.0 = Release|x86 - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.ReleaseMac|ARM.ActiveCfg = Release|ARM - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.ReleaseMac|ARM.Build.0 = Release|ARM - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.ReleaseMac|iPhone.ActiveCfg = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.ReleaseMac|iPhone.Build.0 = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.ReleaseMac|iPhoneSimulator.Build.0 = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.ReleaseMac|x64.ActiveCfg = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.ReleaseMac|x64.Build.0 = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.ReleaseMac|x86.ActiveCfg = Release|x86 - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.ReleaseMac|x86.Build.0 = Release|x86 - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.ReleaseWin|Any CPU.ActiveCfg = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.ReleaseWin|Any CPU.Build.0 = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.ReleaseWin|ARM.ActiveCfg = Release|ARM - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.ReleaseWin|ARM.Build.0 = Release|ARM - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.ReleaseWin|iPhone.ActiveCfg = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.ReleaseWin|iPhone.Build.0 = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.ReleaseWin|iPhoneSimulator.Build.0 = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.ReleaseWin|x64.ActiveCfg = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.ReleaseWin|x64.Build.0 = Release|Any CPU - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.ReleaseWin|x86.ActiveCfg = Release|x86 - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D}.ReleaseWin|x86.Build.0 = Release|x86 - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|ARM.ActiveCfg = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|ARM.Build.0 = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|iPhone.Build.0 = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|x64.ActiveCfg = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|x64.Build.0 = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|x86.ActiveCfg = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Debug|x86.Build.0 = Debug|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|Any CPU.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|ARM.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|ARM.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|iPhone.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|iPhone.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|x64.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|x64.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|x86.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.Release|x86.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseMac|ARM.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseMac|ARM.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseMac|iPhone.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseMac|iPhone.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseMac|iPhoneSimulator.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseMac|x64.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseMac|x64.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseMac|x86.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseMac|x86.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseWin|Any CPU.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseWin|Any CPU.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseWin|ARM.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseWin|ARM.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseWin|iPhone.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseWin|iPhone.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseWin|iPhoneSimulator.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseWin|x64.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseWin|x64.Build.0 = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseWin|x86.ActiveCfg = Release|Any CPU - {8E54DB74-C094-4016-859A-D1C7F2509A58}.ReleaseWin|x86.Build.0 = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.Debug|ARM.ActiveCfg = Debug|ARM - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.Debug|ARM.Build.0 = Debug|ARM - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.Debug|iPhone.Build.0 = Debug|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.Debug|x64.ActiveCfg = Debug|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.Debug|x64.Build.0 = Debug|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.Debug|x86.ActiveCfg = Debug|x86 - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.Debug|x86.Build.0 = Debug|x86 - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.Release|Any CPU.Build.0 = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.Release|ARM.ActiveCfg = Release|ARM - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.Release|ARM.Build.0 = Release|ARM - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.Release|iPhone.ActiveCfg = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.Release|iPhone.Build.0 = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.Release|x64.ActiveCfg = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.Release|x64.Build.0 = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.Release|x86.ActiveCfg = Release|x86 - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.Release|x86.Build.0 = Release|x86 - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.ReleaseMac|ARM.ActiveCfg = Release|ARM - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.ReleaseMac|ARM.Build.0 = Release|ARM - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.ReleaseMac|iPhone.ActiveCfg = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.ReleaseMac|iPhone.Build.0 = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.ReleaseMac|iPhoneSimulator.Build.0 = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.ReleaseMac|x64.ActiveCfg = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.ReleaseMac|x64.Build.0 = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.ReleaseMac|x86.ActiveCfg = Release|x86 - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.ReleaseMac|x86.Build.0 = Release|x86 - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.ReleaseWin|Any CPU.ActiveCfg = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.ReleaseWin|Any CPU.Build.0 = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.ReleaseWin|ARM.ActiveCfg = Release|ARM - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.ReleaseWin|ARM.Build.0 = Release|ARM - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.ReleaseWin|iPhone.ActiveCfg = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.ReleaseWin|iPhone.Build.0 = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.ReleaseWin|iPhoneSimulator.Build.0 = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.ReleaseWin|x64.ActiveCfg = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.ReleaseWin|x64.Build.0 = Release|Any CPU - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.ReleaseWin|x86.ActiveCfg = Release|x86 - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF}.ReleaseWin|x86.Build.0 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3} = {2DC0C8D5-DF7F-4D96-886D-D7E83522C9BF} - {10EB06B2-7231-40DF-8930-7781C82B65DB} = {2DC0C8D5-DF7F-4D96-886D-D7E83522C9BF} - {78407906-99C6-42B0-A511-973FC78C58CB} = {2DC0C8D5-DF7F-4D96-886D-D7E83522C9BF} - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB} = {2DC0C8D5-DF7F-4D96-886D-D7E83522C9BF} - {C9EFC2F6-AC4C-446C-8FBF-91824B00431D} = {2DC0C8D5-DF7F-4D96-886D-D7E83522C9BF} - {8E54DB74-C094-4016-859A-D1C7F2509A58} = {72EC3146-EA1B-4963-9248-55065728AF7F} - {9A761ACB-26DA-4185-8008-D4CDE7D2F0BF} = {72EC3146-EA1B-4963-9248-55065728AF7F} - EndGlobalSection -EndGlobal diff --git a/ZXing.Net.Mobile.nuspec b/ZXing.Net.Mobile.nuspec deleted file mode 100644 index 1ae4aadfc..000000000 --- a/ZXing.Net.Mobile.nuspec +++ /dev/null @@ -1,83 +0,0 @@ - - - - ZXing.Net.Mobile - $version$ - ZXing.Net.Mobile Barcode Scanner - Redth - http://raw.github.com/Redth/ZXing.Net.Mobile/master/License.md - http://github.com/Redth/ZXing.Net.Mobile - http://raw.github.com/Redth/ZXing.Net.Mobile/master/Art/ZXing.Net.Mobile-Icon.png - false - - ZXing.Net.Mobile is a C#/.NET library based on the open source Barcode Library: ZXing (Zebra Crossing), using the ZXing.Net Port. It works with Xamarin.iOS, Xamarin.Android, Windows Phone (Silverlight) and Windows Universal. The goal of ZXing.Net.Mobile is to make scanning barcodes as effortless and painless as possible in your own applications. - - See https://github.com/Redth/ZXing.Net.Mobile/releases for release notes. - - ZXing Barcode Scanning for your Xamarin.iOS, Xamarin.Android, Windows Phone (Silverlight) and Windows Universal apps! - - barcode, zxing, zxing.net, qr, scan, scanning, scanner - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ZXing.Net.Mobile.sln b/ZXing.Net.Mobile.sln index 61a8c38c7..86edaa3b2 100644 --- a/ZXing.Net.Mobile.sln +++ b/ZXing.Net.Mobile.sln @@ -1,510 +1,698 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26228.9 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29806.167 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "zxing.portable", "Source\ZXing.Net\Source\lib\zxing.portable.csproj", "{24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ZXing.Net.Mobile", "ZXing.Net.Mobile\ZXing.Net.Mobile.csproj", "{8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Portable", "Source\ZXing.Net.Mobile.Portable\ZXing.Net.Mobile.Portable.csproj", "{78407906-99C6-42B0-A511-973FC78C58CB}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ZXing.Net.Mobile.Forms", "ZXing.Net.Mobile.Forms\ZXing.Net.Mobile.Forms.csproj", "{BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Android", "Source\ZXing.Net.Mobile.Android\ZXing.Net.Mobile.Android.csproj", "{AC17589E-C817-4FA8-B3EC-CCEB25E55E59}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4DE853DC-8EDA-44D4-8B67-BAF575B70E6F}" + ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig + EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.iOS", "Source\ZXing.Net.Mobile.iOS\ZXing.Net.Mobile.iOS.csproj", "{6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{5BE76DF7-1002-4733-9905-45BE08E377A5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.WindowsUniversal", "Source\ZXing.Net.Mobile.WindowsUniversal\ZXing.Net.Mobile.WindowsUniversal.csproj", "{1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.Android", "Samples\Sample.Android\Sample.Android.csproj", "{660D9346-D70B-4C54-8402-E5F6DF48E9AC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.WindowsRT", "Source\ZXing.Net.Mobile.WindowsRT\ZXing.Net.Mobile.WindowsRT.csproj", "{10EB06B2-7231-40DF-8930-7781C82B65DB}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.iOS", "Samples\Sample.iOS\Sample.iOS.csproj", "{D119965B-BA8F-40D7-86B4-E9654E1014E2}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{EC2F2D7F-EA57-45A9-BD3E-7D8DA5A78FB1}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Forms Sample", "Forms Sample", "{E0DF8E5D-AF49-43C9-9921-D67268E75964}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZXing.Net.Mobile.Core", "Source\ZXing.Net.Mobile.Core\ZXing.Net.Mobile.Core.csproj", "{7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.Uwp", "Samples\Sample.Uwp\Sample.Uwp.csproj", "{2D97B30F-94A0-4631-9276-3ED17F392184}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.Forms", "Samples\Sample.Forms\Sample.Forms\Sample.Forms.csproj", "{CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.Forms.Android", "Samples\Sample.Forms\Sample.Forms.Android\Sample.Forms.Android.csproj", "{C63CCA38-6CC2-480B-9CDA-A64074C7CC46}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.Forms.iOS", "Samples\Sample.Forms\Sample.Forms.iOS\Sample.Forms.iOS.csproj", "{CFF9673E-1188-4646-BCC7-F7601F3A1D1A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.Forms.UWP", "Samples\Sample.Forms\Sample.Forms.UWP\Sample.Forms.UWP.csproj", "{96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.Forms.Tizen", "Samples\Sample.Forms\Sample.Forms.Tizen\Sample.Forms.Tizen.csproj", "{9CBD2F34-9649-48DE-9B35-0D1291F4E714}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Ad-Hoc|Any CPU = Ad-Hoc|Any CPU Ad-Hoc|ARM = Ad-Hoc|ARM + Ad-Hoc|ARM64 = Ad-Hoc|ARM64 Ad-Hoc|iPhone = Ad-Hoc|iPhone Ad-Hoc|iPhoneSimulator = Ad-Hoc|iPhoneSimulator Ad-Hoc|x64 = Ad-Hoc|x64 Ad-Hoc|x86 = Ad-Hoc|x86 AppStore|Any CPU = AppStore|Any CPU AppStore|ARM = AppStore|ARM + AppStore|ARM64 = AppStore|ARM64 AppStore|iPhone = AppStore|iPhone AppStore|iPhoneSimulator = AppStore|iPhoneSimulator AppStore|x64 = AppStore|x64 AppStore|x86 = AppStore|x86 Debug|Any CPU = Debug|Any CPU Debug|ARM = Debug|ARM + Debug|ARM64 = Debug|ARM64 Debug|iPhone = Debug|iPhone Debug|iPhoneSimulator = Debug|iPhoneSimulator Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU Release|ARM = Release|ARM + Release|ARM64 = Release|ARM64 Release|iPhone = Release|iPhone Release|iPhoneSimulator = Release|iPhoneSimulator Release|x64 = Release|x64 Release|x86 = Release|x86 - ReleaseMac|Any CPU = ReleaseMac|Any CPU - ReleaseMac|ARM = ReleaseMac|ARM - ReleaseMac|iPhone = ReleaseMac|iPhone - ReleaseMac|iPhoneSimulator = ReleaseMac|iPhoneSimulator - ReleaseMac|x64 = ReleaseMac|x64 - ReleaseMac|x86 = ReleaseMac|x86 - ReleaseWin|Any CPU = ReleaseWin|Any CPU - ReleaseWin|ARM = ReleaseWin|ARM - ReleaseWin|iPhone = ReleaseWin|iPhone - ReleaseWin|iPhoneSimulator = ReleaseWin|iPhoneSimulator - ReleaseWin|x64 = ReleaseWin|x64 - ReleaseWin|x86 = ReleaseWin|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|ARM.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|x64.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Ad-Hoc|x86.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|Any CPU.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|ARM.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|ARM.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|iPhone.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|iPhone.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|x64.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|x64.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|x86.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.AppStore|x86.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|ARM.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|ARM.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|iPhone.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|x64.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|x64.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|x86.ActiveCfg = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Debug|x86.Build.0 = Debug|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|Any CPU.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|ARM.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|ARM.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|iPhone.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|iPhone.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|x64.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|x64.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|x86.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.Release|x86.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|ARM.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|iPhone.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|x64.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseMac|x86.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|Any CPU.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|Any CPU.Build.0 = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|ARM.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|iPhone.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|x64.ActiveCfg = Release|Any CPU - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3}.ReleaseWin|x86.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Ad-Hoc|ARM.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Ad-Hoc|x64.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Ad-Hoc|x86.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.AppStore|Any CPU.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.AppStore|ARM.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.AppStore|ARM.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.AppStore|iPhone.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.AppStore|iPhone.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.AppStore|x64.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.AppStore|x64.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.AppStore|x86.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.AppStore|x86.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|ARM.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|ARM.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|iPhone.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|x64.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|x64.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|x86.ActiveCfg = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Debug|x86.Build.0 = Debug|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|Any CPU.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|ARM.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|ARM.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|iPhone.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|iPhone.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|x64.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|x64.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|x86.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.Release|x86.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|ARM.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|iPhone.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|x64.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseMac|x86.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|Any CPU.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|Any CPU.Build.0 = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|ARM.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|iPhone.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|x64.ActiveCfg = Release|Any CPU - {78407906-99C6-42B0-A511-973FC78C58CB}.ReleaseWin|x86.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Ad-Hoc|ARM.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Ad-Hoc|x64.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Ad-Hoc|x86.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.AppStore|Any CPU.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.AppStore|ARM.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.AppStore|ARM.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.AppStore|iPhone.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.AppStore|iPhone.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.AppStore|x64.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.AppStore|x64.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.AppStore|x86.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.AppStore|x86.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|ARM.ActiveCfg = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|ARM.Build.0 = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|iPhone.Build.0 = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|x64.ActiveCfg = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|x64.Build.0 = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|x86.ActiveCfg = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Debug|x86.Build.0 = Debug|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|Any CPU.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|ARM.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|ARM.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|iPhone.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|iPhone.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|x64.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|x64.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|x86.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.Release|x86.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseMac|ARM.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseMac|iPhone.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseMac|x64.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseMac|x86.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseWin|Any CPU.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseWin|Any CPU.Build.0 = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseWin|ARM.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseWin|iPhone.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseWin|x64.ActiveCfg = Release|Any CPU - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59}.ReleaseWin|x86.ActiveCfg = Release|Any CPU - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|Any CPU.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|Any CPU.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|ARM.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|ARM.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|iPhone.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|iPhone.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|x64.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|x64.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|x86.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Ad-Hoc|x86.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|Any CPU.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|Any CPU.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|ARM.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|ARM.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|iPhone.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|iPhone.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|iPhoneSimulator.Build.0 = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|x64.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|x64.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|x86.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.AppStore|x86.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|Any CPU.ActiveCfg = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|ARM.ActiveCfg = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|iPhone.ActiveCfg = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|iPhone.Build.0 = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|x64.ActiveCfg = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Debug|x86.ActiveCfg = Debug|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|Any CPU.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|ARM.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|iPhone.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|iPhone.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|x64.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.Release|x86.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseMac|Any CPU.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseMac|Any CPU.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseMac|ARM.ActiveCfg = Debug|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseMac|iPhone.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseMac|x64.ActiveCfg = Debug|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseMac|x86.ActiveCfg = Debug|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseWin|Any CPU.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseWin|Any CPU.Build.0 = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseWin|ARM.ActiveCfg = Debug|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseWin|iPhone.ActiveCfg = Release|iPhone - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseWin|x64.ActiveCfg = Debug|iPhoneSimulator - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A}.ReleaseWin|x86.ActiveCfg = Debug|iPhoneSimulator - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Ad-Hoc|ARM.ActiveCfg = Release|ARM - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Ad-Hoc|ARM.Build.0 = Release|ARM - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Ad-Hoc|x64.ActiveCfg = Release|x64 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Ad-Hoc|x64.Build.0 = Release|x64 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Ad-Hoc|x86.ActiveCfg = Release|x86 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Ad-Hoc|x86.Build.0 = Release|x86 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.AppStore|Any CPU.Build.0 = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.AppStore|ARM.ActiveCfg = Release|ARM - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.AppStore|ARM.Build.0 = Release|ARM - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.AppStore|iPhone.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.AppStore|iPhone.Build.0 = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.AppStore|x64.ActiveCfg = Release|x64 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.AppStore|x64.Build.0 = Release|x64 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.AppStore|x86.ActiveCfg = Release|x86 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.AppStore|x86.Build.0 = Release|x86 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|ARM.ActiveCfg = Debug|ARM - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|ARM.Build.0 = Debug|ARM - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|iPhone.Build.0 = Debug|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|x64.ActiveCfg = Debug|x64 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|x64.Build.0 = Debug|x64 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|x86.ActiveCfg = Debug|x86 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Debug|x86.Build.0 = Debug|x86 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|Any CPU.Build.0 = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|ARM.ActiveCfg = Release|ARM - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|ARM.Build.0 = Release|ARM - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|iPhone.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|iPhone.Build.0 = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|x64.ActiveCfg = Release|x64 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|x64.Build.0 = Release|x64 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|x86.ActiveCfg = Release|x86 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.Release|x86.Build.0 = Release|x86 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseMac|ARM.ActiveCfg = Release|ARM - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseMac|ARM.Build.0 = Release|ARM - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseMac|iPhone.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseMac|iPhone.Build.0 = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseMac|iPhoneSimulator.Build.0 = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseMac|x64.ActiveCfg = Release|x64 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseMac|x64.Build.0 = Release|x64 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseMac|x86.ActiveCfg = Release|x86 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseMac|x86.Build.0 = Release|x86 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseWin|Any CPU.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseWin|Any CPU.Build.0 = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseWin|ARM.ActiveCfg = Release|ARM - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseWin|ARM.Build.0 = Release|ARM - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseWin|iPhone.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseWin|iPhone.Build.0 = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseWin|iPhoneSimulator.Build.0 = Release|Any CPU - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseWin|x64.ActiveCfg = Release|x64 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseWin|x64.Build.0 = Release|x64 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseWin|x86.ActiveCfg = Release|x86 - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2}.ReleaseWin|x86.Build.0 = Release|x86 - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Ad-Hoc|ARM.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Ad-Hoc|x64.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Ad-Hoc|x86.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.AppStore|Any CPU.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.AppStore|ARM.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.AppStore|ARM.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.AppStore|iPhone.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.AppStore|iPhone.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.AppStore|x64.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.AppStore|x64.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.AppStore|x86.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.AppStore|x86.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|ARM.ActiveCfg = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|ARM.Build.0 = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|iPhone.Build.0 = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|x64.ActiveCfg = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|x64.Build.0 = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|x86.ActiveCfg = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Debug|x86.Build.0 = Debug|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|Any CPU.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|ARM.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|ARM.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|iPhone.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|iPhone.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|x64.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|x64.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|x86.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.Release|x86.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|ARM.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|iPhone.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|x64.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseMac|x86.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|Any CPU.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|Any CPU.Build.0 = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|ARM.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|iPhone.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|x64.ActiveCfg = Release|Any CPU - {10EB06B2-7231-40DF-8930-7781C82B65DB}.ReleaseWin|x86.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|ARM.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|x64.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Ad-Hoc|x86.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|Any CPU.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|ARM.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|ARM.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|iPhone.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|iPhone.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|x64.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|x64.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|x86.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.AppStore|x86.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|ARM.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|ARM.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|iPhone.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|x64.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|x64.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|x86.ActiveCfg = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Debug|x86.Build.0 = Debug|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|Any CPU.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|ARM.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|ARM.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|iPhone.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|iPhone.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|x64.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|x64.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|x86.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.Release|x86.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|ARM.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|iPhone.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|iPhoneSimulator.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|x64.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseMac|x86.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|Any CPU.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|Any CPU.Build.0 = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|ARM.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|iPhone.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|iPhoneSimulator.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|x64.ActiveCfg = Release|Any CPU - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB}.ReleaseWin|x86.ActiveCfg = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Ad-Hoc|ARM.Build.0 = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Ad-Hoc|ARM64.ActiveCfg = Debug|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Ad-Hoc|ARM64.Build.0 = Debug|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Ad-Hoc|x64.Build.0 = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Ad-Hoc|x86.Build.0 = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.AppStore|Any CPU.ActiveCfg = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.AppStore|Any CPU.Build.0 = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.AppStore|ARM.ActiveCfg = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.AppStore|ARM.Build.0 = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.AppStore|ARM64.ActiveCfg = Debug|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.AppStore|ARM64.Build.0 = Debug|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.AppStore|iPhone.ActiveCfg = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.AppStore|iPhone.Build.0 = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.AppStore|x64.ActiveCfg = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.AppStore|x64.Build.0 = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.AppStore|x86.ActiveCfg = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.AppStore|x86.Build.0 = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Debug|ARM.ActiveCfg = Debug|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Debug|ARM.Build.0 = Debug|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Debug|ARM64.Build.0 = Debug|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Debug|iPhone.Build.0 = Debug|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Debug|x64.ActiveCfg = Debug|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Debug|x64.Build.0 = Debug|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Debug|x86.ActiveCfg = Debug|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Debug|x86.Build.0 = Debug|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Release|Any CPU.Build.0 = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Release|ARM.ActiveCfg = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Release|ARM.Build.0 = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Release|ARM64.ActiveCfg = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Release|ARM64.Build.0 = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Release|iPhone.ActiveCfg = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Release|iPhone.Build.0 = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Release|x64.ActiveCfg = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Release|x64.Build.0 = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Release|x86.ActiveCfg = Release|Any CPU + {8B7A8AB6-35A4-4C9C-83E1-96BA8BE3C941}.Release|x86.Build.0 = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Ad-Hoc|ARM.Build.0 = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Ad-Hoc|ARM64.ActiveCfg = Debug|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Ad-Hoc|ARM64.Build.0 = Debug|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Ad-Hoc|x64.Build.0 = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Ad-Hoc|x86.Build.0 = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.AppStore|Any CPU.ActiveCfg = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.AppStore|Any CPU.Build.0 = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.AppStore|ARM.ActiveCfg = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.AppStore|ARM.Build.0 = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.AppStore|ARM64.ActiveCfg = Debug|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.AppStore|ARM64.Build.0 = Debug|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.AppStore|iPhone.ActiveCfg = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.AppStore|iPhone.Build.0 = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.AppStore|x64.ActiveCfg = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.AppStore|x64.Build.0 = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.AppStore|x86.ActiveCfg = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.AppStore|x86.Build.0 = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Debug|ARM.ActiveCfg = Debug|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Debug|ARM.Build.0 = Debug|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Debug|ARM64.Build.0 = Debug|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Debug|iPhone.Build.0 = Debug|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Debug|x64.ActiveCfg = Debug|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Debug|x64.Build.0 = Debug|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Debug|x86.ActiveCfg = Debug|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Debug|x86.Build.0 = Debug|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Release|Any CPU.Build.0 = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Release|ARM.ActiveCfg = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Release|ARM.Build.0 = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Release|ARM64.ActiveCfg = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Release|ARM64.Build.0 = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Release|iPhone.ActiveCfg = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Release|iPhone.Build.0 = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Release|x64.ActiveCfg = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Release|x64.Build.0 = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Release|x86.ActiveCfg = Release|Any CPU + {BC6F43C4-0FFA-487B-B74F-B26A8C8B3809}.Release|x86.Build.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|Any CPU.Deploy.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|ARM.Build.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|ARM.Deploy.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|ARM64.ActiveCfg = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|ARM64.Build.0 = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|ARM64.Deploy.0 = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|iPhone.Deploy.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|x64.Build.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|x64.Deploy.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|x86.Build.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Ad-Hoc|x86.Deploy.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|Any CPU.ActiveCfg = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|Any CPU.Build.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|Any CPU.Deploy.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|ARM.ActiveCfg = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|ARM.Build.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|ARM.Deploy.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|ARM64.ActiveCfg = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|ARM64.Build.0 = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|ARM64.Deploy.0 = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|iPhone.ActiveCfg = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|iPhone.Build.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|iPhone.Deploy.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|iPhoneSimulator.Deploy.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|x64.ActiveCfg = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|x64.Build.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|x64.Deploy.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|x86.ActiveCfg = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|x86.Build.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.AppStore|x86.Deploy.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|ARM.ActiveCfg = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|ARM.Build.0 = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|ARM.Deploy.0 = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|ARM64.Build.0 = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|ARM64.Deploy.0 = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|iPhone.Build.0 = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|iPhone.Deploy.0 = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|x64.ActiveCfg = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|x64.Build.0 = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|x64.Deploy.0 = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|x86.ActiveCfg = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|x86.Build.0 = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Debug|x86.Deploy.0 = Debug|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|Any CPU.Build.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|Any CPU.Deploy.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|ARM.ActiveCfg = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|ARM.Build.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|ARM.Deploy.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|ARM64.ActiveCfg = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|ARM64.Build.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|ARM64.Deploy.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|iPhone.ActiveCfg = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|iPhone.Build.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|iPhone.Deploy.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|x64.ActiveCfg = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|x64.Build.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|x64.Deploy.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|x86.ActiveCfg = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|x86.Build.0 = Release|Any CPU + {660D9346-D70B-4C54-8402-E5F6DF48E9AC}.Release|x86.Deploy.0 = Release|Any CPU + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Ad-Hoc|Any CPU.ActiveCfg = Ad-Hoc|iPhone + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Ad-Hoc|ARM.ActiveCfg = Ad-Hoc|iPhone + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Ad-Hoc|ARM64.ActiveCfg = Ad-Hoc|iPhoneSimulator + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Ad-Hoc|iPhoneSimulator + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Ad-Hoc|iPhoneSimulator.Build.0 = Ad-Hoc|iPhoneSimulator + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Ad-Hoc|x64.ActiveCfg = Ad-Hoc|iPhone + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Ad-Hoc|x86.ActiveCfg = Ad-Hoc|iPhone + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.AppStore|Any CPU.ActiveCfg = AppStore|iPhone + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.AppStore|ARM.ActiveCfg = AppStore|iPhone + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.AppStore|ARM64.ActiveCfg = AppStore|iPhoneSimulator + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.AppStore|iPhone.ActiveCfg = AppStore|iPhone + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.AppStore|iPhone.Build.0 = AppStore|iPhone + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.AppStore|iPhoneSimulator.ActiveCfg = AppStore|iPhoneSimulator + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.AppStore|iPhoneSimulator.Build.0 = AppStore|iPhoneSimulator + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.AppStore|x64.ActiveCfg = AppStore|iPhone + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.AppStore|x86.ActiveCfg = AppStore|iPhone + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|Any CPU.ActiveCfg = Debug|iPhone + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|ARM.ActiveCfg = Debug|iPhone + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|ARM64.ActiveCfg = Debug|iPhoneSimulator + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|iPhone.ActiveCfg = Debug|iPhone + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|iPhone.Build.0 = Debug|iPhone + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|x64.ActiveCfg = Debug|iPhone + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Debug|x86.ActiveCfg = Debug|iPhone + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|Any CPU.ActiveCfg = Release|iPhone + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|ARM.ActiveCfg = Release|iPhone + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|ARM64.ActiveCfg = Release|iPhoneSimulator + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|iPhone.ActiveCfg = Release|iPhone + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|iPhone.Build.0 = Release|iPhone + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|x64.ActiveCfg = Release|iPhone + {D119965B-BA8F-40D7-86B4-E9654E1014E2}.Release|x86.ActiveCfg = Release|iPhone + {2D97B30F-94A0-4631-9276-3ED17F392184}.Ad-Hoc|Any CPU.ActiveCfg = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Ad-Hoc|Any CPU.Build.0 = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Ad-Hoc|Any CPU.Deploy.0 = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Ad-Hoc|ARM.ActiveCfg = Release|ARM + {2D97B30F-94A0-4631-9276-3ED17F392184}.Ad-Hoc|ARM.Build.0 = Release|ARM + {2D97B30F-94A0-4631-9276-3ED17F392184}.Ad-Hoc|ARM.Deploy.0 = Release|ARM + {2D97B30F-94A0-4631-9276-3ED17F392184}.Ad-Hoc|ARM64.ActiveCfg = Release|ARM64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Ad-Hoc|ARM64.Build.0 = Release|ARM64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Ad-Hoc|ARM64.Deploy.0 = Release|ARM64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Ad-Hoc|iPhone.ActiveCfg = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Ad-Hoc|iPhone.Build.0 = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Ad-Hoc|iPhone.Deploy.0 = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Ad-Hoc|x64.ActiveCfg = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Ad-Hoc|x64.Build.0 = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Ad-Hoc|x64.Deploy.0 = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Ad-Hoc|x86.ActiveCfg = Release|x86 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Ad-Hoc|x86.Build.0 = Release|x86 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Ad-Hoc|x86.Deploy.0 = Release|x86 + {2D97B30F-94A0-4631-9276-3ED17F392184}.AppStore|Any CPU.ActiveCfg = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.AppStore|Any CPU.Build.0 = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.AppStore|Any CPU.Deploy.0 = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.AppStore|ARM.ActiveCfg = Release|ARM + {2D97B30F-94A0-4631-9276-3ED17F392184}.AppStore|ARM.Build.0 = Release|ARM + {2D97B30F-94A0-4631-9276-3ED17F392184}.AppStore|ARM.Deploy.0 = Release|ARM + {2D97B30F-94A0-4631-9276-3ED17F392184}.AppStore|ARM64.ActiveCfg = Release|ARM64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.AppStore|ARM64.Build.0 = Release|ARM64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.AppStore|ARM64.Deploy.0 = Release|ARM64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.AppStore|iPhone.ActiveCfg = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.AppStore|iPhone.Build.0 = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.AppStore|iPhone.Deploy.0 = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.AppStore|iPhoneSimulator.ActiveCfg = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.AppStore|iPhoneSimulator.Build.0 = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.AppStore|iPhoneSimulator.Deploy.0 = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.AppStore|x64.ActiveCfg = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.AppStore|x64.Build.0 = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.AppStore|x64.Deploy.0 = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.AppStore|x86.ActiveCfg = Release|x86 + {2D97B30F-94A0-4631-9276-3ED17F392184}.AppStore|x86.Build.0 = Release|x86 + {2D97B30F-94A0-4631-9276-3ED17F392184}.AppStore|x86.Deploy.0 = Release|x86 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Debug|Any CPU.ActiveCfg = Debug|x86 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Debug|ARM.ActiveCfg = Debug|ARM + {2D97B30F-94A0-4631-9276-3ED17F392184}.Debug|ARM.Build.0 = Debug|ARM + {2D97B30F-94A0-4631-9276-3ED17F392184}.Debug|ARM.Deploy.0 = Debug|ARM + {2D97B30F-94A0-4631-9276-3ED17F392184}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Debug|ARM64.Build.0 = Debug|ARM64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Debug|ARM64.Deploy.0 = Debug|ARM64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Debug|iPhone.ActiveCfg = Debug|x86 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Debug|iPhoneSimulator.ActiveCfg = Debug|x86 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Debug|x64.ActiveCfg = Debug|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Debug|x64.Build.0 = Debug|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Debug|x64.Deploy.0 = Debug|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Debug|x86.ActiveCfg = Debug|x86 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Debug|x86.Build.0 = Debug|x86 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Debug|x86.Deploy.0 = Debug|x86 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Release|Any CPU.ActiveCfg = Release|x86 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Release|ARM.ActiveCfg = Release|ARM + {2D97B30F-94A0-4631-9276-3ED17F392184}.Release|ARM.Build.0 = Release|ARM + {2D97B30F-94A0-4631-9276-3ED17F392184}.Release|ARM.Deploy.0 = Release|ARM + {2D97B30F-94A0-4631-9276-3ED17F392184}.Release|ARM64.ActiveCfg = Release|ARM64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Release|ARM64.Build.0 = Release|ARM64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Release|ARM64.Deploy.0 = Release|ARM64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Release|iPhone.ActiveCfg = Release|x86 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Release|iPhoneSimulator.ActiveCfg = Release|x86 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Release|x64.ActiveCfg = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Release|x64.Build.0 = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Release|x64.Deploy.0 = Release|x64 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Release|x86.ActiveCfg = Release|x86 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Release|x86.Build.0 = Release|x86 + {2D97B30F-94A0-4631-9276-3ED17F392184}.Release|x86.Deploy.0 = Release|x86 + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Ad-Hoc|ARM64.ActiveCfg = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Ad-Hoc|ARM64.Build.0 = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Ad-Hoc|x64.Build.0 = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Ad-Hoc|x86.Build.0 = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.AppStore|ARM.ActiveCfg = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.AppStore|ARM.Build.0 = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.AppStore|ARM64.ActiveCfg = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.AppStore|ARM64.Build.0 = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.AppStore|iPhone.ActiveCfg = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.AppStore|iPhone.Build.0 = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.AppStore|x64.ActiveCfg = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.AppStore|x64.Build.0 = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.AppStore|x86.ActiveCfg = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.AppStore|x86.Build.0 = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Debug|ARM.ActiveCfg = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Debug|ARM.Build.0 = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Debug|ARM64.Build.0 = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Debug|iPhone.Build.0 = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Debug|x64.ActiveCfg = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Debug|x64.Build.0 = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Debug|x86.ActiveCfg = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Debug|x86.Build.0 = Debug|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Release|Any CPU.Build.0 = Release|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Release|ARM.ActiveCfg = Release|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Release|ARM.Build.0 = Release|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Release|ARM64.ActiveCfg = Release|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Release|ARM64.Build.0 = Release|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Release|iPhone.ActiveCfg = Release|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Release|iPhone.Build.0 = Release|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Release|x64.ActiveCfg = Release|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Release|x64.Build.0 = Release|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Release|x86.ActiveCfg = Release|Any CPU + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854}.Release|x86.Build.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Ad-Hoc|Any CPU.Deploy.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Ad-Hoc|ARM.Build.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Ad-Hoc|ARM.Deploy.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Ad-Hoc|ARM64.ActiveCfg = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Ad-Hoc|ARM64.Build.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Ad-Hoc|ARM64.Deploy.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Ad-Hoc|iPhone.Deploy.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Ad-Hoc|x64.Build.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Ad-Hoc|x64.Deploy.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Ad-Hoc|x86.Build.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Ad-Hoc|x86.Deploy.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.AppStore|Any CPU.ActiveCfg = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.AppStore|Any CPU.Build.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.AppStore|Any CPU.Deploy.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.AppStore|ARM.ActiveCfg = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.AppStore|ARM.Build.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.AppStore|ARM.Deploy.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.AppStore|ARM64.ActiveCfg = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.AppStore|ARM64.Build.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.AppStore|ARM64.Deploy.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.AppStore|iPhone.ActiveCfg = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.AppStore|iPhone.Build.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.AppStore|iPhone.Deploy.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.AppStore|iPhoneSimulator.Deploy.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.AppStore|x64.ActiveCfg = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.AppStore|x64.Build.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.AppStore|x64.Deploy.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.AppStore|x86.ActiveCfg = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.AppStore|x86.Build.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.AppStore|x86.Deploy.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Debug|ARM.ActiveCfg = Debug|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Debug|ARM.Build.0 = Debug|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Debug|ARM.Deploy.0 = Debug|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Debug|ARM64.Build.0 = Debug|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Debug|ARM64.Deploy.0 = Debug|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Debug|iPhone.Build.0 = Debug|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Debug|iPhone.Deploy.0 = Debug|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Debug|x64.ActiveCfg = Debug|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Debug|x64.Build.0 = Debug|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Debug|x64.Deploy.0 = Debug|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Debug|x86.ActiveCfg = Debug|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Debug|x86.Build.0 = Debug|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Debug|x86.Deploy.0 = Debug|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Release|Any CPU.Build.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Release|Any CPU.Deploy.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Release|ARM.ActiveCfg = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Release|ARM.Build.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Release|ARM.Deploy.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Release|ARM64.ActiveCfg = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Release|ARM64.Build.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Release|ARM64.Deploy.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Release|iPhone.ActiveCfg = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Release|iPhone.Build.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Release|iPhone.Deploy.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Release|x64.ActiveCfg = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Release|x64.Build.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Release|x64.Deploy.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Release|x86.ActiveCfg = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Release|x86.Build.0 = Release|Any CPU + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46}.Release|x86.Deploy.0 = Release|Any CPU + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Ad-Hoc|Any CPU.ActiveCfg = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Ad-Hoc|Any CPU.Build.0 = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Ad-Hoc|ARM.ActiveCfg = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Ad-Hoc|ARM.Build.0 = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Ad-Hoc|ARM64.ActiveCfg = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Ad-Hoc|ARM64.Build.0 = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Ad-Hoc|iPhone.ActiveCfg = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Ad-Hoc|iPhone.Build.0 = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|iPhoneSimulator + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Ad-Hoc|x64.ActiveCfg = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Ad-Hoc|x64.Build.0 = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Ad-Hoc|x86.ActiveCfg = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Ad-Hoc|x86.Build.0 = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.AppStore|Any CPU.ActiveCfg = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.AppStore|Any CPU.Build.0 = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.AppStore|ARM.ActiveCfg = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.AppStore|ARM.Build.0 = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.AppStore|ARM64.ActiveCfg = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.AppStore|ARM64.Build.0 = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.AppStore|iPhone.ActiveCfg = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.AppStore|iPhone.Build.0 = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.AppStore|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.AppStore|iPhoneSimulator.Build.0 = Release|iPhoneSimulator + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.AppStore|x64.ActiveCfg = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.AppStore|x64.Build.0 = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.AppStore|x86.ActiveCfg = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.AppStore|x86.Build.0 = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Debug|Any CPU.ActiveCfg = Debug|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Debug|ARM.ActiveCfg = Debug|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Debug|ARM64.ActiveCfg = Debug|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Debug|iPhone.ActiveCfg = Debug|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Debug|iPhone.Build.0 = Debug|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Debug|x64.ActiveCfg = Debug|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Debug|x86.ActiveCfg = Debug|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Release|Any CPU.ActiveCfg = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Release|ARM.ActiveCfg = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Release|ARM64.ActiveCfg = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Release|iPhone.ActiveCfg = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Release|iPhone.Build.0 = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Release|x64.ActiveCfg = Release|iPhone + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A}.Release|x86.ActiveCfg = Release|iPhone + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Ad-Hoc|Any CPU.ActiveCfg = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Ad-Hoc|Any CPU.Build.0 = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Ad-Hoc|Any CPU.Deploy.0 = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Ad-Hoc|ARM.ActiveCfg = Release|ARM + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Ad-Hoc|ARM.Build.0 = Release|ARM + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Ad-Hoc|ARM.Deploy.0 = Release|ARM + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Ad-Hoc|ARM64.ActiveCfg = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Ad-Hoc|ARM64.Build.0 = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Ad-Hoc|ARM64.Deploy.0 = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Ad-Hoc|iPhone.ActiveCfg = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Ad-Hoc|iPhone.Build.0 = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Ad-Hoc|iPhone.Deploy.0 = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Ad-Hoc|x64.ActiveCfg = Release|x64 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Ad-Hoc|x64.Build.0 = Release|x64 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Ad-Hoc|x64.Deploy.0 = Release|x64 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Ad-Hoc|x86.ActiveCfg = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Ad-Hoc|x86.Build.0 = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Ad-Hoc|x86.Deploy.0 = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.AppStore|Any CPU.ActiveCfg = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.AppStore|Any CPU.Build.0 = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.AppStore|Any CPU.Deploy.0 = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.AppStore|ARM.ActiveCfg = Release|ARM + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.AppStore|ARM.Build.0 = Release|ARM + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.AppStore|ARM.Deploy.0 = Release|ARM + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.AppStore|ARM64.ActiveCfg = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.AppStore|ARM64.Build.0 = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.AppStore|ARM64.Deploy.0 = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.AppStore|iPhone.ActiveCfg = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.AppStore|iPhone.Build.0 = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.AppStore|iPhone.Deploy.0 = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.AppStore|iPhoneSimulator.ActiveCfg = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.AppStore|iPhoneSimulator.Build.0 = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.AppStore|iPhoneSimulator.Deploy.0 = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.AppStore|x64.ActiveCfg = Release|x64 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.AppStore|x64.Build.0 = Release|x64 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.AppStore|x64.Deploy.0 = Release|x64 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.AppStore|x86.ActiveCfg = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.AppStore|x86.Build.0 = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.AppStore|x86.Deploy.0 = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Debug|Any CPU.ActiveCfg = Debug|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Debug|ARM.ActiveCfg = Debug|ARM + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Debug|ARM.Build.0 = Debug|ARM + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Debug|ARM.Deploy.0 = Debug|ARM + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Debug|ARM64.ActiveCfg = Debug|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Debug|iPhone.ActiveCfg = Debug|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Debug|iPhoneSimulator.ActiveCfg = Debug|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Debug|x64.ActiveCfg = Debug|x64 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Debug|x64.Build.0 = Debug|x64 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Debug|x64.Deploy.0 = Debug|x64 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Debug|x86.ActiveCfg = Debug|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Debug|x86.Build.0 = Debug|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Debug|x86.Deploy.0 = Debug|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Release|Any CPU.ActiveCfg = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Release|ARM.ActiveCfg = Release|ARM + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Release|ARM.Build.0 = Release|ARM + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Release|ARM.Deploy.0 = Release|ARM + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Release|ARM64.ActiveCfg = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Release|iPhone.ActiveCfg = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Release|iPhoneSimulator.ActiveCfg = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Release|x64.ActiveCfg = Release|x64 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Release|x64.Build.0 = Release|x64 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Release|x64.Deploy.0 = Release|x64 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Release|x86.ActiveCfg = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Release|x86.Build.0 = Release|x86 + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63}.Release|x86.Deploy.0 = Release|x86 + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Ad-Hoc|ARM64.ActiveCfg = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Ad-Hoc|ARM64.Build.0 = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Ad-Hoc|x64.Build.0 = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Ad-Hoc|x86.Build.0 = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.AppStore|ARM.ActiveCfg = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.AppStore|ARM.Build.0 = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.AppStore|ARM64.ActiveCfg = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.AppStore|ARM64.Build.0 = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.AppStore|iPhone.ActiveCfg = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.AppStore|iPhone.Build.0 = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.AppStore|x64.ActiveCfg = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.AppStore|x64.Build.0 = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.AppStore|x86.ActiveCfg = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.AppStore|x86.Build.0 = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Debug|ARM.ActiveCfg = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Debug|ARM.Build.0 = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Debug|ARM64.Build.0 = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Debug|iPhone.Build.0 = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Debug|x64.ActiveCfg = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Debug|x64.Build.0 = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Debug|x86.ActiveCfg = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Debug|x86.Build.0 = Debug|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Release|Any CPU.Build.0 = Release|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Release|ARM.ActiveCfg = Release|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Release|ARM.Build.0 = Release|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Release|ARM64.ActiveCfg = Release|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Release|ARM64.Build.0 = Release|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Release|iPhone.ActiveCfg = Release|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Release|iPhone.Build.0 = Release|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Release|x64.ActiveCfg = Release|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Release|x64.Build.0 = Release|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Release|x86.ActiveCfg = Release|Any CPU + {9CBD2F34-9649-48DE-9B35-0D1291F4E714}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {24B441F2-CBE9-4405-9FD0-72EBCBEA0EC3} = {EC2F2D7F-EA57-45A9-BD3E-7D8DA5A78FB1} - {78407906-99C6-42B0-A511-973FC78C58CB} = {EC2F2D7F-EA57-45A9-BD3E-7D8DA5A78FB1} - {AC17589E-C817-4FA8-B3EC-CCEB25E55E59} = {EC2F2D7F-EA57-45A9-BD3E-7D8DA5A78FB1} - {6CBD1DF3-1FD3-4F20-80A2-A0C7414C411A} = {EC2F2D7F-EA57-45A9-BD3E-7D8DA5A78FB1} - {1B000BCA-4895-4ACF-A0C6-3ADF3A9BEDF2} = {EC2F2D7F-EA57-45A9-BD3E-7D8DA5A78FB1} - {10EB06B2-7231-40DF-8930-7781C82B65DB} = {EC2F2D7F-EA57-45A9-BD3E-7D8DA5A78FB1} - {7528DD0A-1781-47F4-ADBF-EEDDB011F6BB} = {EC2F2D7F-EA57-45A9-BD3E-7D8DA5A78FB1} + {660D9346-D70B-4C54-8402-E5F6DF48E9AC} = {5BE76DF7-1002-4733-9905-45BE08E377A5} + {D119965B-BA8F-40D7-86B4-E9654E1014E2} = {5BE76DF7-1002-4733-9905-45BE08E377A5} + {2D97B30F-94A0-4631-9276-3ED17F392184} = {5BE76DF7-1002-4733-9905-45BE08E377A5} + {CDF8AA59-65AB-4F2C-8DE0-D9D13F84E854} = {E0DF8E5D-AF49-43C9-9921-D67268E75964} + {C63CCA38-6CC2-480B-9CDA-A64074C7CC46} = {E0DF8E5D-AF49-43C9-9921-D67268E75964} + {CFF9673E-1188-4646-BCC7-F7601F3A1D1A} = {E0DF8E5D-AF49-43C9-9921-D67268E75964} + {96FBFDD1-F91A-44F6-962A-51E1AC7AAC63} = {E0DF8E5D-AF49-43C9-9921-D67268E75964} + {9CBD2F34-9649-48DE-9B35-0D1291F4E714} = {E0DF8E5D-AF49-43C9-9921-D67268E75964} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {887F72FF-99D0-4882-A73A-A913A0534F0C} EndGlobalSection EndGlobal diff --git a/ZXing.Net.Mobile/Android/BitmapRenderer.android.cs b/ZXing.Net.Mobile/Android/BitmapRenderer.android.cs new file mode 100644 index 000000000..b078e43c7 --- /dev/null +++ b/ZXing.Net.Mobile/Android/BitmapRenderer.android.cs @@ -0,0 +1,91 @@ +/* + * Copyright 2012 ZXing.Net authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using Android.Graphics; + +using ZXing.Common; +using ZXing.Rendering; + +namespace ZXing.Mobile +{ + /// + /// Renders a to a image + /// + public class BitmapRenderer : IBarcodeRenderer + { + /// + /// Gets or sets the foreground color. + /// + /// The foreground color. + public Color Foreground { get; set; } + + /// + /// Gets or sets the background color. + /// + /// The background color. + public Color Background { get; set; } + + /// + /// Initializes a new instance of the class. + /// + public BitmapRenderer() + { + Foreground = Color.Black; + Background = Color.White; + } + + /// + /// Renders the specified matrix. + /// + /// The matrix. + /// The format. + /// The content. + /// + public Bitmap Render(BitMatrix matrix, BarcodeFormat format, string content) + => Render(matrix, format, content, new EncodingOptions()); + + /// + /// Renders the specified matrix. + /// + /// The matrix. + /// The format. + /// The content. + /// The options. + /// + public Bitmap Render(BitMatrix matrix, BarcodeFormat format, string content, EncodingOptions options) + { + var width = matrix.Width; + var height = matrix.Height; + var pixels = new int[width * height]; + var outputIndex = 0; + var fColor = Foreground.ToArgb(); + var bColor = Background.ToArgb(); + + for (var y = 0; y < height; y++) + { + for (var x = 0; x < width; x++) + { + pixels[outputIndex] = matrix[x, y] ? fColor : bColor; + outputIndex++; + } + } + + var bitmap = Bitmap.CreateBitmap(width, height, Bitmap.Config.Argb8888); + bitmap.SetPixels(pixels, 0, width, 0, 0, width, height); + return bitmap; + } + } +} \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.Android/BitmapWriter.cs b/ZXing.Net.Mobile/Android/BitmapWriter.android.cs similarity index 60% rename from Source/ZXing.Net.Mobile.Android/BitmapWriter.cs rename to ZXing.Net.Mobile/Android/BitmapWriter.android.cs index 5c5c31711..6753f8448 100644 --- a/Source/ZXing.Net.Mobile.Android/BitmapWriter.cs +++ b/ZXing.Net.Mobile/Android/BitmapWriter.android.cs @@ -17,18 +17,16 @@ using ZXing.Rendering; namespace ZXing.Mobile -{ - /// - /// A smart class to encode some content to a barcode image - /// - public class BarcodeWriter : BarcodeWriter, IBarcodeWriter - { - /// - /// Initializes a new instance of the class. - /// - public BarcodeWriter() - { - Renderer = new BitmapRenderer(); - } - } +{ + /// + /// A smart class to encode some content to a barcode image + /// + public class BarcodeWriter : BarcodeWriter, IBarcodeWriter + { + /// + /// Initializes a new instance of the class. + /// + public BarcodeWriter() + => Renderer = new BitmapRenderer(); + } } diff --git a/ZXing.Net.Mobile/Android/CameraAccess/CameraAnalyzer.android.cs b/ZXing.Net.Mobile/Android/CameraAccess/CameraAnalyzer.android.cs new file mode 100644 index 000000000..6d4f5c2be --- /dev/null +++ b/ZXing.Net.Mobile/Android/CameraAccess/CameraAnalyzer.android.cs @@ -0,0 +1,157 @@ +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Android.Views; +using ApxLabs.FastAndroidCamera; + +namespace ZXing.Mobile.CameraAccess +{ + public class CameraAnalyzer + { + readonly CameraController cameraController; + readonly CameraEventsListener cameraEventListener; + Task processingTask; + DateTime lastPreviewAnalysis = DateTime.UtcNow; + bool wasScanned; + IScannerSessionHost scannerHost; + + public CameraAnalyzer(SurfaceView surfaceView, IScannerSessionHost scannerHost) + { + this.scannerHost = scannerHost; + cameraEventListener = new CameraEventsListener(); + cameraController = new CameraController(surfaceView, cameraEventListener, scannerHost); + Torch = new Torch(cameraController, surfaceView.Context); + } + + public Action BarcodeFound; + + public Torch Torch { get; } + + public bool IsAnalyzing { get; private set; } + + public void PauseAnalysis() + => IsAnalyzing = false; + + public void ResumeAnalysis() + => IsAnalyzing = true; + + public void ShutdownCamera() + { + IsAnalyzing = false; + cameraEventListener.OnPreviewFrameReady -= HandleOnPreviewFrameReady; + cameraController.ShutdownCamera(); + } + + public void SetupCamera() + { + cameraEventListener.OnPreviewFrameReady += HandleOnPreviewFrameReady; + cameraController.SetupCamera(); + } + + public void AutoFocus() + => cameraController.AutoFocus(); + + public void AutoFocus(int x, int y) + => cameraController.AutoFocus(x, y); + + public void RefreshCamera() + => cameraController.RefreshCamera(); + + bool CanAnalyzeFrame + { + get + { + if (!IsAnalyzing) + return false; + + //Check and see if we're still processing a previous frame + // todo: check if we can run as many as possible or mby run two analyzers at once (Vision + ZXing) + if (processingTask != null && !processingTask.IsCompleted) + return false; + + var elapsedTimeMs = (DateTime.UtcNow - lastPreviewAnalysis).TotalMilliseconds; + if (elapsedTimeMs < scannerHost.ScanningOptions.DelayBetweenAnalyzingFrames) + return false; + + // Delay a minimum between scans + if (wasScanned && elapsedTimeMs < scannerHost.ScanningOptions.DelayBetweenContinuousScans) + return false; + + return true; + } + } + + void HandleOnPreviewFrameReady(object sender, FastJavaByteArray fastArray) + { + if (!CanAnalyzeFrame) + return; + + wasScanned = false; + lastPreviewAnalysis = DateTime.UtcNow; + + processingTask = Task.Run(() => + { + try + { + DecodeFrame(fastArray); + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + }).ContinueWith(task => + { + if (task.IsFaulted) + Android.Util.Log.Debug(MobileBarcodeScanner.TAG, "DecodeFrame exception occurs"); + }, TaskContinuationOptions.OnlyOnFaulted); + } + + void DecodeFrame(FastJavaByteArray fastArray) + { + var cameraParameters = cameraController.Camera.GetParameters(); + var width = cameraParameters.PreviewSize.Width; + var height = cameraParameters.PreviewSize.Height; + + var barcodeReader = scannerHost.ScanningOptions.BuildBarcodeReader(); + + var rotate = false; + var newWidth = width; + var newHeight = height; + + // use last value for performance gain + var cDegrees = cameraController.LastCameraDisplayOrientationDegree; + + if (cDegrees == 90 || cDegrees == 270) + { + rotate = true; + newWidth = height; + newHeight = width; + } + + ZXing.Result result = null; + var start = PerformanceCounter.Start(); + + LuminanceSource fast = new FastJavaByteArrayYUVLuminanceSource(fastArray, width, height, 0, 0, width, height); // _area.Left, _area.Top, _area.Width, _area.Height); + if (rotate) + fast = fast.rotateCounterClockwise(); + + result = barcodeReader.Decode(fast); + + fastArray.Dispose(); + fastArray = null; + + PerformanceCounter.Stop(start, + "Decode Time: {0} ms (width: " + width + ", height: " + height + ", degrees: " + cDegrees + ", rotate: " + + rotate + ")"); + + if (result != null) + { + Android.Util.Log.Debug(MobileBarcodeScanner.TAG, "Barcode Found"); + + wasScanned = true; + BarcodeFound?.Invoke(result); + return; + } + } + } +} \ No newline at end of file diff --git a/ZXing.Net.Mobile/Android/CameraAccess/CameraController.android.cs b/ZXing.Net.Mobile/Android/CameraAccess/CameraController.android.cs new file mode 100644 index 000000000..484be6074 --- /dev/null +++ b/ZXing.Net.Mobile/Android/CameraAccess/CameraController.android.cs @@ -0,0 +1,432 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Android.Content; +using Android.Graphics; +using Android.Hardware; +using Android.OS; +using Android.Runtime; +using Android.Views; +using ApxLabs.FastAndroidCamera; +using Camera = Android.Hardware.Camera; + +namespace ZXing.Mobile.CameraAccess +{ + public class CameraController + { + readonly Context context; + readonly ISurfaceHolder holder; + readonly SurfaceView surfaceView; + readonly CameraEventsListener cameraEventListener; + int cameraId; + IScannerSessionHost scannerHost; + + public CameraController(SurfaceView surfaceView, CameraEventsListener cameraEventListener, IScannerSessionHost scannerHost) + { + context = surfaceView.Context; + holder = surfaceView.Holder; + this.surfaceView = surfaceView; + this.cameraEventListener = cameraEventListener; + this.scannerHost = scannerHost; + } + + public Camera Camera { get; private set; } + + public int LastCameraDisplayOrientationDegree { get; private set; } + + public void RefreshCamera() + { + if (holder == null) return; + + ApplyCameraSettings(); + + try + { + Camera.SetPreviewDisplay(holder); + Camera.StartPreview(); + } + catch (Exception ex) + { + Android.Util.Log.Debug(MobileBarcodeScanner.TAG, ex.ToString()); + } + } + + public void SetupCamera() + { + if (Camera != null) + return; + + var perf = PerformanceCounter.Start(); + OpenCamera(); + PerformanceCounter.Stop(perf, "Setup Camera took {0}ms"); + + if (Camera == null) return; + + perf = PerformanceCounter.Start(); + ApplyCameraSettings(); + + try + { + Camera.SetPreviewDisplay(holder); + + + var previewParameters = Camera.GetParameters(); + var previewSize = previewParameters.PreviewSize; + var bitsPerPixel = ImageFormat.GetBitsPerPixel(previewParameters.PreviewFormat); + + + var bufferSize = (previewSize.Width * previewSize.Height * bitsPerPixel) / 8; + const int NUM_PREVIEW_BUFFERS = 5; + for (uint i = 0; i < NUM_PREVIEW_BUFFERS; ++i) + { + using (var buffer = new FastJavaByteArray(bufferSize)) + Camera.AddCallbackBuffer(buffer); + } + + Camera.StartPreview(); + + Camera.SetNonMarshalingPreviewCallback(cameraEventListener); + } + catch (Exception ex) + { + Android.Util.Log.Debug(MobileBarcodeScanner.TAG, ex.ToString()); + return; + } + finally + { + PerformanceCounter.Stop(perf, "Setup Camera Parameters took {0}ms"); + } + + // Docs suggest if Auto or Macro modes, we should invoke AutoFocus at least once + var currentFocusMode = Camera.GetParameters().FocusMode; + if (currentFocusMode == Camera.Parameters.FocusModeAuto + || currentFocusMode == Camera.Parameters.FocusModeMacro) + AutoFocus(); + } + + public void AutoFocus() + { + AutoFocus(0, 0, false); + } + + public void AutoFocus(int x, int y) + { + // The bounds for focus areas are actually -1000 to 1000 + // So we need to translate the touch coordinates to this scale + var focusX = x / surfaceView.Width * 2000 - 1000; + var focusY = y / surfaceView.Height * 2000 - 1000; + + // Call the autofocus with our coords + AutoFocus(focusX, focusY, true); + } + + public void ShutdownCamera() + { + if (Camera == null) return; + + // camera release logic takes about 0.005 sec so there is no need in async releasing + var perf = PerformanceCounter.Start(); + try + { + try + { + Camera.StopPreview(); + Camera.SetNonMarshalingPreviewCallback(null); + + //Camera.SetPreviewCallback(null); + + Android.Util.Log.Debug(MobileBarcodeScanner.TAG, $"Calling SetPreviewDisplay: null"); + Camera.SetPreviewDisplay(null); + } + catch (Exception ex) + { + Android.Util.Log.Error(MobileBarcodeScanner.TAG, ex.ToString()); + } + Camera.Release(); + Camera = null; + } + catch (Exception e) + { + Android.Util.Log.Error(MobileBarcodeScanner.TAG, e.ToString()); + } + + PerformanceCounter.Stop(perf, "Shutdown camera took {0}ms"); + } + + void OpenCamera() + { + try + { + var version = Build.VERSION.SdkInt; + + if (version >= BuildVersionCodes.Gingerbread) + { + Android.Util.Log.Debug(MobileBarcodeScanner.TAG, "Checking Number of cameras..."); + + var numCameras = Camera.NumberOfCameras; + var camInfo = new Camera.CameraInfo(); + var found = false; + Android.Util.Log.Debug(MobileBarcodeScanner.TAG, "Found " + numCameras + " cameras..."); + + var whichCamera = CameraFacing.Back; + + if (scannerHost.ScanningOptions.UseFrontCameraIfAvailable.HasValue && + scannerHost.ScanningOptions.UseFrontCameraIfAvailable.Value) + whichCamera = CameraFacing.Front; + + for (var i = 0; i < numCameras; i++) + { + Camera.GetCameraInfo(i, camInfo); + if (camInfo.Facing == whichCamera) + { + Android.Util.Log.Debug(MobileBarcodeScanner.TAG, + "Found " + whichCamera + " Camera, opening..."); + Camera = Camera.Open(i); + cameraId = i; + found = true; + break; + } + } + + if (!found) + { + Android.Util.Log.Debug(MobileBarcodeScanner.TAG, + "Finding " + whichCamera + " camera failed, opening camera 0..."); + Camera = Camera.Open(0); + cameraId = 0; + } + } + else + { + Camera = Camera.Open(); + } + + //if (Camera != null) + // Camera.SetPreviewCallback(_cameraEventListener); + //else + // MobileBarcodeScanner.LogWarn(MobileBarcodeScanner.TAG, "Camera is null :("); + } + catch (Exception ex) + { + ShutdownCamera(); + MobileBarcodeScanner.LogError("Setup Error: {0}", ex); + } + } + + void ApplyCameraSettings() + { + if (Camera == null) + { + OpenCamera(); + } + + // do nothing if something wrong with camera + if (Camera == null) return; + + var parameters = Camera.GetParameters(); + parameters.PreviewFormat = ImageFormatType.Nv21; + + var supportedFocusModes = parameters.SupportedFocusModes; + if (scannerHost.ScanningOptions.DisableAutofocus) + parameters.FocusMode = Camera.Parameters.FocusModeFixed; + else if (Build.VERSION.SdkInt >= BuildVersionCodes.IceCreamSandwich && + supportedFocusModes.Contains(Camera.Parameters.FocusModeContinuousPicture)) + parameters.FocusMode = Camera.Parameters.FocusModeContinuousPicture; + else if (supportedFocusModes.Contains(Camera.Parameters.FocusModeContinuousVideo)) + parameters.FocusMode = Camera.Parameters.FocusModeContinuousVideo; + else if (supportedFocusModes.Contains(Camera.Parameters.FocusModeAuto)) + parameters.FocusMode = Camera.Parameters.FocusModeAuto; + else if (supportedFocusModes.Contains(Camera.Parameters.FocusModeFixed)) + parameters.FocusMode = Camera.Parameters.FocusModeFixed; + + var selectedFps = parameters.SupportedPreviewFpsRange.FirstOrDefault(); + if (selectedFps != null) + { + // This will make sure we select a range with the lowest minimum FPS + // and maximum FPS which still has the lowest minimum + // This should help maximize performance / support for hardware + foreach (var fpsRange in parameters.SupportedPreviewFpsRange) + { + if (fpsRange[0] <= selectedFps[0] && fpsRange[1] > selectedFps[1]) + selectedFps = fpsRange; + } + parameters.SetPreviewFpsRange(selectedFps[0], selectedFps[1]); + } + + CameraResolution resolution = null; + var supportedPreviewSizes = parameters.SupportedPreviewSizes; + if (supportedPreviewSizes != null) + { + var availableResolutions = supportedPreviewSizes.Select(sps => new CameraResolution + { + Width = sps.Width, + Height = sps.Height + }); + + // Try and get a desired resolution from the options selector + resolution = scannerHost.ScanningOptions.GetResolution(availableResolutions.ToList()); + + // If the user did not specify a resolution, let's try and find a suitable one + if (resolution == null) + { + foreach (var sps in supportedPreviewSizes) + { + if (sps.Width >= 640 && sps.Width <= 1000 && sps.Height >= 360 && sps.Height <= 1000) + { + resolution = new CameraResolution + { + Width = sps.Width, + Height = sps.Height + }; + break; + } + } + } + } + + // Google Glass requires this fix to display the camera output correctly + if (Build.Model.Contains("Glass")) + { + resolution = new CameraResolution + { + Width = 640, + Height = 360 + }; + // Glass requires 30fps + parameters.SetPreviewFpsRange(30000, 30000); + } + + // Hopefully a resolution was selected at some point + if (resolution != null) + { + Android.Util.Log.Debug(MobileBarcodeScanner.TAG, + "Selected Resolution: " + resolution.Width + "x" + resolution.Height); + parameters.SetPreviewSize(resolution.Width, resolution.Height); + } + + Camera.SetParameters(parameters); + + SetCameraDisplayOrientation(); + } + + void AutoFocus(int x, int y, bool useCoordinates) + { + if (Camera == null) return; + + if (scannerHost.ScanningOptions.DisableAutofocus) + { + Android.Util.Log.Debug(MobileBarcodeScanner.TAG, "AutoFocus Disabled"); + return; + } + + var cameraParams = Camera.GetParameters(); + + Android.Util.Log.Debug(MobileBarcodeScanner.TAG, "AutoFocus Requested"); + + // Cancel any previous requests + Camera.CancelAutoFocus(); + + try + { + // If we want to use coordinates + // Also only if our camera supports Auto focus mode + // Since FocusAreas only really work with FocusModeAuto set + if (useCoordinates + && cameraParams.SupportedFocusModes.Contains(Camera.Parameters.FocusModeAuto)) + { + // Let's give the touched area a 20 x 20 minimum size rect to focus on + // So we'll offset -10 from the center of the touch and then + // make a rect of 20 to give an area to focus on based on the center of the touch + x = x - 10; + y = y - 10; + + // Ensure we don't go over the -1000 to 1000 limit of focus area + if (x >= 1000) + x = 980; + if (x < -1000) + x = -1000; + if (y >= 1000) + y = 980; + if (y < -1000) + y = -1000; + + // Explicitly set FocusModeAuto since Focus areas only work with this setting + cameraParams.FocusMode = Camera.Parameters.FocusModeAuto; + // Add our focus area + cameraParams.FocusAreas = new List + { + new Camera.Area(new Rect(x, y, x + 20, y + 20), 1000) + }; + Camera.SetParameters(cameraParams); + } + + // Finally autofocus (weather we used focus areas or not) + Camera.AutoFocus(cameraEventListener); + } + catch (Exception ex) + { + Android.Util.Log.Debug(MobileBarcodeScanner.TAG, "AutoFocus Failed: {0}", ex); + } + } + + void SetCameraDisplayOrientation() + { + var degrees = GetCameraDisplayOrientation(); + LastCameraDisplayOrientationDegree = degrees; + + Android.Util.Log.Debug(MobileBarcodeScanner.TAG, "Changing Camera Orientation to: " + degrees); + + try + { + Camera.SetDisplayOrientation(degrees); + } + catch (Exception ex) + { + Android.Util.Log.Error(MobileBarcodeScanner.TAG, ex.ToString()); + } + } + + int GetCameraDisplayOrientation() + { + int degrees; + var windowManager = context.GetSystemService(Context.WindowService).JavaCast(); + var display = windowManager.DefaultDisplay; + var rotation = display.Rotation; + + switch (rotation) + { + case SurfaceOrientation.Rotation0: + degrees = 0; + break; + case SurfaceOrientation.Rotation90: + degrees = 90; + break; + case SurfaceOrientation.Rotation180: + degrees = 180; + break; + case SurfaceOrientation.Rotation270: + degrees = 270; + break; + default: + throw new ArgumentOutOfRangeException(); + } + + var info = new Camera.CameraInfo(); + Camera.GetCameraInfo(cameraId, info); + + int correctedDegrees; + if (info.Facing == CameraFacing.Front) + { + correctedDegrees = (info.Orientation + degrees) % 360; + correctedDegrees = (360 - correctedDegrees) % 360; // compensate the mirror + } + else + { + // back-facing + correctedDegrees = (info.Orientation - degrees + 360) % 360; + } + + return correctedDegrees; + } + } +} \ No newline at end of file diff --git a/ZXing.Net.Mobile/Android/CameraAccess/CameraEventsListener.android.cs b/ZXing.Net.Mobile/Android/CameraAccess/CameraEventsListener.android.cs new file mode 100644 index 000000000..78f9cd57c --- /dev/null +++ b/ZXing.Net.Mobile/Android/CameraAccess/CameraEventsListener.android.cs @@ -0,0 +1,26 @@ +using System; +using Android.Hardware; +using ApxLabs.FastAndroidCamera; + +namespace ZXing.Mobile.CameraAccess +{ + public class CameraEventsListener : Java.Lang.Object, INonMarshalingPreviewCallback, Camera.IAutoFocusCallback + { + public event EventHandler OnPreviewFrameReady; + + public void OnPreviewFrame(IntPtr data, Camera camera) + { + using (var fastArray = new FastJavaByteArray(data)) + { + OnPreviewFrameReady?.Invoke(this, fastArray); + + camera.AddCallbackBuffer(fastArray); + } + } + + public void OnAutoFocus(bool success, Camera camera) + { + Android.Util.Log.Debug(MobileBarcodeScanner.TAG, "AutoFocus {0}", success ? "Succeeded" : "Failed"); + } + } +} \ No newline at end of file diff --git a/ZXing.Net.Mobile/Android/CameraAccess/Torch.android.cs b/ZXing.Net.Mobile/Android/CameraAccess/Torch.android.cs new file mode 100644 index 000000000..faacb42f5 --- /dev/null +++ b/ZXing.Net.Mobile/Android/CameraAccess/Torch.android.cs @@ -0,0 +1,94 @@ +using Android.Content; +using Android.Content.PM; +using Android.Hardware; + +namespace ZXing.Mobile.CameraAccess +{ + public class Torch + { + readonly CameraController cameraController; + readonly Context context; + bool? hasTorch; + + public Torch(CameraController cameraController, Context context) + { + this.cameraController = cameraController; + this.context = context; + } + + public bool IsSupported + { + get + { + if (hasTorch.HasValue) + return hasTorch.Value; + + if (!context.PackageManager.HasSystemFeature(PackageManager.FeatureCameraFlash)) + { + Android.Util.Log.Info(MobileBarcodeScanner.TAG, "Flash not supported on this device"); + return false; + } + + if (cameraController.Camera == null) + { + Android.Util.Log.Info(MobileBarcodeScanner.TAG, "Run camera first"); + return false; + } + + var p = cameraController.Camera.GetParameters(); + var supportedFlashModes = p.SupportedFlashModes; + + if ((supportedFlashModes != null) + && (supportedFlashModes.Contains(Camera.Parameters.FlashModeTorch) + || supportedFlashModes.Contains(Camera.Parameters.FlashModeOn))) + hasTorch = ZXing.Net.Mobile.Android.PermissionsHandler.IsTorchPermissionDeclared(); + + return hasTorch != null && hasTorch.Value; + } + } + + public bool IsEnabled { get; private set; } + + public void TurnOn() => Enable(true); + + public void TurnOff() => Enable(false); + + public void Toggle() => Enable(!IsEnabled); + + private void Enable(bool state) + { + if (!IsSupported || IsEnabled == state) + return; + + if (cameraController.Camera == null) + { + Android.Util.Log.Info(MobileBarcodeScanner.TAG, "NULL Camera, cannot toggle torch"); + return; + } + + var parameters = cameraController.Camera.GetParameters(); + var supportedFlashModes = parameters.SupportedFlashModes; + + var flashMode = string.Empty; + if (state) + { + if (supportedFlashModes.Contains(Camera.Parameters.FlashModeTorch)) + flashMode = Camera.Parameters.FlashModeTorch; + else if (supportedFlashModes.Contains(Camera.Parameters.FlashModeOn)) + flashMode = Camera.Parameters.FlashModeOn; + } + else + { + if (supportedFlashModes != null && supportedFlashModes.Contains(Camera.Parameters.FlashModeOff)) + flashMode = Camera.Parameters.FlashModeOff; + } + + if (!string.IsNullOrEmpty(flashMode)) + { + parameters.FlashMode = flashMode; + cameraController.Camera.SetParameters(parameters); + IsEnabled = state; + } + } + } +} \ No newline at end of file diff --git a/ZXing.Net.Mobile/Android/FastJavaArrayEx.android.cs b/ZXing.Net.Mobile/Android/FastJavaArrayEx.android.cs new file mode 100644 index 000000000..14584e001 --- /dev/null +++ b/ZXing.Net.Mobile/Android/FastJavaArrayEx.android.cs @@ -0,0 +1,17 @@ +using System; +using System.Runtime.InteropServices; +using ApxLabs.FastAndroidCamera; + +namespace ZXing.Mobile +{ + public static class FastJavaArrayEx + { + public static void BlockCopyTo(this FastJavaByteArray self, int sourceIndex, byte[] array, int arrayIndex, int length) + { + unsafe + { + Marshal.Copy(new IntPtr(self.Raw + sourceIndex), array, arrayIndex, Math.Min(length, Math.Min(self.Count, array.Length - arrayIndex))); + } + } + } +} \ No newline at end of file diff --git a/ZXing.Net.Mobile/Android/FastJavaByteArrayYUVLuminanceSource.android.cs b/ZXing.Net.Mobile/Android/FastJavaByteArrayYUVLuminanceSource.android.cs new file mode 100644 index 000000000..1137377ac --- /dev/null +++ b/ZXing.Net.Mobile/Android/FastJavaByteArrayYUVLuminanceSource.android.cs @@ -0,0 +1,173 @@ +/* + * Copyright 2009 ZXing authors + * Modifications copyright 2016 kasper@byolimit.com + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using ApxLabs.FastAndroidCamera; + +using System; + +namespace ZXing.Mobile +{ + /// + /// This object extends LuminanceSource around an array of YUV data returned from the camera driver, + /// with the option to crop to a rectangle within the full data. This can be used to exclude + /// superfluous pixels around the perimeter and speed up decoding. + /// It works for any pixel format where the Y channel is planar and appears first, including + /// YCbCr_420_SP and YCbCr_422_SP. + /// + /// + /// Builds upon PlanarYUVLuminanceSource from ZXing.NET, which is a .Net port of ZXing. The original code + /// was authored by + /// @author dswitkin@google.com (Daniel Switkin) + /// + public sealed class FastJavaByteArrayYUVLuminanceSource : BaseLuminanceSource + { + private readonly FastJavaByteArray _yuv; + private readonly int _dataWidth; + private readonly int _dataHeight; + private readonly int _left; + private readonly int _top; + + /// + /// Initializes a new instance of the class. + /// + /// The yuv data. + /// Width of the data. + /// Height of the data. + /// The left. + /// The top. + /// The width. + /// The height. + /// if set to true [reverse horiz]. + public FastJavaByteArrayYUVLuminanceSource(FastJavaByteArray yuv, + int dataWidth, + int dataHeight, + int left, + int top, + int width, + int height) + : base(width, height) + { + if (left < 0) + throw new ArgumentException("Negative value", nameof(left)); + + if (top < 0) + throw new ArgumentException("Negative value", nameof(top)); + + if (width < 0) + throw new ArgumentException("Negative value", nameof(width)); + + if (height < 0) + throw new ArgumentException("Negative value", nameof(height)); + + if (left + width > dataWidth || top + height > dataHeight) + { + throw new ArgumentException("Crop rectangle does not fit within image data."); + } + + _yuv = yuv; + _dataWidth = dataWidth; + _dataHeight = dataHeight; + _left = left; + _top = top; + } + + /// + /// Fetches one row of luminance data from the underlying platform's bitmap. Values range from + /// 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + /// to bitwise and with 0xff for each value. It is preferable for implementations of this method + /// to only fetch this row rather than the whole image, since no 2D Readers may be installed and + /// getMatrix() may never be called. + /// + /// The row to fetch, 0 <= y < Height. + /// An optional preallocated array. If null or too small, it will be ignored. + /// Always use the returned object, and ignore the .length of the array. + /// + /// An array containing the luminance data of the requested row. + /// + override public byte[] getRow(int y, byte[] row) + { + if (y < 0 || y >= Height) + throw new ArgumentException("Requested row is outside the image: " + y, nameof(y)); + + var width = Width; + if (row == null || row.Length < width) + row = new byte[width]; // ensure we have room for the row + + var offset = (y + _top) * _dataWidth + _left; + _yuv.BlockCopyTo(offset, row, 0, width); + return row; + } + + override public byte[] Matrix + { + get + { + var width = Width; + var height = Height; + + var area = width * height; + var matrix = new byte[area]; + var inputOffset = _top * _dataWidth + _left; + + // If the width matches the full width of the underlying data, perform a single copy. + if (width == _dataWidth) + { + _yuv.BlockCopyTo(inputOffset, matrix, 0, area); + return matrix; + } + + // Otherwise copy one cropped row at a time. + for (var y = 0; y < height; y++) + { + var outputOffset = y * width; + _yuv.BlockCopyTo(inputOffset, matrix, outputOffset, width); + inputOffset += _dataWidth; + } + return matrix; + } + } + + /// Whether this subclass supports cropping. + override public bool CropSupported + => true; + + /// + /// Returns a new object with cropped image data. Implementations may keep a reference to the + /// original data rather than a copy. Only callable if CropSupported is true. + /// + /// The left coordinate, 0 <= left < Width. + /// The top coordinate, 0 <= top <= Height. + /// The width of the rectangle to crop. + /// The height of the rectangle to crop. + /// + /// A cropped version of this object. + /// + override public LuminanceSource crop(int left, int top, int width, int height) + => new FastJavaByteArrayYUVLuminanceSource(_yuv, + _dataWidth, + _dataHeight, + _left + left, + _top + top, + width, + height); + + // Called when rotating. + // todo: This partially defeats the purpose as we traffic in byte[] luminances + protected override LuminanceSource CreateLuminanceSource(byte[] newLuminances, int width, int height) + => new PlanarYUVLuminanceSource(newLuminances, width, height, 0, 0, width, height, false); + } +} \ No newline at end of file diff --git a/ZXing.Net.Mobile/Android/MobileBarcodeScanner.android.cs b/ZXing.Net.Mobile/Android/MobileBarcodeScanner.android.cs new file mode 100644 index 000000000..28a7f6af7 --- /dev/null +++ b/ZXing.Net.Mobile/Android/MobileBarcodeScanner.android.cs @@ -0,0 +1,132 @@ +using System; +using System.Threading.Tasks; +using Android.Content; +using ZXing; +using Android.OS; + +namespace ZXing.Mobile +{ + + public partial class MobileBarcodeScanner : MobileBarcodeScannerBase + { + public const string TAG = "ZXing.Net.Mobile"; + + [Obsolete("Use Xamarin.Essentials.Platform.Init instead")] + public static void Initialize(Android.App.Application app) + => Xamarin.Essentials.Platform.Init(app); + + [Obsolete("No longer necessary.")] + public static void Uninitialize(Android.App.Application app) + { + } + + public Android.Views.View CustomOverlay { get; set; } + + bool torch = false; + + Context GetContext(Context context) + => Xamarin.Essentials.Platform.CurrentActivity ?? Xamarin.Essentials.Platform.AppContext; + + internal void PlatformScanContinuously(MobileBarcodeScanningOptions options, Action scanHandler) + => ScanContinuously(null, options, scanHandler); + + public void ScanContinuously(Context context, MobileBarcodeScanningOptions options, Action scanHandler) + { + var ctx = GetContext(context); + var scanIntent = new Intent(ctx, typeof(ZxingActivity)); + + scanIntent.AddFlags(ActivityFlags.NewTask); + + ZxingActivity.UseCustomOverlayView = this.UseCustomOverlay; + ZxingActivity.CustomOverlayView = this.CustomOverlay; + ZxingActivity.ScanningOptions = options; + ZxingActivity.ScanContinuously = true; + ZxingActivity.TopText = TopText; + ZxingActivity.BottomText = BottomText; + + ZxingActivity.ScanCompletedHandler = (Result result) + => scanHandler?.Invoke(result); + + ctx.StartActivity(scanIntent); + } + + internal Task PlatformScan(MobileBarcodeScanningOptions options) + => Scan(null, options); + + public Task Scan(Context context, MobileBarcodeScanningOptions options) + { + var ctx = GetContext(context); + + var task = Task.Factory.StartNew(() => + { + + var waitScanResetEvent = new System.Threading.ManualResetEvent(false); + + var scanIntent = new Intent(ctx, typeof(ZxingActivity)); + + scanIntent.AddFlags(ActivityFlags.NewTask); + + ZxingActivity.UseCustomOverlayView = this.UseCustomOverlay; + ZxingActivity.CustomOverlayView = this.CustomOverlay; + ZxingActivity.ScanningOptions = options; + ZxingActivity.ScanContinuously = false; + ZxingActivity.TopText = TopText; + ZxingActivity.BottomText = BottomText; + + Result scanResult = null; + + ZxingActivity.CanceledHandler = () => waitScanResetEvent.Set(); + + ZxingActivity.ScanCompletedHandler = (Result result) => + { + scanResult = result; + waitScanResetEvent.Set(); + }; + + ctx.StartActivity(scanIntent); + + waitScanResetEvent.WaitOne(); + + return scanResult; + }); + + return task; + } + + internal void PlatformCancel() + => ZxingActivity.RequestCancel(); + + internal void PlatformAutoFocus() + => ZxingActivity.RequestAutoFocus(); + + internal void PlatformTorch(bool on) + { + torch = on; + ZxingActivity.RequestTorch(on); + } + + internal void PlatformToggleTorch() + => Torch(!torch); + + internal void PlatformPauseAnalysis() + => ZxingActivity.RequestPauseAnalysis(); + + internal void PlatformResumeAnalysis() + => ZxingActivity.RequestResumeAnalysis(); + + internal bool PlatformIsTorchOn + => torch; + + internal static void LogDebug(string format, params object[] args) + => Android.Util.Log.Debug("ZXING", format, args); + + internal static void LogError(string format, params object[] args) + => Android.Util.Log.Error("ZXING", format, args); + + internal static void LogInfo(string format, params object[] args) + => Android.Util.Log.Info("ZXING", format, args); + + internal static void LogWarn(string format, params object[] args) + => Android.Util.Log.Warn("ZXING", format, args); + } +} diff --git a/ZXing.Net.Mobile/Android/Permissions.android.cs b/ZXing.Net.Mobile/Android/Permissions.android.cs new file mode 100644 index 000000000..be1219a45 --- /dev/null +++ b/ZXing.Net.Mobile/Android/Permissions.android.cs @@ -0,0 +1,3 @@ +using Android.App; + +[assembly: UsesPermission(Android.Manifest.Permission.Camera)] diff --git a/ZXing.Net.Mobile/Android/PermissionsHandler.android.cs b/ZXing.Net.Mobile/Android/PermissionsHandler.android.cs new file mode 100644 index 000000000..f3e01c2d5 --- /dev/null +++ b/ZXing.Net.Mobile/Android/PermissionsHandler.android.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using ZXing.Mobile; +using System.Linq; +using Android.App; +using System.Threading.Tasks; +using Android.Content.PM; +using Android.Content; +using Xamarin.Essentials; + +namespace ZXing.Net.Mobile.Android +{ + public static class PermissionsHandler + { + [Obsolete("Use Xamarin.Essentials.Platform.OnRequestPermissionsResult instead.")] + public static void OnRequestPermissionsResult(int requestCode, string[] permissions, Permission[] grantResults) + => Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults); + + public static async Task RequestPermissionsAsync() + { + var camera = await Permissions.RequestAsync(); + + if (camera != PermissionStatus.Granted) + return false; + + // Only check if it's in the manifest already + if (Permissions.IsDeclaredInManifest(global::Android.Manifest.Permission.Flashlight)) + { + var flashlight = await Permissions.RequestAsync(); + if (flashlight != PermissionStatus.Granted) + return false; + } + + return true; + } + + internal static bool IsTorchPermissionDeclared() + => Permissions.IsDeclaredInManifest(global::Android.Manifest.Permission.Flashlight); + + [Obsolete("Use Xamarin.Essentials.Permissions instead.")] + public static bool NeedsPermissionRequest(Activity activity = null) + => true; + } +} diff --git a/ZXing.Net.Mobile/Android/ZXingScannerFragment.android.cs b/ZXing.Net.Mobile/Android/ZXingScannerFragment.android.cs new file mode 100644 index 000000000..5d5895d5c --- /dev/null +++ b/ZXing.Net.Mobile/Android/ZXingScannerFragment.android.cs @@ -0,0 +1,154 @@ +using System; +using Android.OS; +using Android.Views; +using Android.Widget; +#if __ANDROID_29__ +using AndroidX.Fragment.App; +#else +using Android.Support.V4.App; +#endif + +namespace ZXing.Mobile +{ + public class ZXingScannerFragment : Fragment, IZXingScanner, IScannerView + { + public ZXingScannerFragment() + { + UseCustomOverlayView = false; + } + + FrameLayout frame; + + public override View OnCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) + { + frame = (FrameLayout)layoutInflater.Inflate(ZXing.Net.Mobile.Resource.Layout.zxingscannerfragmentlayout, viewGroup, false); + + var layoutParams = GetChildLayoutParams(); + + try + { + scanner = new ZXingSurfaceView(Activity, ScanningOptions); + + frame.AddView(scanner, layoutParams); + + + if (!UseCustomOverlayView) + { + zxingOverlay = new ZxingOverlayView(Activity); + zxingOverlay.TopText = TopText ?? ""; + zxingOverlay.BottomText = BottomText ?? ""; + + frame.AddView(zxingOverlay, layoutParams); + } + else if (CustomOverlayView != null) + { + frame.AddView(CustomOverlayView, layoutParams); + } + } + catch (Exception ex) + { + Console.WriteLine("Create Surface View Failed: " + ex); + } + + Android.Util.Log.Debug(MobileBarcodeScanner.TAG, "ZXingScannerFragment->OnResume exit"); + + return frame; + } + + public override void OnStart() + { + base.OnStart(); + // won't be 0 if OnCreateView has been called before. + if (frame.ChildCount == 0) + { + var layoutParams = GetChildLayoutParams(); + // reattach scanner and overlay views. + frame.AddView(scanner, layoutParams); + + if (!UseCustomOverlayView) + frame.AddView(zxingOverlay, layoutParams); + else if (CustomOverlayView != null) + frame.AddView(CustomOverlayView, layoutParams); + } + } + + public override void OnStop() + { + if (scanner != null) + { + scanner.StopScanning(); + + frame.RemoveView(scanner); + } + + if (!UseCustomOverlayView) + frame.RemoveView(zxingOverlay); + else if (CustomOverlayView != null) + frame.RemoveView(CustomOverlayView); + + base.OnStop(); + } + + LinearLayout.LayoutParams GetChildLayoutParams() + { + var layoutParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent); + layoutParams.Weight = 1; + return layoutParams; + } + + public View CustomOverlayView { get; set; } + public bool UseCustomOverlayView { get; set; } + public MobileBarcodeScanningOptions ScanningOptions { get; set; } + public string TopText { get; set; } + public string BottomText { get; set; } + + ZXingSurfaceView scanner; + ZxingOverlayView zxingOverlay; + + public void Torch(bool on) + => scanner?.Torch(on); + + public void AutoFocus() + => scanner?.AutoFocus(); + + public void AutoFocus(int x, int y) + => scanner?.AutoFocus(x, y); + + Action scanCallback; + + public void StartScanning(Action scanResultHandler, MobileBarcodeScanningOptions options = null) + { + ScanningOptions = options; + scanCallback = scanResultHandler; + + if (scanner == null) + return; + + Scan(); + } + + void Scan() + => scanner?.StartScanning(scanCallback, ScanningOptions); + + public void StopScanning() + => scanner?.StopScanning(); + + public void PauseAnalysis() + => scanner?.PauseAnalysis(); + + public void ResumeAnalysis() + => scanner?.ResumeAnalysis(); + + public void ToggleTorch() + => scanner?.ToggleTorch(); + + public bool IsTorchOn + => scanner?.IsTorchOn ?? false; + + public bool IsAnalyzing + => scanner?.IsAnalyzing ?? false; + + public bool HasTorch + => scanner?.HasTorch ?? false; + } +} diff --git a/ZXing.Net.Mobile/Android/ZXingSurfaceView.android.cs b/ZXing.Net.Mobile/Android/ZXingSurfaceView.android.cs new file mode 100644 index 000000000..0fe0c87f1 --- /dev/null +++ b/ZXing.Net.Mobile/Android/ZXingSurfaceView.android.cs @@ -0,0 +1,160 @@ +using System; +using Android.Content; +using Android.Runtime; +using Android.Views; +using Android.Graphics; +using ZXing.Mobile.CameraAccess; +using ZXing.Net.Mobile.Android; + +namespace ZXing.Mobile +{ + public class ZXingSurfaceView : SurfaceView, ISurfaceHolderCallback, IScannerView, IScannerSessionHost + { + public ZXingSurfaceView(Context context, MobileBarcodeScanningOptions options) + : base(context) + { + ScanningOptions = options ?? new MobileBarcodeScanningOptions(); + Init(); + } + + protected ZXingSurfaceView(IntPtr javaReference, JniHandleOwnership transfer) + : base(javaReference, transfer) => Init(); + + bool addedHolderCallback = false; + + void Init() + { + if (cameraAnalyzer == null) + cameraAnalyzer = new CameraAnalyzer(this, this); + + cameraAnalyzer.ResumeAnalysis(); + + if (!addedHolderCallback) + { + Holder.AddCallback(this); + Holder.SetType(SurfaceType.PushBuffers); + addedHolderCallback = true; + } + } + + public async void SurfaceCreated(ISurfaceHolder holder) + { + await PermissionsHandler.RequestPermissionsAsync(); + + cameraAnalyzer.SetupCamera(); + + surfaceCreated = true; + } + + public async void SurfaceChanged(ISurfaceHolder holder, Format format, int wx, int hx) + => cameraAnalyzer.RefreshCamera(); + + public async void SurfaceDestroyed(ISurfaceHolder holder) + { + try + { + if (addedHolderCallback) + { + Holder.RemoveCallback(this); + addedHolderCallback = false; + } + } + catch { } + + cameraAnalyzer.ShutdownCamera(); + } + + public override bool OnTouchEvent(MotionEvent e) + { + var r = base.OnTouchEvent(e); + + switch (e.Action) + { + case MotionEventActions.Down: + return true; + case MotionEventActions.Up: + var touchX = e.GetX(); + var touchY = e.GetY(); + AutoFocus((int)touchX, (int)touchY); + break; + } + + return r; + } + + public void AutoFocus() + => cameraAnalyzer.AutoFocus(); + + public void AutoFocus(int x, int y) + => cameraAnalyzer.AutoFocus(x, y); + + public void StartScanning(Action scanResultCallback, MobileBarcodeScanningOptions options = null) + { + cameraAnalyzer.SetupCamera(); + + ScanningOptions = options ?? MobileBarcodeScanningOptions.Default; + + cameraAnalyzer.BarcodeFound = (result) => + scanResultCallback?.Invoke(result); + cameraAnalyzer.ResumeAnalysis(); + } + + public void StopScanning() + => cameraAnalyzer.ShutdownCamera(); + + public void PauseAnalysis() + => cameraAnalyzer.PauseAnalysis(); + + public void ResumeAnalysis() + => cameraAnalyzer.ResumeAnalysis(); + + public void Torch(bool on) + { + if (on) + cameraAnalyzer.Torch.TurnOn(); + else + cameraAnalyzer.Torch.TurnOff(); + } + + public void ToggleTorch() + => cameraAnalyzer.Torch.Toggle(); + + public MobileBarcodeScanningOptions ScanningOptions { get; set; } + + public bool IsTorchOn => cameraAnalyzer.Torch.IsEnabled; + + public bool IsAnalyzing => cameraAnalyzer.IsAnalyzing; + + CameraAnalyzer cameraAnalyzer; + bool surfaceCreated; + + public bool HasTorch => cameraAnalyzer.Torch.IsSupported; + + protected override void OnAttachedToWindow() + { + base.OnAttachedToWindow(); + + // Reinit things + Init(); + } + + protected override void OnWindowVisibilityChanged(ViewStates visibility) + { + base.OnWindowVisibilityChanged(visibility); + if (visibility == ViewStates.Visible) + Init(); + } + + public override async void OnWindowFocusChanged(bool hasWindowFocus) + { + base.OnWindowFocusChanged(hasWindowFocus); + + if (!hasWindowFocus) + return; + + //only refresh the camera if the surface has already been created. Fixed #569 + if (surfaceCreated) + cameraAnalyzer.RefreshCamera(); + } + } +} diff --git a/ZXing.Net.Mobile/Android/ZxingActivity.android.cs b/ZXing.Net.Mobile/Android/ZxingActivity.android.cs new file mode 100644 index 000000000..23b54bc75 --- /dev/null +++ b/ZXing.Net.Mobile/Android/ZxingActivity.android.cs @@ -0,0 +1,161 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Drawing; + +using Android.App; +using Android.Content.PM; +using Android.Views; +using Android.OS; +using Android.Hardware; +using Android.Graphics; + +using Android.Content; +using Android.Runtime; +using Android.Widget; + +using ZXing; +#if __ANDROID_29__ +using AndroidX.Fragment.App; +#else +using Android.Support.V4.App; +#endif + +using System.Linq; +using System.Threading.Tasks; + +namespace ZXing.Mobile +{ + [Activity(Label = "Scanner", ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.KeyboardHidden | ConfigChanges.ScreenLayout)] + public class ZxingActivity : FragmentActivity + { + public static readonly string[] RequiredPermissions = new[] { + Android.Manifest.Permission.Camera, + Android.Manifest.Permission.Flashlight + }; + + public static Action ScanCompletedHandler; + public static Action CanceledHandler; + + public static Action CancelRequestedHandler; + public static Action TorchRequestedHandler; + public static Action AutoFocusRequestedHandler; + public static Action PauseAnalysisHandler; + public static Action ResumeAnalysisHandler; + + public static void RequestCancel() + => CancelRequestedHandler?.Invoke(); + + public static void RequestTorch(bool torchOn) + => TorchRequestedHandler?.Invoke(torchOn); + + public static void RequestAutoFocus() + => AutoFocusRequestedHandler?.Invoke(); + + public static void RequestPauseAnalysis() + => PauseAnalysisHandler?.Invoke(); + + public static void RequestResumeAnalysis() + => ResumeAnalysisHandler?.Invoke(); + + public static View CustomOverlayView { get; set; } + + public static bool UseCustomOverlayView { get; set; } + + public static MobileBarcodeScanningOptions ScanningOptions { get; set; } + + public static string TopText { get; set; } + + public static string BottomText { get; set; } + + public static bool ScanContinuously { get; set; } + + ZXingScannerFragment scannerFragment; + + protected override void OnCreate(Bundle bundle) + { + base.OnCreate(bundle); + + RequestWindowFeature(WindowFeatures.NoTitle); + + Window.AddFlags(WindowManagerFlags.Fullscreen); //to show + Window.AddFlags(WindowManagerFlags.KeepScreenOn); //Don't go to sleep while scanning + + if (ScanningOptions.AutoRotate.HasValue && !ScanningOptions.AutoRotate.Value) + RequestedOrientation = ScreenOrientation.Nosensor; + + SetContentView(ZXing.Net.Mobile.Resource.Layout.zxingscanneractivitylayout); + + scannerFragment = new ZXingScannerFragment(); + scannerFragment.CustomOverlayView = CustomOverlayView; + scannerFragment.UseCustomOverlayView = UseCustomOverlayView; + scannerFragment.TopText = TopText; + scannerFragment.BottomText = BottomText; + + SupportFragmentManager.BeginTransaction() + .Replace(ZXing.Net.Mobile.Resource.Id.contentFrame, scannerFragment, "ZXINGFRAGMENT") + .Commit(); + + CancelRequestedHandler = CancelScan; + AutoFocusRequestedHandler = AutoFocus; + TorchRequestedHandler = SetTorch; + PauseAnalysisHandler = scannerFragment.PauseAnalysis; + ResumeAnalysisHandler = scannerFragment.ResumeAnalysis; + } + + protected override async void OnResume() + { + base.OnResume(); + + + StartScanning(); + } + + public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Permission[] grantResults) + => Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults); + + void StartScanning() + { + scannerFragment.StartScanning(result => + { + ScanCompletedHandler?.Invoke(result); + + if (!ZxingActivity.ScanContinuously) + Finish(); + }, ScanningOptions); + } + + public override void OnConfigurationChanged(Android.Content.Res.Configuration newConfig) + { + base.OnConfigurationChanged(newConfig); + + Android.Util.Log.Debug(MobileBarcodeScanner.TAG, "Configuration Changed"); + } + + public void SetTorch(bool on) + => scannerFragment.Torch(on); + + public void AutoFocus() + => scannerFragment.AutoFocus(); + + public void CancelScan() + { + Finish(); + CanceledHandler?.Invoke(); + } + + public override bool OnKeyDown(Keycode keyCode, KeyEvent e) + { + switch (keyCode) + { + case Keycode.Back: + CancelScan(); + break; + case Keycode.Focus: + return true; + } + + return base.OnKeyDown(keyCode, e); + } + } +} \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.Android/ZxingOverlayView.cs b/ZXing.Net.Mobile/Android/ZxingOverlayView.android.cs similarity index 73% rename from Source/ZXing.Net.Mobile.Android/ZxingOverlayView.cs rename to ZXing.Net.Mobile/Android/ZxingOverlayView.android.cs index 885de2e0d..d66993748 100644 --- a/Source/ZXing.Net.Mobile.Android/ZxingOverlayView.cs +++ b/ZXing.Net.Mobile/Android/ZxingOverlayView.android.cs @@ -16,62 +16,60 @@ namespace ZXing.Mobile { - public class ZxingOverlayView : View + public class ZxingOverlayView : View { - private int[] SCANNER_ALPHA = {0, 64, 128, 192, 255, 192, 128, 64}; - private const long ANIMATION_DELAY = 80L; - private const int CURRENT_POINT_OPACITY = 0xA0; - private const int MAX_RESULT_POINTS = 20; - private const int POINT_SIZE = 6; - - private Paint paint; - private Android.Graphics.Bitmap resultBitmap; - private Color maskColor; - private Color resultColor; - private Color frameColor; - private Color laserColor; - //private Color resultPointColor; - private int scannerAlpha; - private List possibleResultPoints; - //private List lastPossibleResultPoints; + int[] SCANNER_ALPHA = { 0, 64, 128, 192, 255, 192, 128, 64 }; + const long ANIMATION_DELAY = 80L; + const int CURRENT_POINT_OPACITY = 0xA0; + const int MAX_RESULT_POINTS = 20; + const int POINT_SIZE = 6; + + Paint paint; + Bitmap resultBitmap; + Color maskColor; + Color resultColor; + Color frameColor; + Color laserColor; + + int scannerAlpha; + List possibleResultPoints; public ZxingOverlayView(Context context) : base(context) { // Initialize these once for performance rather than calling them every time in onDraw(). paint = new Paint(PaintFlags.AntiAlias); + //Resources resources = getResources(); maskColor = Color.Gray; // resources.getColor(R.color.viewfinder_mask); resultColor = Color.Red; // resources.getColor(R.color.result_view); frameColor = Color.Black; // resources.getColor(R.color.viewfinder_frame); laserColor = Color.Red; // resources.getColor(R.color.viewfinder_laser); - //resultPointColor = Color.LightCoral; // resources.getColor(R.color.possible_result_points); + //resultPointColor = Color.LightCoral; // resources.getColor(R.color.possible_result_points); scannerAlpha = 0; possibleResultPoints = new List(5); - //lastPossibleResultPoints = null; - this.SetBackgroundColor(Color.Transparent); - //scanner = scannerInstance; + SetBackgroundColor(Color.Transparent); } Rect GetFramingRect(Canvas canvas) { - int width = canvas.Width * 15 / 16; + var width = canvas.Width * 15 / 16; - int height = canvas.Height * 4/ 10; + var height = canvas.Height * 4 / 10; - int leftOffset = (canvas.Width - width) / 2; - int topOffset = (canvas.Height - height) / 2; + var leftOffset = (canvas.Width - width) / 2; + var topOffset = (canvas.Height - height) / 2; var framingRect = new Rect(leftOffset, topOffset, leftOffset + width, topOffset + height); return framingRect; } - public string TopText { get;set; } - public string BottomText { get;set; } + public string TopText { get; set; } + public string BottomText { get; set; } - protected override void OnDraw (Canvas canvas) + protected override void OnDraw(Canvas canvas) { - + var scale = this.Context.Resources.DisplayMetrics.Density; var frame = GetFramingRect(canvas); @@ -89,14 +87,14 @@ protected override void OnDraw (Canvas canvas) //canvas.DrawRect(frame.Right + 1, frame.Top, width, frame.Bottom + 1, paint); canvas.DrawRect(0, frame.Bottom + 1, width, height, paint); - + var textPaint = new TextPaint(); textPaint.Color = Color.White; textPaint.TextSize = 16 * scale; var topTextLayout = new StaticLayout(this.TopText, textPaint, canvas.Width, Android.Text.Layout.Alignment.AlignCenter, 1.0f, 0.0f, false); canvas.Save(); - Rect topBounds = new Rect(); + var topBounds = new Rect(); textPaint.GetTextBounds(this.TopText, 0, this.TopText.Length, topBounds); canvas.Translate(0, frame.Top / 2 - (topTextLayout.Height / 2)); @@ -109,14 +107,14 @@ protected override void OnDraw (Canvas canvas) var botTextLayout = new StaticLayout(this.BottomText, textPaint, canvas.Width, Android.Text.Layout.Alignment.AlignCenter, 1.0f, 0.0f, false); canvas.Save(); - Rect botBounds = new Rect(); - + var botBounds = new Rect(); + textPaint.GetTextBounds(this.BottomText, 0, this.BottomText.Length, botBounds); canvas.Translate(0, (frame.Bottom + (canvas.Height - frame.Bottom) / 2) - (botTextLayout.Height / 2)); - + //canvas.Translate(topBounds.Left, topBounds.Bottom); botTextLayout.Draw(canvas); - + canvas.Restore(); @@ -130,7 +128,7 @@ protected override void OnDraw (Canvas canvas) } else { - // Draw a two pixel solid black border inside the framing rect + // Draw a two pixel solid black border inside the framing rect paint.Color = frameColor; //canvas.DrawRect(frame.Left, frame.Top, frame.Right + 1, frame.Top + 2, paint); //canvas.DrawRect(frame.Left, frame.Top + 2, frame.Left + 2, frame.Bottom - 1, paint); @@ -141,7 +139,7 @@ protected override void OnDraw (Canvas canvas) paint.Color = laserColor; paint.Alpha = SCANNER_ALPHA[scannerAlpha]; scannerAlpha = (scannerAlpha + 1) % SCANNER_ALPHA.Length; - int middle = frame.Height() / 2 + frame.Top; + var middle = frame.Height() / 2 + frame.Top; //int middle = frame.Width() / 2 + frame.Left; //canvas.DrawRect(frame.Left + 2, middle - 1, frame.Right - 1, middle + 2, paint); @@ -150,8 +148,8 @@ protected override void OnDraw (Canvas canvas) //canvas.DrawRect(middle - 1, frame.Top + 2, middle + 2, frame.Bottom - 1, paint); //frame.Top + 2, middle - 1, frame.Bottom - 1, middle + 2, paint); //var previewFrame = scanner.GetFramingRectInPreview(); - //float scaleX = frame.Width() / (float) previewFrame.Width(); - //float scaleY = frame.Height() / (float) previewFrame.Height(); + //float scaleX = frame.Width() / (float) previewFrame.Width(); + //float scaleY = frame.Height() / (float) previewFrame.Height(); /*var currentPossible = possibleResultPoints; var currentLast = lastPossibleResultPoints; @@ -161,7 +159,7 @@ protected override void OnDraw (Canvas canvas) if (currentPossible == null || currentPossible.Count <= 0) { - lastPossibleResultPoints = null; + lastPossibleResultPoints = null; } else { @@ -175,7 +173,7 @@ protected override void OnDraw (Canvas canvas) foreach (var point in currentPossible) { canvas.DrawCircle(frameLeft + (int) (point.X * scaleX), - frameTop + (int) (point.Y * scaleY), POINT_SIZE, paint); + frameTop + (int) (point.Y * scaleY), POINT_SIZE, paint); } } } @@ -191,7 +189,7 @@ protected override void OnDraw (Canvas canvas) foreach (var point in currentLast) { canvas.DrawCircle(frameLeft + (int) (point.X * scaleX), - frameTop + (int) (point.Y * scaleY), radius, paint); + frameTop + (int) (point.Y * scaleY), radius, paint); } } } @@ -200,13 +198,13 @@ protected override void OnDraw (Canvas canvas) // Request another update at the animation interval, but only repaint the laser line, // not the entire viewfinder mask. PostInvalidateDelayed(ANIMATION_DELAY, - frame.Left - POINT_SIZE, - frame.Top - POINT_SIZE, - frame.Right + POINT_SIZE, - frame.Bottom + POINT_SIZE); + frame.Left - POINT_SIZE, + frame.Top - POINT_SIZE, + frame.Right + POINT_SIZE, + frame.Bottom + POINT_SIZE); } - base.OnDraw (canvas); + base.OnDraw(canvas); } public void DrawResultBitmap(Android.Graphics.Bitmap barcode) @@ -223,7 +221,7 @@ public void AddPossibleResultPoint(ZXing.ResultPoint point) { points.Add(point); var size = points.Count; - if (size > MAX_RESULT_POINTS) + if (size > MAX_RESULT_POINTS) { points.RemoveRange(0, size - MAX_RESULT_POINTS / 2); } diff --git a/Source/ZXing.Net.Mobile.Core/CameraResolution.cs b/ZXing.Net.Mobile/CameraResolution.shared.cs similarity index 55% rename from Source/ZXing.Net.Mobile.Core/CameraResolution.cs rename to ZXing.Net.Mobile/CameraResolution.shared.cs index f44b5594a..222a3b567 100644 --- a/Source/ZXing.Net.Mobile.Core/CameraResolution.cs +++ b/ZXing.Net.Mobile/CameraResolution.shared.cs @@ -4,8 +4,7 @@ namespace ZXing.Mobile { public class CameraResolution { - public int Width { get;set; } - public int Height { get;set; } + public int Width { get; set; } + public int Height { get; set; } } } - diff --git a/ZXing.Net.Mobile/IMobileBarcodeScanner.shared.cs b/ZXing.Net.Mobile/IMobileBarcodeScanner.shared.cs new file mode 100644 index 000000000..3adc26c16 --- /dev/null +++ b/ZXing.Net.Mobile/IMobileBarcodeScanner.shared.cs @@ -0,0 +1,90 @@ +using System; +using System.Threading.Tasks; +using ZXing; + +namespace ZXing.Mobile +{ + public interface IZXingScanner : IScannerView + { + TOverlayViewType CustomOverlayView { get; set; } + bool UseCustomOverlayView { get; set; } + string TopText { get; set; } + string BottomText { get; set; } + } + + public interface IMobileBarcodeScanner + { + Task Scan(MobileBarcodeScanningOptions options); + Task Scan(); + + void ScanContinuously(MobileBarcodeScanningOptions options, Action scanHandler); + void ScanContinuously(Action scanHandler); + + void Cancel(); + + void Torch(bool on); + void AutoFocus(); + void ToggleTorch(); + + void PauseAnalysis(); + void ResumeAnalysis(); + + bool UseCustomOverlay { get; } + string TopText { get; set; } + string BottomText { get; set; } + + string CancelButtonText { get; set; } + string FlashButtonText { get; set; } + string CameraUnsupportedMessage { get; set; } + + bool IsTorchOn { get; } + } + + public abstract class MobileBarcodeScannerBase : IMobileBarcodeScanner + { + public MobileBarcodeScannerBase() + { + CancelButtonText = "Cancel"; + FlashButtonText = "Flash"; + CameraUnsupportedMessage = "Unable to start Camera for Scanning"; + } + + public bool UseCustomOverlay { get; set; } + public string TopText { get; set; } + public string BottomText { get; set; } + public string CancelButtonText { get; set; } + public string FlashButtonText { get; set; } + public string CameraUnsupportedMessage { get; set; } + + public abstract Task Scan(MobileBarcodeScanningOptions options); + + public Task Scan() + => Scan(MobileBarcodeScanningOptions.Default); + + public void ScanContinuously(Action scanHandler) + => ScanContinuously(MobileBarcodeScanningOptions.Default, scanHandler); + + public abstract void ScanContinuously(MobileBarcodeScanningOptions options, Action scanHandler); + + public abstract void Cancel(); + + public abstract void Torch(bool on); + + public abstract void ToggleTorch(); + + public abstract bool IsTorchOn { get; } + + public abstract void AutoFocus(); + + public abstract void PauseAnalysis(); + public abstract void ResumeAnalysis(); + } + + public class CancelScanRequestEventArgs : EventArgs + { + public CancelScanRequestEventArgs() + => Cancel = false; + + public bool Cancel { get; set; } + } +} diff --git a/Source/ZXing.Net.Mobile.Core/IScannerSessionHost.cs b/ZXing.Net.Mobile/IScannerSessionHost.shared.cs similarity index 100% rename from Source/ZXing.Net.Mobile.Core/IScannerSessionHost.cs rename to ZXing.Net.Mobile/IScannerSessionHost.shared.cs diff --git a/ZXing.Net.Mobile/IScannerView.shared.cs b/ZXing.Net.Mobile/IScannerView.shared.cs new file mode 100644 index 000000000..cf43a60c2 --- /dev/null +++ b/ZXing.Net.Mobile/IScannerView.shared.cs @@ -0,0 +1,22 @@ +using System; + +namespace ZXing.Mobile +{ + public interface IScannerView + { + void StartScanning(Action scanResultHandler, MobileBarcodeScanningOptions options = null); + void StopScanning(); + + void PauseAnalysis(); + void ResumeAnalysis(); + + void Torch(bool on); + void AutoFocus(); + void AutoFocus(int x, int y); + void ToggleTorch(); + bool IsTorchOn { get; } + bool IsAnalyzing { get; } + + bool HasTorch { get; } + } +} diff --git a/ZXing.Net.Mobile/MacOS/BitmapRenderer.macos.cs b/ZXing.Net.Mobile/MacOS/BitmapRenderer.macos.cs new file mode 100644 index 000000000..3b653e0a9 --- /dev/null +++ b/ZXing.Net.Mobile/MacOS/BitmapRenderer.macos.cs @@ -0,0 +1,47 @@ +using System; +using ZXing.Rendering; + +using Foundation; +using CoreFoundation; +using CoreGraphics; +using AppKit; + +using ZXing.Common; + +namespace ZXing.Mobile +{ + public class BitmapRenderer : IBarcodeRenderer + { + + public NSImage Render(BitMatrix matrix, BarcodeFormat format, string content) + { + return Render(matrix, format, content, new EncodingOptions()); + } + + public NSImage Render(BitMatrix matrix, BarcodeFormat format, string content, EncodingOptions options) + { + var context = new CGBitmapContext(null, matrix.Width, matrix.Height, 8, 0, CGColorSpace.CreateGenericGray(), CGBitmapFlags.None); + + var black = new CGColor(0f, 0f, 0f); + var white = new CGColor(1.0f, 1.0f, 1.0f); + + for (var x = 0; x < matrix.Width; x++) + { + for (var y = 0; y < matrix.Height; y++) + { + var (cgX, cgY) = TransformToCoreGraphicsCoords(x, y, matrix); + context.SetFillColor(matrix[cgX, cgY] ? black : white); + context.FillRect(new CGRect(x, y, 1, 1)); + } + } + + var img = new NSImage(context.ToImage(), new CGSize(matrix.Width, matrix.Height)); + context.Dispose(); + + return img; + } + + static (int cgX, int cgY) TransformToCoreGraphicsCoords(int x, int y, BitMatrix matrix) + => (x, Math.Abs(y - matrix.Height + 1)); + } +} \ No newline at end of file diff --git a/ZXing.Net.Mobile/MacOS/BitmapWriter.macos.cs b/ZXing.Net.Mobile/MacOS/BitmapWriter.macos.cs new file mode 100644 index 000000000..37d107ad2 --- /dev/null +++ b/ZXing.Net.Mobile/MacOS/BitmapWriter.macos.cs @@ -0,0 +1,17 @@ +using System; +using AppKit; +using ZXing.Mobile; + +namespace ZXing.Mobile +{ + public class BarcodeWriter : BarcodeWriter, IBarcodeWriter + { + /// + /// Initializes a new instance of the class. + /// + public BarcodeWriter() + { + Renderer = new BitmapRenderer(); + } + } +} \ No newline at end of file diff --git a/ZXing.Net.Mobile/MacOS/MobileBarcodeScanner.macos.cs b/ZXing.Net.Mobile/MacOS/MobileBarcodeScanner.macos.cs new file mode 100644 index 000000000..cb932935d --- /dev/null +++ b/ZXing.Net.Mobile/MacOS/MobileBarcodeScanner.macos.cs @@ -0,0 +1,37 @@ +using System; +using System.Threading.Tasks; + +namespace ZXing.Mobile +{ + public partial class MobileBarcodeScanner : MobileBarcodeScannerBase + { + NotSupportedException ex = new NotSupportedException("MobileBarcodeScanner is unsupported on this platform."); + + Task PlatformScan(MobileBarcodeScanningOptions options) + => throw ex; + + void PlatformScanContinuously(MobileBarcodeScanningOptions options, Action scanHandler) + => throw ex; + + void PlatformCancel() + => throw ex; + + void PlatformAutoFocus() + => throw ex; + + void PlatformTorch(bool on) + => throw ex; + + void PlatformToggleTorch() + => throw ex; + + void PlatformPauseAnalysis() + => throw ex; + + void PlatformResumeAnalysis() + => throw ex; + + bool PlatformIsTorchOn + => throw ex; + } +} diff --git a/ZXing.Net.Mobile/MobileBarcodeScanner.netstandard.cs b/ZXing.Net.Mobile/MobileBarcodeScanner.netstandard.cs new file mode 100644 index 000000000..cb932935d --- /dev/null +++ b/ZXing.Net.Mobile/MobileBarcodeScanner.netstandard.cs @@ -0,0 +1,37 @@ +using System; +using System.Threading.Tasks; + +namespace ZXing.Mobile +{ + public partial class MobileBarcodeScanner : MobileBarcodeScannerBase + { + NotSupportedException ex = new NotSupportedException("MobileBarcodeScanner is unsupported on this platform."); + + Task PlatformScan(MobileBarcodeScanningOptions options) + => throw ex; + + void PlatformScanContinuously(MobileBarcodeScanningOptions options, Action scanHandler) + => throw ex; + + void PlatformCancel() + => throw ex; + + void PlatformAutoFocus() + => throw ex; + + void PlatformTorch(bool on) + => throw ex; + + void PlatformToggleTorch() + => throw ex; + + void PlatformPauseAnalysis() + => throw ex; + + void PlatformResumeAnalysis() + => throw ex; + + bool PlatformIsTorchOn + => throw ex; + } +} diff --git a/ZXing.Net.Mobile/MobileBarcodeScanner.shared.cs b/ZXing.Net.Mobile/MobileBarcodeScanner.shared.cs new file mode 100644 index 000000000..3109c3bc6 --- /dev/null +++ b/ZXing.Net.Mobile/MobileBarcodeScanner.shared.cs @@ -0,0 +1,35 @@ +using System; +using System.Threading.Tasks; + +namespace ZXing.Mobile +{ + public partial class MobileBarcodeScanner : MobileBarcodeScannerBase + { + public override Task Scan(MobileBarcodeScanningOptions options) + => PlatformScan(options); + + public override void ScanContinuously(MobileBarcodeScanningOptions options, Action scanHandler) + => PlatformScanContinuously(options, scanHandler); + + public override void Cancel() + => PlatformCancel(); + + public override void AutoFocus() + => PlatformAutoFocus(); + + public override void Torch(bool on) + => PlatformTorch(on); + + public override void ToggleTorch() + => PlatformToggleTorch(); + + public override void PauseAnalysis() + => PlatformPauseAnalysis(); + + public override void ResumeAnalysis() + => PlatformResumeAnalysis(); + + public override bool IsTorchOn + => PlatformIsTorchOn; + } +} diff --git a/ZXing.Net.Mobile/MobileBarcodeScanningOptions.shared.cs b/ZXing.Net.Mobile/MobileBarcodeScanningOptions.shared.cs new file mode 100644 index 000000000..4fe1a62f8 --- /dev/null +++ b/ZXing.Net.Mobile/MobileBarcodeScanningOptions.shared.cs @@ -0,0 +1,120 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using ZXing; + +namespace ZXing.Mobile +{ + public class MobileBarcodeScanningOptions + { + /// + /// Camera resolution selector delegate, must return the selected Resolution from the list of available resolutions + /// + public delegate CameraResolution CameraResolutionSelectorDelegate(List availableResolutions); + + public MobileBarcodeScanningOptions() + { + PossibleFormats = new List(); + //this.AutoRotate = true; + DelayBetweenAnalyzingFrames = 150; + InitialDelayBeforeAnalyzingFrames = 300; + DelayBetweenContinuousScans = 1000; + UseNativeScanning = false; + } + + public CameraResolutionSelectorDelegate CameraResolutionSelector { get; set; } + + public List PossibleFormats { get; set; } + + public bool? TryHarder { get; set; } + + public bool? PureBarcode { get; set; } + + public bool? AutoRotate { get; set; } + + public bool? UseCode39ExtendedMode { get; set; } + + public string CharacterSet { get; set; } + + public bool? TryInverted { get; set; } + + public bool? UseFrontCameraIfAvailable { get; set; } + + public bool? AssumeGS1 { get; set; } + + + public bool DisableAutofocus { get; set; } + + public bool UseNativeScanning { get; set; } + + public int DelayBetweenContinuousScans { get; set; } + + public int DelayBetweenAnalyzingFrames { get; set; } + public int InitialDelayBeforeAnalyzingFrames { get; set; } + + public static MobileBarcodeScanningOptions Default + { + get { return new MobileBarcodeScanningOptions(); } + } + + public BarcodeReader BuildBarcodeReader() + { + var reader = new BarcodeReader(); + if (TryHarder.HasValue) + reader.Options.TryHarder = TryHarder.Value; + if (PureBarcode.HasValue) + reader.Options.PureBarcode = PureBarcode.Value; + if (AutoRotate.HasValue) + reader.AutoRotate = AutoRotate.Value; + if (UseCode39ExtendedMode.HasValue) + reader.Options.UseCode39ExtendedMode = UseCode39ExtendedMode.Value; + if (!string.IsNullOrEmpty(CharacterSet)) + reader.Options.CharacterSet = CharacterSet; + if (TryInverted.HasValue) + reader.TryInverted = TryInverted.Value; + if (AssumeGS1.HasValue) + reader.Options.AssumeGS1 = AssumeGS1.Value; + + if (PossibleFormats != null && PossibleFormats.Count > 0) + { + reader.Options.PossibleFormats = new List(); + + foreach (var pf in PossibleFormats) + reader.Options.PossibleFormats.Add(pf); + } + + return reader; + } + + public MultiFormatReader BuildMultiFormatReader() + { + var reader = new MultiFormatReader(); + + var hints = new Dictionary(); + + if (TryHarder.HasValue && TryHarder.Value) + hints.Add(DecodeHintType.TRY_HARDER, TryHarder.Value); + if (PureBarcode.HasValue && PureBarcode.Value) + hints.Add(DecodeHintType.PURE_BARCODE, PureBarcode.Value); + + if (PossibleFormats != null && PossibleFormats.Count > 0) + hints.Add(DecodeHintType.POSSIBLE_FORMATS, PossibleFormats); + + reader.Hints = hints; + + return reader; + } + + public CameraResolution GetResolution(List availableResolutions) + { + CameraResolution r = null; + + var dg = CameraResolutionSelector; + + if (dg != null) + r = dg(availableResolutions); + + return r; + } + } +} diff --git a/Source/ZXing.Net.Mobile.Core/Performance.cs b/ZXing.Net.Mobile/Performance.shared.cs similarity index 58% rename from Source/ZXing.Net.Mobile.Core/Performance.cs rename to ZXing.Net.Mobile/Performance.shared.cs index 2cefdbdd4..b738644c0 100644 --- a/Source/ZXing.Net.Mobile.Core/Performance.cs +++ b/ZXing.Net.Mobile/Performance.shared.cs @@ -10,41 +10,40 @@ public class PerformanceCounter public static string Start() { - var guid = Guid.NewGuid ().ToString (); + var guid = Guid.NewGuid().ToString(); - var sw = new Stopwatch (); + var sw = new Stopwatch(); - counters.Add (guid, sw); + counters.Add(guid, sw); - sw.Start (); + sw.Start(); return guid; } public static TimeSpan Stop(string guid) { - if (!counters.ContainsKey (guid)) + if (!counters.ContainsKey(guid)) return TimeSpan.Zero; - var sw = counters [guid]; + var sw = counters[guid]; - sw.Stop (); + sw.Stop(); - counters.Remove (guid); + counters.Remove(guid); return sw.Elapsed; } public static void Stop(string guid, string msg) { - var elapsed = Stop (guid); + var elapsed = Stop(guid); - if (!msg.Contains ("{0}")) + if (!msg.Contains("{0}")) msg += " {0}"; if (Debugger.IsAttached) - System.Diagnostics.Debug.WriteLine (msg, elapsed.TotalMilliseconds); + System.Diagnostics.Debug.WriteLine(msg, elapsed.TotalMilliseconds); } } - } \ No newline at end of file diff --git a/Source/ZXing.Net.Mobile.Android/Resources/layout/zxingscanneractivitylayout.axml b/ZXing.Net.Mobile/Resources/layout/zxingscanneractivitylayout.axml similarity index 100% rename from Source/ZXing.Net.Mobile.Android/Resources/layout/zxingscanneractivitylayout.axml rename to ZXing.Net.Mobile/Resources/layout/zxingscanneractivitylayout.axml diff --git a/Source/ZXing.Net.Mobile.Android/Resources/layout/zxingscannerfragmentlayout.axml b/ZXing.Net.Mobile/Resources/layout/zxingscannerfragmentlayout.axml similarity index 100% rename from Source/ZXing.Net.Mobile.Android/Resources/layout/zxingscannerfragmentlayout.axml rename to ZXing.Net.Mobile/Resources/layout/zxingscannerfragmentlayout.axml diff --git a/Source/ZXing.Net.Mobile.WindowsUniversal/ScanPage.xaml b/ZXing.Net.Mobile/ScanPage.xaml similarity index 65% rename from Source/ZXing.Net.Mobile.WindowsUniversal/ScanPage.xaml rename to ZXing.Net.Mobile/ScanPage.xaml index 1911fb07d..cb05436cb 100644 --- a/Source/ZXing.Net.Mobile.WindowsUniversal/ScanPage.xaml +++ b/ZXing.Net.Mobile/ScanPage.xaml @@ -7,9 +7,9 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> - - - - - + + + + + diff --git a/ZXing.Net.Mobile/ScanPage.xaml.cs b/ZXing.Net.Mobile/ScanPage.xaml.cs new file mode 100644 index 000000000..f9f17310d --- /dev/null +++ b/ZXing.Net.Mobile/ScanPage.xaml.cs @@ -0,0 +1,177 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using System.Threading.Tasks; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; +using ZXing.Mobile; + +// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238 + +namespace ZXing.Mobile +{ + /// + /// An empty page that can be used on its own or navigated to within a Frame. + /// + public sealed partial class ScanPage : Page, IMobileBarcodeScanner + { + ScanPageNavigationParameters Parameters { get; set; } + + public ScanPage() + { + InitializeComponent(); + } + + protected override void OnNavigatedTo(NavigationEventArgs e) + { + base.OnNavigatedTo(e); + + // If no parameters were passed, we navigated here for some other reason + // so let's ignore it + if (e.Parameter == null) + return; + + Parameters = e.Parameter as ScanPageNavigationParameters; + scannerControl.OnCameraInitialized += ScannerControl_OnCameraInitialized; + scannerControl.OnScannerError += ScannerControl_OnScannerError; + + if (Parameters != null) + Parameters.Scanner.ScanPage = this; + + scannerControl.TopText = Parameters?.Scanner?.TopText ?? ""; + scannerControl.BottomText = Parameters?.Scanner?.BottomText ?? ""; + + scannerControl.CustomOverlay = Parameters?.Scanner?.CustomOverlay; + scannerControl.UseCustomOverlay = Parameters?.Scanner?.UseCustomOverlay ?? false; + + scannerControl.ScanningOptions = Parameters?.Options ?? new MobileBarcodeScanningOptions(); + scannerControl.ContinuousScanning = Parameters?.ContinuousScanning ?? false; + + scannerControl.StartScanning(Parameters?.ResultHandler, Parameters?.Options); + } + + void ScannerControl_OnCameraInitialized() + => Parameters.CameraInitialized?.Invoke(); + + void ScannerControl_OnScannerError(IEnumerable errors) + => Parameters.CameraError?.Invoke(errors); + + protected override async void OnNavigatingFrom(NavigatingCancelEventArgs e) + { + try + { + MobileBarcodeScanner.Log("OnNavigatingFrom, stopping camera..."); + await scannerControl.StopScanningAsync(); + } + catch (Exception ex) + { + MobileBarcodeScanner.Log("OnNavigatingFrom Error: {0}", ex); + } + + base.OnNavigatingFrom(e); + } + + #region IMobileBarcodeScanner Implementation + public bool UseCustomOverlay + => scannerControl.UseCustomOverlay; + + public string TopText + { + get => scannerControl.TopText; + set => scannerControl.TopText = value; + } + + public string BottomText + { + get => scannerControl.BottomText; + set => scannerControl.BottomText = value; + } + + public string CancelButtonText + { + get => string.Empty; + set { } + } + + public string FlashButtonText + { + get => string.Empty; + set { } + } + + public string CameraUnsupportedMessage + { + get => string.Empty; + set { } + } + + public bool IsTorchOn + => scannerControl.IsTorchOn; + + public Task Scan(MobileBarcodeScanningOptions options) + { + var tcsResult = new TaskCompletionSource(); + + scannerControl.ContinuousScanning = false; + scannerControl.StartScanning(r => + { + scannerControl.StopScanning(); + + tcsResult.SetResult(r); + }, options ?? Parameters?.Options); + + return tcsResult.Task; + } + + public Task Scan() + => Scan(new MobileBarcodeScanningOptions()); + + public void ScanContinuously(MobileBarcodeScanningOptions options, Action scanHandler) + { + scannerControl.ContinuousScanning = true; + scannerControl.StartScanning(scanHandler, options ?? Parameters?.Options); + } + + public void ScanContinuously(Action scanHandler) + => ScanContinuously(new MobileBarcodeScanningOptions(), scanHandler); + + public void Cancel() + => scannerControl?.Cancel(); + + public void Torch(bool on) + => scannerControl?.Torch(on); + + public void AutoFocus() + => scannerControl?.AutoFocus(); + + public void ToggleTorch() + => scannerControl?.ToggleTorch(); + + public void PauseAnalysis() + => scannerControl?.PauseAnalysis(); + + public void ResumeAnalysis() + => scannerControl?.ResumeAnalysis(); + #endregion + } + + public class ScanPageNavigationParameters + { + public MobileBarcodeScanner Scanner { get; set; } + public bool ContinuousScanning { get; set; } + public MobileBarcodeScanningOptions Options { get; set; } + public Action ResultHandler { get; set; } + + public Action CameraInitialized { get; set; } + public Action> CameraError { get; set; } + } +} diff --git a/ZXing.Net.Mobile/Tizen/BarcodeWriter.tizen.cs b/ZXing.Net.Mobile/Tizen/BarcodeWriter.tizen.cs new file mode 100644 index 000000000..29535396f --- /dev/null +++ b/ZXing.Net.Mobile/Tizen/BarcodeWriter.tizen.cs @@ -0,0 +1,12 @@ +using ElmSharp; +using ZXing.Common; +using ZXing.Rendering; + +namespace ZXing.Mobile +{ + public class BarcodeWriter : BarcodeWriter, IBarcodeWriter + { + public BarcodeWriter(EvasObject nativeParent) + => Renderer = new BitmapRenderer(nativeParent); + } +} diff --git a/ZXing.Net.Mobile/Tizen/BitmapRenderer.tizen.cs b/ZXing.Net.Mobile/Tizen/BitmapRenderer.tizen.cs new file mode 100644 index 000000000..93ea2c303 --- /dev/null +++ b/ZXing.Net.Mobile/Tizen/BitmapRenderer.tizen.cs @@ -0,0 +1,75 @@ +using ElmSharp; +using Tizen.Multimedia.Vision; +using ZXing.Common; +using ZXing.Rendering; + +namespace ZXing.Mobile +{ + class BitmapRenderer : IBarcodeRenderer + { + readonly EvasObject nativeParent; + + public BitmapRenderer(EvasObject nativeParent) : base() + => this.nativeParent = nativeParent; + + public EvasImage Render(BitMatrix matrix, BarcodeFormat format, string content) + => Render(matrix, format, content, new EncodingOptions()); + + public EvasImage Render(BitMatrix matrix, BarcodeFormat format, string content, EncodingOptions options) + { + var type = BarcodeType.Code128; + switch (format) + { + case BarcodeFormat.CODE_128: + type = BarcodeType.Code128; + break; + case BarcodeFormat.CODE_39: + type = BarcodeType.Code39; + break; + case BarcodeFormat.EAN_13: + type = BarcodeType.Ean13; + break; + case BarcodeFormat.EAN_8: + type = BarcodeType.Ean8; + break; + case BarcodeFormat.ITF: + type = BarcodeType.I25; + break; + case BarcodeFormat.QR_CODE: + type = BarcodeType.QR; + break; + case BarcodeFormat.UPC_A: + type = BarcodeType.UpcA; + break; + case BarcodeFormat.UPC_E: + type = BarcodeType.UpcE; + break; + } + + var path = Tizen.Applications.Application.Current.DirectoryInfo.Cache + "temporary_barcode"; + var barcodeImageConfiguration = new BarcodeImageConfiguration(options.Width, options.Height, path, BarcodeImageFormat.Png); + path += ".png"; + + if (type == BarcodeType.QR) + { + var qrConfig = new QrConfiguration(QrMode.Utf8, ErrorCorrectionLevel.Medium, 10); + BarcodeGenerator.GenerateImage(content, qrConfig, barcodeImageConfiguration); + } + else + { + BarcodeGenerator.GenerateImage(content, BarcodeType.Code128, barcodeImageConfiguration); + } + + var evasImage = new EvasImage(nativeParent) + { + AlignmentX = 0.5, + AlignmentY = 0.5, + MinimumWidth = options.Width, + MinimumHeight = options.Height, + File = path, + IsFilled = true, + }; + return evasImage; + } + } +} diff --git a/ZXing.Net.Mobile/Tizen/MobileBarcodeScanner.tizen.cs b/ZXing.Net.Mobile/Tizen/MobileBarcodeScanner.tizen.cs new file mode 100644 index 000000000..aa107f07f --- /dev/null +++ b/ZXing.Net.Mobile/Tizen/MobileBarcodeScanner.tizen.cs @@ -0,0 +1,83 @@ +using ElmSharp; +using System; +using System.Threading; +using System.Threading.Tasks; + +namespace ZXing.Mobile +{ + public partial class MobileBarcodeScanner : MobileBarcodeScannerBase + { + readonly ZxingScannerWindow zxingScannerWindow; + + public Container CustomOverlay { set; get; } + + public Window MainWindow { get; internal set; } + + public MobileBarcodeScanner() : base() + { + zxingScannerWindow = new ZxingScannerWindow(); + MainWindow = zxingScannerWindow; + } + + bool PlatformIsTorchOn => zxingScannerWindow.IsTorchOn; + + void PlatformAutoFocus() + => zxingScannerWindow?.AutoFocus(); + + void PlatformCancel() + => zxingScannerWindow.Unrealize(); + + void PlatformPauseAnalysis() + => zxingScannerWindow.PauseAnalysis(); + + void PlatformResumeAnalysis() + => zxingScannerWindow.ResumeAnalysis(); + + Task PlatformScan(MobileBarcodeScanningOptions options) + { + var task = Task.Factory.StartNew(() => + { + var waitScanResetEvent = new ManualResetEvent(false); + Result result = null; + + zxingScannerWindow.ScanningOptions = options; + zxingScannerWindow.ScanContinuously = false; + zxingScannerWindow.UseCustomOverlayView = UseCustomOverlay; + zxingScannerWindow.CustomOverlayView = CustomOverlay; + zxingScannerWindow.TopText = TopText; + zxingScannerWindow.BottomText = BottomText; + + zxingScannerWindow.ScanCompletedHandler = (Result r) => + { + result = r; + waitScanResetEvent.Set(); + }; + zxingScannerWindow.Show(); + waitScanResetEvent.WaitOne(); + return result; + }); + return task; + } + + void PlatformScanContinuously(MobileBarcodeScanningOptions options, Action scanHandler) + { + zxingScannerWindow.UseCustomOverlayView = UseCustomOverlay; + zxingScannerWindow.CustomOverlayView = CustomOverlay; + zxingScannerWindow.ScanningOptions = options; + zxingScannerWindow.ScanContinuously = true; + zxingScannerWindow.TopText = TopText; + zxingScannerWindow.BottomText = BottomText; + zxingScannerWindow.ScanCompletedHandler = (Result r) => + { + scanHandler?.Invoke(r); + }; + zxingScannerWindow.Show(); + } + + void PlatformToggleTorch() + => zxingScannerWindow?.ToggleTorch(); + + void PlatformTorch(bool on) + => zxingScannerWindow?.Torch(on); + } +} diff --git a/ZXing.Net.Mobile/Tizen/TizenBarcodeAnalyzer.tizen.cs b/ZXing.Net.Mobile/Tizen/TizenBarcodeAnalyzer.tizen.cs new file mode 100644 index 000000000..a8a2eaf75 --- /dev/null +++ b/ZXing.Net.Mobile/Tizen/TizenBarcodeAnalyzer.tizen.cs @@ -0,0 +1,80 @@ +using System; +using System.Linq; +using System.Threading.Tasks; +using Tizen.Multimedia; +using Tizen.Multimedia.Vision; + +namespace ZXing.Mobile +{ + class TizenBarcodeAnalyzer + { + public static Task AnalyzeBarcodeAsync(StillImage image) + { + var source = new MediaVisionSource(image.Data, (uint)image.Resolution.Width, (uint)image.Resolution.Height, ColorSpace.NV12); + return AnalyzeBarcodeAsync(source); + } + public static async Task AnalyzeBarcodeAsync(MediaVisionSource source) + { + var point = new Point(0, 0); + var size = new Size((int)source.Width, (int)source.Height); + var roi = new Rectangle(point, size); + try + { + var barcodeLists = await BarcodeDetector.DetectAsync(source, roi); + if (barcodeLists.Count() == 0) + return null; + + var resultBarcode = barcodeLists.FirstOrDefault(); + var text = resultBarcode.Message; + var rawbytes = new byte[source.Buffer.Length]; + source.Buffer.CopyTo(rawbytes, 0, source.Buffer.Length); + + ResultPoint[] resultPoint = + { + new ResultPoint(resultBarcode.Region.Points.ElementAt(0).X, resultBarcode.Region.Points.ElementAt(0).Y), + new ResultPoint(resultBarcode.Region.Points.ElementAt(1).X, resultBarcode.Region.Points.ElementAt(1).Y), + new ResultPoint(resultBarcode.Region.Points.ElementAt(2).X, resultBarcode.Region.Points.ElementAt(2).Y), + new ResultPoint(resultBarcode.Region.Points.ElementAt(3).X, resultBarcode.Region.Points.ElementAt(3).Y) + }; + + BarcodeFormat format; + switch (resultBarcode.Type) + { + case BarcodeType.Code128: + format = BarcodeFormat.CODE_128; + break; + case BarcodeType.Code39: + format = BarcodeFormat.CODE_39; + break; + case BarcodeType.Ean13: + format = BarcodeFormat.EAN_13; + break; + case BarcodeType.Ean8: + format = BarcodeFormat.EAN_8; + break; + case BarcodeType.I25: + format = BarcodeFormat.ITF; + break; + case BarcodeType.QR: + format = BarcodeFormat.QR_CODE; + break; + case BarcodeType.UpcA: + format = BarcodeFormat.UPC_A; + break; + case BarcodeType.UpcE: + format = BarcodeFormat.UPC_E; + break; + default: + format = BarcodeFormat.All_1D; + break; + } + + return new Result(text, rawbytes, resultPoint, format); + } + catch (Exception) + { + return null; + } + } + } +} diff --git a/ZXing.Net.Mobile/Tizen/ZXingDefaultOverlay.tizen.cs b/ZXing.Net.Mobile/Tizen/ZXingDefaultOverlay.tizen.cs new file mode 100644 index 000000000..16042f464 --- /dev/null +++ b/ZXing.Net.Mobile/Tizen/ZXingDefaultOverlay.tizen.cs @@ -0,0 +1,91 @@ +using ElmSharp; + +namespace ZXing.Mobile +{ + class ZXingDefaultOverlay : Box + { + Label topLabel; + Label bottomLabel; + + public ZXingDefaultOverlay(EvasObject parent) : base(parent) + { + AlignmentX = -1; + AlignmentY = -1; + WeightX = 1; + WeightY = 1; + + InitView(); + + BackgroundColor = Color.Transparent; + } + + void InitView() + { + topLabel = new Label(this) + { + Text = "", + TextStyle = "DEFAULT = 'font_size=30 align=center valign=bottom'", + AlignmentX = -1.0, + AlignmentY = -1.0, + WeightX = 1.0, + WeightY = 0.2, + BackgroundColor = Color.FromRgba(256, 256, 256, 200), + }; + topLabel.Show(); + PackEnd(topLabel); + + var blankAbove = new ElmSharp.Rectangle(this) + { + AlignmentX = -1.0, + AlignmentY = -1.0, + WeightX = 1.0, + WeightY = 0.3, + Color = Color.Transparent, + }; + blankAbove.Show(); + PackEnd(blankAbove); + + var middleBar = new ElmSharp.Rectangle(this) + { + AlignmentX = -1.0, + AlignmentY = -1.0, + WeightX = 1.0, + WeightY = 0.001, + Color = Color.Red, + }; + middleBar.Show(); + PackEnd(middleBar); + + var blankBelow = new ElmSharp.Rectangle(this) + { + AlignmentX = -1.0, + AlignmentY = -1.0, + WeightX = 1.0, + WeightY = 0.3, + Color = Color.Transparent, + }; + blankBelow.Show(); + PackEnd(blankBelow); + + bottomLabel = new Label(this) + { + Text = "", + TextStyle = "DEFAULT = 'font_size=30 align=center valign=bottom'", + AlignmentX = -1.0, + AlignmentY = -1.0, + WeightX = 1.0, + WeightY = 0.2, + BackgroundColor = Color.FromRgba(256, 256, 256, 200), + }; + + bottomLabel.Show(); + PackEnd(bottomLabel); + } + + public void SetText(string top, string bottom) + { + topLabel.Text = top; + bottomLabel.Text = bottom; + } + } +} diff --git a/ZXing.Net.Mobile/Tizen/ZXingMediaView.tizen.cs b/ZXing.Net.Mobile/Tizen/ZXingMediaView.tizen.cs new file mode 100644 index 000000000..f60c2d21b --- /dev/null +++ b/ZXing.Net.Mobile/Tizen/ZXingMediaView.tizen.cs @@ -0,0 +1,73 @@ +using ElmSharp; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Tizen.Multimedia; + +namespace ZXing.Mobile +{ + public class ZXingMediaView : MediaView, IScannerView + { + ZXingScannerCamera zxingScannerCamera; + EvasObjectEvent showCallback; + public ZXingMediaView(EvasObject parent) : base(parent) + { + AlignmentX = -1; + AlignmentY = -1; + WeightX = 1; + WeightY = 1; + zxingScannerCamera = new ZXingScannerCamera(CameraDevice.Rear, this); + + showCallback = new EvasObjectEvent(this, EvasObjectCallbackType.Show); + showCallback.On += (s, e) => + { + if (zxingScannerCamera == null) + zxingScannerCamera = new ZXingScannerCamera(CameraDevice.Rear, this); + }; + + } + + internal MobileBarcodeScanningOptions ScanningOptions + { + get => zxingScannerCamera?.ScanningOptions ?? new MobileBarcodeScanningOptions(); + set => zxingScannerCamera.ScanningOptions = value; + } + + public bool IsTorchOn => zxingScannerCamera.IsTorchOn; + + public bool IsAnalyzing { get; private set; } + + public bool HasTorch => zxingScannerCamera.HasTorch; + + public void AutoFocus() + => zxingScannerCamera?.AutoFocus(); + + public void AutoFocus(int x, int y) + => zxingScannerCamera?.AutoFocus(x, y); + + public void PauseAnalysis() + => zxingScannerCamera?.PauseAnalysis(); + + public void ResumeAnalysis() + => zxingScannerCamera?.ResumeAnalysis(); + + public void StartScanning(Action scanResultHandler, MobileBarcodeScanningOptions options = null) + { + IsAnalyzing = true; + Show(); + zxingScannerCamera.ScanningOptions = options; + zxingScannerCamera?.Scan(scanResultHandler); + IsAnalyzing = false; + } + + public void StopScanning() + => zxingScannerCamera?.StopScanning(); + + public void ToggleTorch() + => zxingScannerCamera?.ToggleTorch(); + + public void Torch(bool on) + => zxingScannerCamera?.Torch(on); + } +} \ No newline at end of file diff --git a/ZXing.Net.Mobile/Tizen/ZXingScannerCamera.tizen.cs b/ZXing.Net.Mobile/Tizen/ZXingScannerCamera.tizen.cs new file mode 100644 index 000000000..6a637ebe1 --- /dev/null +++ b/ZXing.Net.Mobile/Tizen/ZXingScannerCamera.tizen.cs @@ -0,0 +1,135 @@ +using System; +using System.Linq; +using System.Threading.Tasks; +using Tizen.Multimedia; + +namespace ZXing.Mobile +{ + class ZXingScannerCamera : Camera + { + Action resultHandler; + bool isDisposed; + bool torchFlag; + CameraFlashMode torchMode; + + public MobileBarcodeScanningOptions ScanningOptions { get; set; } + + public bool IsTorchOn + { + get => Settings.FlashMode == CameraFlashMode.On; + set => Settings.FlashMode = value ? CameraFlashMode.On : CameraFlashMode.Off; + } + + public bool HasTorch + => Capabilities.SupportedFlashModes.ToList().Count > 0; + + public ZXingScannerCamera(CameraDevice device, MediaView mediaView) : base(device) + { + Display = new Display(mediaView); + Settings.ImageQuality = 100; + Settings.PreviewPixelFormat = Capabilities.SupportedPreviewPixelFormats.FirstOrDefault(); + Settings.PreviewResolution = Settings.RecommendedPreviewResolution; + Settings.CapturePixelFormat = CameraPixelFormat.Nv12; + Settings.CaptureResolution = Capabilities.SupportedCaptureResolutions.FirstOrDefault(); + DisplaySettings.Rotation = Rotation.Rotate270; + + FocusStateChanged += FocusStateChangedHandler; + Capturing += CapturingHandler; + CaptureCompleted += CaptureCompleteHandler; + StateChanged += StateChangeHandler; + + isDisposed = false; + + if (State != CameraState.Preview) + StartPreview(); + } + + void StateChangeHandler(object sender, CameraStateChangedEventArgs e) + { + if (!isDisposed && State == CameraState.Preview) + { + if (torchFlag) + Settings.FlashMode = torchMode; + torchFlag = false; + } + } + + async void CaptureCompleteHandler(object sender, EventArgs e) + { + if (!isDisposed) + { + if (ScanningOptions?.DelayBetweenContinuousScans > 0) + await Task.Delay(ScanningOptions.DelayBetweenContinuousScans); + + StartPreview(); + } + } + + async void CapturingHandler(object sender, CameraCapturingEventArgs e) + { + var result = await TizenBarcodeAnalyzer.AnalyzeBarcodeAsync(e.MainImage); + + if (result != null) + resultHandler?.Invoke(result); + } + + void FocusStateChangedHandler(object sender, CameraFocusStateChangedEventArgs e) + { + if (!isDisposed && e.State == CameraFocusState.Ongoing && State == CameraState.Preview) + StartCapture(); + } + + public void Scan(Action scanResultHandler) + { + resultHandler = scanResultHandler; + StartFocusing(true); + } + + public void ResumeAnalysis() + => StartFocusing(true); + + public void PauseAnalysis() + => StopFocusing(); + + public void StopScanning() + { + FocusStateChanged -= FocusStateChangedHandler; + Capturing -= CapturingHandler; + CaptureCompleted -= CaptureCompleteHandler; + StateChanged -= StateChangeHandler; + isDisposed = true; + Dispose(); + } + + public void ToggleTorch() + { + torchMode = (Settings.FlashMode == CameraFlashMode.Off ? CameraFlashMode.On : CameraFlashMode.Off); + if (State == CameraState.Preview) + Settings.FlashMode = torchMode; + else + torchFlag = true; + } + + public void Torch(bool on) + { + torchMode = on ? CameraFlashMode.On : CameraFlashMode.Off; + if (State == CameraState.Preview) + Settings.FlashMode = torchMode; + else + torchFlag = true; + + } + + public void AutoFocus() + { + Settings.ClearFocusArea(); + Settings.AutoFocusMode = CameraAutoFocusMode.Normal; + } + + public void AutoFocus(int x, int y) + { + AutoFocus(); + Settings.SetAutoFocusArea(x, y); + } + } +} diff --git a/ZXing.Net.Mobile/Tizen/ZXingScannerWindow.tizen.cs b/ZXing.Net.Mobile/Tizen/ZXingScannerWindow.tizen.cs new file mode 100644 index 000000000..a49fee57f --- /dev/null +++ b/ZXing.Net.Mobile/Tizen/ZXingScannerWindow.tizen.cs @@ -0,0 +1,116 @@ +using ElmSharp; +using System; + +namespace ZXing.Mobile +{ + class ZxingScannerWindow : Window + { + public Action ScanCompletedHandler { get; set; } + public bool ScanContinuously { get; set; } + + public MobileBarcodeScanningOptions ScanningOptions { + get => zxingMediaView?.ScanningOptions ?? new MobileBarcodeScanningOptions(); + set => zxingMediaView.ScanningOptions = value; + } + + public bool IsTorchOn => zxingMediaView.IsTorchOn; + + public bool UseCustomOverlayView { get; set; } + public Container CustomOverlayView { get; set; } + public string TopText { get; internal set; } + public string BottomText { get; internal set; } + + ZXingMediaView zxingMediaView; + Background overlayBackground; + + public ZxingScannerWindow() : base("ZXingScannerWindow") + { + TopText = ""; + BottomText = ""; + AvailableRotations = DisplayRotation.Degree_0 | DisplayRotation.Degree_180 | DisplayRotation.Degree_270 | DisplayRotation.Degree_90; + BackButtonPressed += (s, ex) => + { + zxingMediaView?.StopScanning(); + Unrealize(); + }; + InitView(); + var showCallback = new EvasObjectEvent(this, EvasObjectCallbackType.Show); + showCallback.On += (s, e) => + { + StartScanning(); + }; + } + + void InitView() + { + var mBackground = new Background(this); + mBackground.Show(); + + var mConformant = new Conformant(this); + mConformant.SetContent(mBackground); + mConformant.Show(); + mBackground.Show(); + + overlayBackground = new Background(this) + { + Color = Color.Transparent, + BackgroundColor = Color.Transparent, + }; + overlayBackground.Show(); + + var oConformant = new Conformant(this); + oConformant.Show(); + oConformant.SetContent(overlayBackground); + + zxingMediaView = new ZXingMediaView(this) + { + AlignmentX = -1, + AlignmentY = -1, + WeightX = 1, + WeightY = 1, + }; + zxingMediaView.Show(); + mBackground.SetContent(zxingMediaView); + } + + public void StartScanning() + { + if (UseCustomOverlayView) + { + overlayBackground.SetContent(CustomOverlayView); + CustomOverlayView.Show(); + } + else + { + var defaultOverlay = new ZXingDefaultOverlay(this); + defaultOverlay.SetText(TopText, BottomText); + overlayBackground.SetContent(defaultOverlay); + defaultOverlay.Show(); + } + zxingMediaView.StartScanning(result => + { + ScanCompletedHandler?.Invoke(result); + if (!ScanContinuously) + { + zxingMediaView.StopScanning(); + Unrealize(); + } + }, ScanningOptions); + } + + public void AutoFocus() + => zxingMediaView?.AutoFocus(); + + public void PauseAnalysis() + => zxingMediaView?.PauseAnalysis(); + + public void ResumeAnalysis() + => zxingMediaView?.ResumeAnalysis(); + + public void Torch(bool on) + => zxingMediaView?.Torch(on); + + public void ToggleTorch() + => zxingMediaView?.ToggleTorch(); + } +} \ No newline at end of file diff --git a/ZXing.Net.Mobile/UWP/BarcodeWriter.uwp.cs b/ZXing.Net.Mobile/UWP/BarcodeWriter.uwp.cs new file mode 100644 index 000000000..a113a9cd4 --- /dev/null +++ b/ZXing.Net.Mobile/UWP/BarcodeWriter.uwp.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Windows.UI.Xaml.Media.Imaging; + +namespace ZXing.Mobile +{ + /// + /// A smart class to encode some content to a barcode image + /// + public class BarcodeWriter : BarcodeWriter, IBarcodeWriter + { + /// + /// Initializes a new instance of the class. + /// + public BarcodeWriter() + { + Renderer = new WriteableBitmapRenderer(); + } + } +} diff --git a/ZXing.Net.Mobile/UWP/MobileBarcodeScanner.uwp.cs b/ZXing.Net.Mobile/UWP/MobileBarcodeScanner.uwp.cs new file mode 100644 index 000000000..ccc0a3d7d --- /dev/null +++ b/ZXing.Net.Mobile/UWP/MobileBarcodeScanner.uwp.cs @@ -0,0 +1,123 @@ +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Windows.UI.Core; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; + +namespace ZXing.Mobile +{ + public partial class MobileBarcodeScanner : MobileBarcodeScannerBase + { + public MobileBarcodeScanner() : base() + { + } + + public MobileBarcodeScanner(CoreDispatcher dispatcher) : base() + { + Dispatcher = dispatcher; + } + + internal ScanPage ScanPage { get; set; } + + public CoreDispatcher Dispatcher { get; set; } + + public Frame RootFrame { get; set; } + + async void PlatformScanContinuously(MobileBarcodeScanningOptions options, Action scanHandler) + { + //Navigate: /ZxingSharp.WindowsPhone;component/Scan.xaml + var rootFrame = RootFrame ?? Window.Current.Content as Frame ?? ((FrameworkElement)Window.Current.Content).GetFirstChildOfType(); + var dispatcher = Dispatcher ?? Window.Current.Dispatcher; + + await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => + { + rootFrame.Navigate(typeof(ScanPage), new ScanPageNavigationParameters + { + Options = options, + ResultHandler = scanHandler, + Scanner = this, + ContinuousScanning = true + }); + }); + } + + async Task PlatformScan(MobileBarcodeScanningOptions options) + { + var rootFrame = RootFrame ?? Window.Current.Content as Frame ?? ((FrameworkElement)Window.Current.Content).GetFirstChildOfType(); + var dispatcher = Dispatcher ?? Window.Current.Dispatcher; + + var tcsScanResult = new TaskCompletionSource(); + + await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => + { + var pageOptions = new ScanPageNavigationParameters + { + Options = options, + ResultHandler = r => + { + tcsScanResult.SetResult(r); + }, + Scanner = this, + ContinuousScanning = false, + CameraInitialized = () => { OnCameraInitialized?.Invoke(); }, + CameraError = (errors) => { OnCameraError?.Invoke(errors); } + }; + rootFrame.Navigate(typeof(ScanPage), pageOptions); + }); + + var result = await tcsScanResult.Task; + + await dispatcher.RunAsync(CoreDispatcherPriority.High, () => + { + if (rootFrame.CanGoBack) + rootFrame.GoBack(); + }); + + return result; + } + + public event ScannerOpened OnCameraInitialized; + public delegate void ScannerOpened(); + + public event ScannerError OnCameraError; + public delegate void ScannerError(IEnumerable errors); + + async void PlatformCancel() + { + var rootFrame = RootFrame ?? Window.Current.Content as Frame ?? ((FrameworkElement)Window.Current.Content).GetFirstChildOfType(); + var dispatcher = Dispatcher ?? Window.Current.Dispatcher; + + ScanPage?.Cancel(); + + await dispatcher.RunAsync(CoreDispatcherPriority.High, () => + { + if (rootFrame.CanGoBack) + rootFrame.GoBack(); + }); + } + + void PlatformTorch(bool on) + => ScanPage?.Torch(on); + + void PlatformToggleTorch() + => ScanPage?.ToggleTorch(); + + bool PlatformIsTorchOn + => ScanPage?.IsTorchOn ?? false; + + void PlatformAutoFocus() + => ScanPage?.AutoFocus(); + + void PlatformPauseAnalysis() + => ScanPage?.PauseAnalysis(); + + void PlatformResumeAnalysis() + => ScanPage?.ResumeAnalysis(); + + public UIElement CustomOverlay { get; set; } + + internal static void Log(string message, params object[] args) + => System.Diagnostics.Debug.WriteLine(message, args); + } +} diff --git a/ZXing.Net.Mobile/UWP/SoftwareBitmapLuminanceSource.uwp.cs b/ZXing.Net.Mobile/UWP/SoftwareBitmapLuminanceSource.uwp.cs new file mode 100644 index 000000000..98df41094 --- /dev/null +++ b/ZXing.Net.Mobile/UWP/SoftwareBitmapLuminanceSource.uwp.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using Windows.Graphics.Imaging; + +namespace ZXing.Mobile +{ + [ComImport] + [Guid("5b0d3235-4dba-4d44-865e-8f1d0e4fd04d")] + [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + unsafe interface IMemoryBufferByteAccess + { + void GetBuffer(out byte* buffer, out uint capacity); + } + + public class SoftwareBitmapLuminanceSource : BaseLuminanceSource + { + public SoftwareBitmapLuminanceSource(SoftwareBitmap softwareBitmap) : base(softwareBitmap.PixelWidth, softwareBitmap.PixelHeight) + => CalculateLuminance(softwareBitmap); + + protected SoftwareBitmapLuminanceSource(int width, int height) : base(width, height) + { + } + + protected SoftwareBitmapLuminanceSource(byte[] luminanceArray, int width, int height) : base(luminanceArray, width, height) + { + } + + protected override LuminanceSource CreateLuminanceSource(byte[] newLuminances, int width, int height) + => new SoftwareBitmapLuminanceSource(width, height) { luminances = newLuminances }; + + unsafe void CalculateLuminance(SoftwareBitmap bitmap) + { + // Effect is hard-coded to operate on BGRA8 format only + if (bitmap.BitmapPixelFormat == BitmapPixelFormat.Bgra8) + { + // In BGRA8 format, each pixel is defined by 4 bytes + const int BYTES_PER_PIXEL = 4; + + using (var buffer = bitmap.LockBuffer(BitmapBufferAccessMode.Read)) + using (var reference = buffer.CreateReference()) + { + if (reference is IMemoryBufferByteAccess) + { + try + { + // Get a pointer to the pixel buffer + byte* data; + uint capacity; + ((IMemoryBufferByteAccess)reference).GetBuffer(out data, out capacity); + + // Get information about the BitmapBuffer + var desc = buffer.GetPlaneDescription(0); + var luminanceIndex = 0; + + // Iterate over all pixels + for (uint row = 0; row < desc.Height; row++) + { + for (uint col = 0; col < desc.Width; col++) + { + // Index of the current pixel in the buffer (defined by the next 4 bytes, BGRA8) + var currPixel = desc.StartIndex + desc.Stride * row + BYTES_PER_PIXEL * col; + + // Read the current pixel information into b,g,r channels (leave out alpha channel) + var b = data[currPixel + 0]; // Blue + var g = data[currPixel + 1]; // Green + var r = data[currPixel + 2]; // Red + + var luminance = (byte)((RChannelWeight * r + GChannelWeight * g + BChannelWeight * b) >> ChannelWeight); + var alpha = data[currPixel + 3]; + luminance = (byte)(((luminance * alpha) >> 8) + (255 * (255 - alpha) >> 8)); + luminances[luminanceIndex] = luminance; + luminanceIndex++; + } + } + } + catch (Exception ex) + { + System.Diagnostics.Debug.WriteLine("Luminance Source Failed: {0}", ex); + } + } + } + } + } + } +} diff --git a/ZXing.Net.Mobile/UWP/VisualTreeHelperExt.uwp.cs b/ZXing.Net.Mobile/UWP/VisualTreeHelperExt.uwp.cs new file mode 100644 index 000000000..a4e57cd54 --- /dev/null +++ b/ZXing.Net.Mobile/UWP/VisualTreeHelperExt.uwp.cs @@ -0,0 +1,35 @@ +using System.Collections.Generic; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Media; + +namespace ZXing.Mobile +{ + public static class VisualTreeHelperExt + { + // The method traverses the visual tree lazily, layer by layer + // and returns the objects of the desired type + public static T GetFirstChildOfType(this DependencyObject start) where T : class + { + var queue = new Queue(); + queue.Enqueue(start); + + while (queue.Count > 0) + { + var item = queue.Dequeue(); + + var realItem = item as T; + if (realItem != null) + { + return realItem; + } + + var count = VisualTreeHelper.GetChildrenCount(item); + for (var i = 0; i < count; i++) + { + queue.Enqueue(VisualTreeHelper.GetChild(item, i)); + } + } + return null; + } + } +} diff --git a/ZXing.Net.Mobile/UWP/WriteableBitmapRenderer.uwp.cs b/ZXing.Net.Mobile/UWP/WriteableBitmapRenderer.uwp.cs new file mode 100644 index 000000000..0b3243e31 --- /dev/null +++ b/ZXing.Net.Mobile/UWP/WriteableBitmapRenderer.uwp.cs @@ -0,0 +1,273 @@ +/* + * Copyright 2012 ZXing.Net authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Windows; +#if NETFX_CORE +using Windows.UI; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Media.Imaging; +#else +using System.Windows.Media; +using System.Windows.Media.Imaging; +#endif + +using ZXing; +using ZXing.Common; +using ZXing.OneD; +using ZXing.Rendering; + +namespace ZXing.Mobile +{ + /// + /// Renders a to a + /// + public class WriteableBitmapRenderer : IBarcodeRenderer + { + /// + /// Gets or sets the foreground color. + /// + /// + /// The foreground color. + /// + public Color Foreground { get; set; } + /// + /// Gets or sets the background color. + /// + /// + /// The background color. + /// + public Color Background { get; set; } + /// + /// Gets or sets the font family. + /// + /// + /// The font family. + /// + public FontFamily FontFamily { get; set; } + /// + /// Gets or sets the size of the font. + /// + /// + /// The size of the font. + /// + public double FontSize { get; set; } + +#if !NETFX_CORE + /// + /// Gets or sets the font stretch. + /// + /// + /// The font stretch. + /// + public FontStretch FontStretch { get; set; } + /// + /// Gets or sets the font style. + /// + /// + /// The font style. + /// + public FontStyle FontStyle { get; set; } + /// + /// Gets or sets the font weight. + /// + /// + /// The font weight. + /// + public FontWeight FontWeight { get; set; } +#endif + + static readonly FontFamily DefaultFontFamily = new FontFamily("Arial"); + + /// + /// Initializes a new instance of the class. + /// + public WriteableBitmapRenderer() + { + Foreground = Colors.Black; + Background = Colors.White; + FontFamily = DefaultFontFamily; + FontSize = 10.0; +#if !NETFX_CORE + FontStretch = FontStretches.Normal; + FontStyle = FontStyles.Normal; + FontWeight = FontWeights.Normal; +#endif + } + + /// + /// Renders the specified matrix. + /// + /// The matrix. + /// The format. + /// The content. + /// + public WriteableBitmap Render(BitMatrix matrix, BarcodeFormat format, string content) + { + return Render(matrix, format, content, null); + } + + /// + /// Renders the specified matrix. + /// + /// The matrix. + /// The format. + /// The content. + /// The options. + /// + virtual public WriteableBitmap Render(BitMatrix matrix, BarcodeFormat format, string content, EncodingOptions options) + { + var width = matrix.Width; + var height = matrix.Height; + var outputContent = (options == null || !options.PureBarcode) && + !String.IsNullOrEmpty(content) && (format == BarcodeFormat.CODE_39 || + format == BarcodeFormat.CODE_128 || + format == BarcodeFormat.EAN_13 || + format == BarcodeFormat.EAN_8 || + format == BarcodeFormat.CODABAR || + format == BarcodeFormat.ITF || + format == BarcodeFormat.UPC_A || + format == BarcodeFormat.MSI || + format == BarcodeFormat.PLESSEY); + var emptyArea = outputContent ? 16 : 0; + var pixelsize = 1; + + if (options != null) + { + if (options.Width > width) + { + width = options.Width; + } + if (options.Height > height) + { + height = options.Height; + } + // calculating the scaling factor + pixelsize = width / matrix.Width; + if (pixelsize > height / matrix.Height) + { + pixelsize = height / matrix.Height; + } + } + +#if NETFX_CORE + var foreground = new byte[] { Foreground.B, Foreground.G, Foreground.R, Foreground.A }; + var background = new byte[] { Background.B, Background.G, Background.R, Background.A }; + var bmp = new WriteableBitmap(width, height); + var length = width * height; + + // Copy data back + using (var stream = System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeBufferExtensions.AsStream(bmp.PixelBuffer)) + { + for (var y = 0; y < matrix.Height - emptyArea; y++) + { + for (var pixelsizeHeight = 0; pixelsizeHeight < pixelsize; pixelsizeHeight++) + { + for (var x = 0; x < matrix.Width; x++) + { + var color = matrix[x, y] ? foreground : background; + for (var pixelsizeWidth = 0; pixelsizeWidth < pixelsize; pixelsizeWidth++) + { + stream.Write(color, 0, 4); + } + } + for (var x = pixelsize * matrix.Width; x < width; x++) + { + stream.Write(background, 0, 4); + } + } + } + for (var y = matrix.Height * pixelsize - emptyArea; y < height; y++) + { + for (var x = 0; x < width; x++) + { + stream.Write(background, 0, 4); + } + } + } + bmp.Invalidate(); +#else + int foreground = Foreground.A << 24 | Foreground.R << 16 | Foreground.G << 8 | Foreground.B; + int background = Background.A << 24 | Background.R << 16 | Background.G << 8 | Background.B; +#if WPF + var bmp = new WriteableBitmap(width, height, 100.0, 100.0, PixelFormats.Bgra32, null); + var pixels = new int[width*height]; +#else + var bmp = new WriteableBitmap(width, height); + var pixels = bmp.Pixels; +#endif + var index = 0; + + for (int y = 0; y < matrix.Height - emptyArea; y++) + { + for (var pixelsizeHeight = 0; pixelsizeHeight < pixelsize; pixelsizeHeight++) + { + for (var x = 0; x < matrix.Width; x++) + { + var color = matrix[x, y] ? foreground : background; + for (var pixelsizeWidth = 0; pixelsizeWidth < pixelsize; pixelsizeWidth++) + { + pixels[index++] = color; + } + } + for (var x = pixelsize * matrix.Width; x < width; x++) + { + pixels[index++] = background; + } + } + } + for (int y = matrix.Height * pixelsize - emptyArea; y < height; y++) + { + for (var x = 0; x < width; x++) + { + pixels[index++] = background; + } + } +#if WPF + bmp.WritePixels(new Int32Rect(0, 0, width, height), pixels, bmp.BackBufferStride, 0); +#else + bmp.Invalidate(); +#endif +#endif + + /* doesn't correctly work at the moment + * renders at the wrong position + if (outputContent) + { + switch (format) + { + case BarcodeFormat.EAN_8: + if (content.Length < 8) + content = OneDimensionalCodeWriter.CalculateChecksumDigitModulo10(content); + content = content.Insert(4, " "); + break; + case BarcodeFormat.EAN_13: + if (content.Length < 13) + content = OneDimensionalCodeWriter.CalculateChecksumDigitModulo10(content); + content = content.Insert(7, " "); + content = content.Insert(1, " "); + break; + } + var txt1 = new TextBlock {Text = content, FontSize = 10, Foreground = new SolidColorBrush(Colors.Black)}; + bmp.Render(txt1, new RotateTransform { Angle = 0, CenterX = width / 2, CenterY = height - 14}); + bmp.Invalidate(); + } + * */ + + return bmp; + } + } +} diff --git a/ZXing.Net.Mobile/ZXing.Net.Mobile.csproj b/ZXing.Net.Mobile/ZXing.Net.Mobile.csproj new file mode 100644 index 000000000..97b06b6d9 --- /dev/null +++ b/ZXing.Net.Mobile/ZXing.Net.Mobile.csproj @@ -0,0 +1,122 @@ + + + netstandard2.0;Xamarin.iOS10;Xamarin.Mac20;MonoAndroid90;MonoAndroid10.0;tizen40 + $(TargetFrameworks);uap10.0.16299; + ZXingNetMobile + ZXing.Net.Mobile + ZXing.Net.Mobile + icon.png + ZXing Barcode Scanning for your Xamarin.iOS, Xamarin.Android and Windows Universal apps! + + ZXing.Net.Mobile Barcode Scanner + + ZXing.Net.Mobile is a C#/.NET library based on the open source Barcode Library: ZXing (Zebra Crossing), using the ZXing.Net Port. It works with Xamarin.iOS, Xamarin.Android, Windows Phone (Silverlight) and Windows Universal. The goal of ZXing.Net.Mobile is to make scanning barcodes as effortless and painless as possible in your own applications. + + See https://github.com/Redth/ZXing.Net.Mobile/releases for release notes. + + $(AssemblyName) ($(TargetFramework)) + 3.0.0.0 + 3.0.0.0 + 3.0.0 + $(Version)$(VersionSuffix) + Redth + Redth + en + © Redth + https://github.com/redth/ZXing.Net.Mobile + See: https://github.com/Redth/ZXing.Net.Mobile/releases + $(DefineConstants); + false + false + MIT + http://github.com/Redth/ZXing.Net.Mobile + portable + Debug;Release + true + + + true + + + + true + + true + + $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb + + + + + + + + + + + + + + + + + + + ScanPage.xaml + + + ZXingScannerControl.xaml + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + PreserveNewest + + + Windows Mobile Extensions for the UWP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ..\ZXing.Net\zxing.dll + + + \ No newline at end of file diff --git a/ZXing.Net.Mobile/ZXingScannerControl.xaml b/ZXing.Net.Mobile/ZXingScannerControl.xaml new file mode 100644 index 000000000..5400e3117 --- /dev/null +++ b/ZXing.Net.Mobile/ZXingScannerControl.xaml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ZXing.Net.Mobile/ZXingScannerControl.xaml.cs b/ZXing.Net.Mobile/ZXingScannerControl.xaml.cs new file mode 100644 index 000000000..42a186863 --- /dev/null +++ b/ZXing.Net.Mobile/ZXingScannerControl.xaml.cs @@ -0,0 +1,779 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using System.Threading; +using System.Threading.Tasks; +using Windows.Devices.Enumeration; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Windows.Graphics.Display; +using Windows.Media; +using Windows.Media.Capture; +using Windows.Media.Devices; +using Windows.Media.MediaProperties; +using Windows.System.Display; +using Windows.UI.Core; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Controls.Primitives; +using Windows.UI.Xaml.Data; +using Windows.UI.Xaml.Input; +using Windows.UI.Xaml.Media; +using Windows.UI.Xaml.Navigation; +using ZXing.Mobile; + +// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236 + +namespace ZXing.Mobile +{ + public sealed partial class ZXingScannerControl : UserControl, IScannerView, IScannerSessionHost, IDisposable + { + public ZXingScannerControl() + { + InitializeComponent(); + + displayOrientation = displayInformation.CurrentOrientation; + displayInformation.OrientationChanged += DisplayInformation_OrientationChanged; + } + + public event ScannerOpened OnCameraInitialized; + public delegate void ScannerOpened(); + + public event ScannerError OnScannerError; + public delegate void ScannerError(IEnumerable errors); + + async void DisplayInformation_OrientationChanged(DisplayInformation sender, object args) + { + //This safeguards against a null reference if the device is rotated *before* the first call to StartScanning + if (mediaCapture == null) return; + + displayOrientation = sender.CurrentOrientation; + var props = mediaCapture.VideoDeviceController.GetMediaStreamProperties(MediaStreamType.VideoPreview); + await SetPreviewRotationAsync(props); + } + + // Receive notifications about rotation of the UI and apply any necessary rotation to the preview stream + readonly DisplayInformation displayInformation = DisplayInformation.GetForCurrentView(); + DisplayOrientations displayOrientation = DisplayOrientations.Portrait; + VideoFrame videoFrame; + + // Information about the camera device. + bool mirroringPreview = false; + bool externalCamera = false; + + // Rotation metadata to apply to the preview stream (MF_MT_VIDEO_ROTATION) + // Reference: http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh868174.aspx + static readonly Guid rotationKey = new Guid("C380465D-2271-428C-9B83-ECEA3B4A85C1"); + + // Prevent the screen from sleeping while the camera is running + readonly DisplayRequest displayRequest = new DisplayRequest(); + + // For listening to media property changes + readonly SystemMediaTransportControls systemMediaControls = SystemMediaTransportControls.GetForCurrentView(); + + + public async void StartScanning(Action scanCallback, MobileBarcodeScanningOptions options = null) + => await StartScanningAsync(scanCallback, options); + + public async void StopScanning() + => await StopScanningAsync(); + + public void PauseAnalysis() + => isAnalyzing = false; + + public void ResumeAnalysis() + => isAnalyzing = true; + + public bool IsAnalyzing + => isAnalyzing; + + public async Task StartScanningAsync(Action scanCallback, MobileBarcodeScanningOptions options = null) + { + if (stopping) + { + var error = "Camera is closing"; + OnScannerError?.Invoke(new[] { error }); + return; + } + + + displayRequest.RequestActive(); + + isAnalyzing = true; + ScanCallback = scanCallback; + ScanningOptions = options ?? MobileBarcodeScanningOptions.Default; + + topText.Text = TopText ?? string.Empty; + bottomText.Text = BottomText ?? string.Empty; + + if (UseCustomOverlay) + { + gridCustomOverlay.Children.Clear(); + if (CustomOverlay != null) + gridCustomOverlay.Children.Add(CustomOverlay); + + gridCustomOverlay.Visibility = Visibility.Visible; + gridDefaultOverlay.Visibility = Visibility.Collapsed; + } + else + { + gridCustomOverlay.Visibility = Visibility.Collapsed; + gridDefaultOverlay.Visibility = Visibility.Visible; + } + + // Find which device to use + var preferredCamera = await GetFilteredCameraOrDefaultAsync(ScanningOptions); + if (preferredCamera == null) + { + var error = "No camera available"; + System.Diagnostics.Debug.WriteLine(error); + isMediaCaptureInitialized = false; + OnScannerError?.Invoke(new[] { error }); + return; + } + + if (preferredCamera.EnclosureLocation == null || preferredCamera.EnclosureLocation.Panel == Windows.Devices.Enumeration.Panel.Unknown) + { + // No information on the location of the camera, assume it's an external camera, not integrated on the device. + externalCamera = true; + } + else + { + // Camera is fixed on the device. + externalCamera = false; + + // Only mirror the preview if the camera is on the front panel. + mirroringPreview = preferredCamera.EnclosureLocation.Panel == Windows.Devices.Enumeration.Panel.Front; + } + + mediaCapture = new MediaCapture(); + + // Initialize the capture with the settings above + try + { + await mediaCapture.InitializeAsync(new MediaCaptureInitializationSettings + { + StreamingCaptureMode = StreamingCaptureMode.Video, + VideoDeviceId = preferredCamera.Id + }); + isMediaCaptureInitialized = true; + } + catch (UnauthorizedAccessException) + { + System.Diagnostics.Debug.WriteLine("Denied access to the camera"); + } + catch (Exception ex) + { + System.Diagnostics.Debug.WriteLine("Exception when init MediaCapture: {0}", ex); + } + + if (!isMediaCaptureInitialized) + { + var error = "Unexpected error on Camera initialisation"; + OnScannerError?.Invoke(new[] { error }); + return; + } + + + // Set the capture element's source to show it in the UI + captureElement.Source = mediaCapture; + captureElement.FlowDirection = mirroringPreview ? FlowDirection.RightToLeft : FlowDirection.LeftToRight; + + // Start the preview + await mediaCapture.StartPreviewAsync(); + + if (mediaCapture.CameraStreamState == CameraStreamState.Streaming) + { + OnCameraInitialized?.Invoke(); + } + + // Get all the available resolutions for preview + var availableProperties = mediaCapture.VideoDeviceController.GetAvailableMediaStreamProperties(MediaStreamType.VideoPreview); + var availableResolutions = new List(); + foreach (var ap in availableProperties) + { + var vp = (VideoEncodingProperties)ap; + System.Diagnostics.Debug.WriteLine("Camera Preview Resolution: {0}x{1}", vp.Width, vp.Height); + availableResolutions.Add(new CameraResolution { Width = (int)vp.Width, Height = (int)vp.Height }); + } + CameraResolution previewResolution = null; + if (ScanningOptions.CameraResolutionSelector != null) + previewResolution = ScanningOptions.CameraResolutionSelector(availableResolutions); + + if (availableResolutions == null || availableResolutions.Count < 1) + { + var error = "Camera is busy. Try to close all applications that use camera."; + OnScannerError?.Invoke(new[] { error }); + return; + } + + // If the user did not specify a resolution, let's try and find a suitable one + if (previewResolution == null) + { + // Loop through all supported sizes + foreach (var sps in availableResolutions) + { + // Find one that's >= 640x360 but <= 1000x1000 + // This will likely pick the *smallest* size in that range, which should be fine + if (sps.Width >= 640 && sps.Width <= 1000 && sps.Height >= 360 && sps.Height <= 1000) + { + previewResolution = new CameraResolution + { + Width = sps.Width, + Height = sps.Height + }; + break; + } + } + } + + if (previewResolution == null) + previewResolution = availableResolutions.LastOrDefault(); + + if (previewResolution == null) + { + System.Diagnostics.Debug.WriteLine("No preview resolution available. Camera may be in use by another application."); + return; + } + + MobileBarcodeScanner.Log("Using Preview Resolution: {0}x{1}", previewResolution.Width, previewResolution.Height); + + // Find the matching property based on the selection, again + var chosenProp = availableProperties.FirstOrDefault(ap => ((VideoEncodingProperties)ap).Width == previewResolution.Width && ((VideoEncodingProperties)ap).Height == previewResolution.Height); + + // Pass in the requested preview size properties + // so we can set them at the same time as the preview rotation + // to save an additional set property call + await SetPreviewRotationAsync(chosenProp); + + // *after* the preview is setup, set this so that the UI layout happens + // otherwise the preview gets stuck in a funny place on screen + captureElement.Stretch = Stretch.UniformToFill; + + await SetupAutoFocus(); + + var zxing = ScanningOptions.BuildBarcodeReader(); + + timerPreview = new Timer(async (state) => + { + + var delay = ScanningOptions.DelayBetweenAnalyzingFrames; + + if (stopping || processing || !isAnalyzing + || (mediaCapture == null || mediaCapture.CameraStreamState != Windows.Media.Devices.CameraStreamState.Streaming)) + { + timerPreview.Change(delay, Timeout.Infinite); + return; + } + + processing = true; + + SoftwareBitmapLuminanceSource luminanceSource = null; + + try + { + // Get preview + var frame = await mediaCapture.GetPreviewFrameAsync(videoFrame); + + // Create our luminance source + luminanceSource = new SoftwareBitmapLuminanceSource(frame.SoftwareBitmap); + + } + catch (Exception ex) + { + MobileBarcodeScanner.Log("GetPreviewFrame Failed: {0}", ex); + } + + ZXing.Result result = null; + + try + { + // Try decoding the image + if (luminanceSource != null) + result = zxing.Decode(luminanceSource); + } + catch (Exception ex) + { + MobileBarcodeScanner.Log("Warning: zxing.Decode Failed: {0}", ex); + } + + // Check if a result was found + if (result != null && !string.IsNullOrEmpty(result.Text)) + { + if (!ContinuousScanning) + { + delay = Timeout.Infinite; + await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async () => { await StopScanningAsync(); }); + } + else + { + delay = ScanningOptions.DelayBetweenContinuousScans; + } + + LastScanResult = result; + ScanCallback(result); + } + + processing = false; + + timerPreview.Change(delay, Timeout.Infinite); + + }, null, ScanningOptions.InitialDelayBeforeAnalyzingFrames, Timeout.Infinite); + } + + async Task GetFilteredCameraOrDefaultAsync(MobileBarcodeScanningOptions options) + { + var videoCaptureDevices = await DeviceInformation.FindAllAsync(DeviceClass.VideoCapture); + + var useFront = options.UseFrontCameraIfAvailable.HasValue && options.UseFrontCameraIfAvailable.Value; + + var selectedCamera = videoCaptureDevices.FirstOrDefault(vcd => vcd.EnclosureLocation != null + && ((!useFront && vcd.EnclosureLocation.Panel == Windows.Devices.Enumeration.Panel.Back) + || (useFront && vcd.EnclosureLocation.Panel == Windows.Devices.Enumeration.Panel.Front))); + + + // we fall back to the first camera that we can find. + if (selectedCamera == null) + { + var whichCamera = useFront ? "front" : "back"; + System.Diagnostics.Debug.WriteLine("Finding " + whichCamera + " camera failed, opening first available camera"); + selectedCamera = videoCaptureDevices.FirstOrDefault(); + } + + return selectedCamera; + } + + protected override void OnPointerPressed(PointerRoutedEventArgs e) + { + System.Diagnostics.Debug.WriteLine("AutoFocus requested"); + base.OnPointerPressed(e); + var pt = e.GetCurrentPoint(captureElement); + new Task(() => { AutoFocusAsync((int)pt.Position.X, (int)pt.Position.Y, true); }); + } + + Timer timerPreview; + MediaCapture mediaCapture; + + bool stopping = false; + bool isMediaCaptureInitialized = false; + + volatile bool processing = false; + volatile bool isAnalyzing = false; + + public Action ScanCallback { get; set; } + public MobileBarcodeScanningOptions ScanningOptions { get; set; } + public MobileBarcodeScannerBase Scanner { get; set; } + public UIElement CustomOverlay { get; set; } + public string TopText { get; set; } + public string BottomText { get; set; } + public bool UseCustomOverlay { get; set; } + public bool ContinuousScanning { get; set; } + + public Result LastScanResult { get; set; } + + + public bool IsTorchOn + => HasTorch && mediaCapture.VideoDeviceController.TorchControl.Enabled; + + public bool IsFocusSupported + => mediaCapture != null + && isMediaCaptureInitialized + && mediaCapture.VideoDeviceController != null + && mediaCapture.VideoDeviceController.FocusControl != null + && mediaCapture.VideoDeviceController.FocusControl.Supported; + + async Task SetupAutoFocus() + { + if (IsFocusSupported) + { + var focusControl = mediaCapture.VideoDeviceController.FocusControl; + + var focusSettings = new FocusSettings(); + + if (ScanningOptions.DisableAutofocus) + { + focusSettings.Mode = FocusMode.Manual; + focusSettings.Distance = ManualFocusDistance.Nearest; + focusControl.Configure(focusSettings); + return; + } + + focusSettings.AutoFocusRange = focusControl.SupportedFocusRanges.Contains(AutoFocusRange.FullRange) + ? AutoFocusRange.FullRange + : focusControl.SupportedFocusRanges.FirstOrDefault(); + + var supportedFocusModes = focusControl.SupportedFocusModes; + if (supportedFocusModes.Contains(FocusMode.Continuous)) + { + focusSettings.Mode = FocusMode.Continuous; + } + else if (supportedFocusModes.Contains(FocusMode.Auto)) + { + focusSettings.Mode = FocusMode.Auto; + } + + if (focusSettings.Mode == FocusMode.Continuous || focusSettings.Mode == FocusMode.Auto) + { + focusSettings.WaitForFocus = false; + focusControl.Configure(focusSettings); + await focusControl.FocusAsync(); + } + } + } + + public void Torch(bool on) + { + if (HasTorch) + mediaCapture.VideoDeviceController.TorchControl.Enabled = on; + } + + public void ToggleTorch() + { + if (HasTorch) + Torch(!IsTorchOn); + } + + public bool HasTorch + => mediaCapture != null + && mediaCapture.VideoDeviceController != null + && mediaCapture.VideoDeviceController.TorchControl != null + && mediaCapture.VideoDeviceController.TorchControl.Supported; + + public async void AutoFocus() + => await AutoFocusAsync(0, 0, false); + + public async void AutoFocus(int x, int y) + => await AutoFocusAsync(x, y, true); + + public async Task AutoFocusAsync(int x, int y, bool useCoordinates) + { + if (ScanningOptions.DisableAutofocus) + return; + + if (IsFocusSupported && mediaCapture?.CameraStreamState == CameraStreamState.Streaming) + { + var focusControl = mediaCapture.VideoDeviceController.FocusControl; + var roiControl = mediaCapture.VideoDeviceController.RegionsOfInterestControl; + try + { + if (roiControl.AutoFocusSupported && roiControl.MaxRegions > 0) + { + if (useCoordinates) + { + var props = mediaCapture.VideoDeviceController.GetMediaStreamProperties(MediaStreamType.VideoPreview); + + var previewEncodingProperties = GetPreviewResolution(props); + var previewRect = GetPreviewStreamRectInControl(previewEncodingProperties, captureElement); + var focusPreview = ConvertUiTapToPreviewRect(new Point(x, y), new Size(20, 20), previewRect); + var regionOfInterest = new RegionOfInterest + { + AutoFocusEnabled = true, + BoundsNormalized = true, + Bounds = focusPreview, + Type = RegionOfInterestType.Unknown, + Weight = 100 + }; + await roiControl.SetRegionsAsync(new[] { regionOfInterest }, true); + + var focusRange = focusControl.SupportedFocusRanges.Contains(AutoFocusRange.FullRange) + ? AutoFocusRange.FullRange + : focusControl.SupportedFocusRanges.FirstOrDefault(); + + var focusMode = focusControl.SupportedFocusModes.Contains(FocusMode.Single) + ? FocusMode.Single + : focusControl.SupportedFocusModes.FirstOrDefault(); + + var settings = new FocusSettings + { + Mode = focusMode, + AutoFocusRange = focusRange, + }; + + focusControl.Configure(settings); + } + else + { + // If no region provided, clear any regions and reset focus + await roiControl.ClearRegionsAsync(); + } + } + + await focusControl.FocusAsync(); + } + catch (Exception ex) + { + System.Diagnostics.Debug.WriteLine("AutoFocusAsync Error: {0}", ex); + } + } + } + + public async Task StopScanningAsync() + { + if (stopping) + return; + + stopping = true; + isAnalyzing = false; + + displayRequest.RequestRelease(); + + try + { + if (IsTorchOn) + Torch(false); + if (isMediaCaptureInitialized) + await mediaCapture.StopPreviewAsync(); + if (UseCustomOverlay && CustomOverlay != null) + gridCustomOverlay.Children.Remove(CustomOverlay); + } + catch { } + finally + { + //second execution from sample will crash if the object is not properly disposed (always on mobile, sometimes on desktop) + if (mediaCapture != null) + mediaCapture.Dispose(); + } + + //this solves a crash occuring when the user rotates the screen after the QR scanning is closed + displayInformation.OrientationChanged -= DisplayInformation_OrientationChanged; + + if (timerPreview != null) + timerPreview.Change(Timeout.Infinite, Timeout.Infinite); + stopping = false; + } + + public async Task Cancel() + { + LastScanResult = null; + + await StopScanningAsync(); + + ScanCallback?.Invoke(null); + } + + public async void Dispose() + { + await StopScanningAsync(); + gridCustomOverlay?.Children?.Clear(); + } + + protected override void OnTapped(TappedRoutedEventArgs e) + => base.OnTapped(e); + + void ButtonToggleFlash_Click(object sender, RoutedEventArgs e) + => ToggleTorch(); + + /// + /// Gets the current orientation of the UI in relation to the device and applies a corrective rotation to the preview + /// + async Task SetPreviewRotationAsync(IMediaEncodingProperties props) + { + // Only need to update the orientation if the camera is mounted on the device. + if (mediaCapture == null) + return; + + // Calculate which way and how far to rotate the preview. + CalculatePreviewRotation(out var sourceRotation, out var rotationDegrees); + + // Set preview rotation in the preview source. + mediaCapture.SetPreviewRotation(sourceRotation); + + // Add rotation metadata to the preview stream to make sure the aspect ratio / dimensions match when rendering and getting preview frames + //var props = mediaCapture.VideoDeviceController.GetMediaStreamProperties(MediaStreamType.VideoPreview); + props.Properties.Add(rotationKey, rotationDegrees); + await mediaCapture.VideoDeviceController.SetMediaStreamPropertiesAsync(MediaStreamType.VideoPreview, props); + + var currentPreviewResolution = GetPreviewResolution(props); + // Setup a frame to use as the input settings + videoFrame = new VideoFrame(Windows.Graphics.Imaging.BitmapPixelFormat.Bgra8, (int)currentPreviewResolution.Width, (int)currentPreviewResolution.Height); + } + + Size GetPreviewResolution(IMediaEncodingProperties props) + { + // Get our preview properties + if (props is VideoEncodingProperties previewProperties) + { + var streamWidth = previewProperties.Width; + var streamHeight = previewProperties.Height; + + // For portrait orientations, the width and height need to be swapped + if (displayOrientation == DisplayOrientations.Portrait || displayOrientation == DisplayOrientations.PortraitFlipped) + { + streamWidth = previewProperties.Height; + streamHeight = previewProperties.Width; + } + + return new Size(streamWidth, streamHeight); + } + + return default; + } + + /// + /// Reads the current orientation of the app and calculates the VideoRotation necessary to ensure the preview is rendered in the correct orientation. + /// + /// The rotation value to use in MediaCapture.SetPreviewRotation. + /// The accompanying rotation metadata with which to tag the preview stream. + void CalculatePreviewRotation(out VideoRotation sourceRotation, out int rotationDegrees) + { + // Note that in some cases, the rotation direction needs to be inverted if the preview is being mirrored. + switch (displayInformation.CurrentOrientation) + { + case DisplayOrientations.Portrait: + if (mirroringPreview) + { + rotationDegrees = 270; + sourceRotation = VideoRotation.Clockwise270Degrees; + } + else + { + rotationDegrees = 90; + sourceRotation = VideoRotation.Clockwise90Degrees; + } + break; + + case DisplayOrientations.LandscapeFlipped: + // No need to invert this rotation, as rotating 180 degrees is the same either way. + rotationDegrees = 180; + sourceRotation = VideoRotation.Clockwise180Degrees; + break; + + case DisplayOrientations.PortraitFlipped: + if (mirroringPreview) + { + rotationDegrees = 90; + sourceRotation = VideoRotation.Clockwise90Degrees; + } + else + { + rotationDegrees = 270; + sourceRotation = VideoRotation.Clockwise270Degrees; + } + break; + + case DisplayOrientations.Landscape: + default: + rotationDegrees = 0; + sourceRotation = VideoRotation.None; + break; + } + } + + /// + /// Applies the necessary rotation to a tap on a CaptureElement (with Stretch mode set to Uniform) to account for device orientation + /// + /// The location, in UI coordinates, of the user tap + /// The size, in UI coordinates, of the desired focus rectangle + /// The area within the CaptureElement that is actively showing the preview, and is not part of the letterboxed area + /// A Rect that can be passed to the MediaCapture Focus and RegionsOfInterest APIs, with normalized bounds in the orientation of the native stream + Rect ConvertUiTapToPreviewRect(Point tap, Size size, Rect previewRect) + { + // Adjust for the resulting focus rectangle to be centered around the position + double left = tap.X - size.Width / 2, top = tap.Y - size.Height / 2; + + // Get the information about the active preview area within the CaptureElement (in case it's letterboxed) + double previewWidth = previewRect.Width, previewHeight = previewRect.Height; + double previewLeft = previewRect.Left, previewTop = previewRect.Top; + + // Transform the left and top of the tap to account for rotation + switch (displayOrientation) + { + case DisplayOrientations.Portrait: + var tempLeft = left; + + left = top; + top = previewRect.Width - tempLeft; + break; + case DisplayOrientations.LandscapeFlipped: + left = previewRect.Width - left; + top = previewRect.Height - top; + break; + case DisplayOrientations.PortraitFlipped: + var tempTop = top; + + top = left; + left = previewRect.Width - tempTop; + break; + } + + // For portrait orientations, the information about the active preview area needs to be rotated + if (displayOrientation == DisplayOrientations.Portrait || displayOrientation == DisplayOrientations.PortraitFlipped) + { + previewWidth = previewRect.Height; + previewHeight = previewRect.Width; + previewLeft = previewRect.Top; + previewTop = previewRect.Left; + } + + // Normalize width and height of the focus rectangle + var width = size.Width / previewWidth; + var height = size.Height / previewHeight; + + // Shift rect left and top to be relative to just the active preview area + left -= previewLeft; + top -= previewTop; + + // Normalize left and top + left /= previewWidth; + top /= previewHeight; + + // Ensure rectangle is fully contained within the active preview area horizontally + left = Math.Max(left, 0); + left = Math.Min(1 - width, left); + + // Ensure rectangle is fully contained within the active preview area vertically + top = Math.Max(top, 0); + top = Math.Min(1 - height, top); + + // Create and return resulting rectangle + return new Rect(left, top, width, height); + } + + /// + /// Calculates the size and location of the rectangle that contains the preview stream within the preview control, when the scaling mode is Uniform + /// + /// The resolution at which the preview is running + /// The control that is displaying the preview using Uniform as the scaling mode + /// + static Rect GetPreviewStreamRectInControl(Size previewResolution, CaptureElement previewControl) + { + var result = new Rect(); + + // In case this function is called before everything is initialized correctly, return an empty result + if (previewControl == null || previewControl.ActualHeight < 1 || previewControl.ActualWidth < 1 || + previewResolution.Height < 1 || previewResolution.Width < 1) + { + return result; + } + + var streamWidth = previewResolution.Width; + var streamHeight = previewResolution.Height; + + // Start by assuming the preview display area in the control spans the entire width and height both (this is corrected in the next if for the necessary dimension) + result.Width = previewControl.ActualWidth; + result.Height = previewControl.ActualHeight; + + // If UI is "wider" than preview, letterboxing will be on the sides + if ((previewControl.ActualWidth / previewControl.ActualHeight > streamWidth / (double)streamHeight)) + { + var scale = previewControl.ActualHeight / streamHeight; + var scaledWidth = streamWidth * scale; + + result.X = (previewControl.ActualWidth - scaledWidth) / 2.0; + result.Width = scaledWidth; + } + else // Preview stream is "wider" than UI, so letterboxing will be on the top+bottom + { + var scale = previewControl.ActualWidth / streamWidth; + var scaledHeight = streamHeight * scale; + + result.Y = (previewControl.ActualHeight - scaledHeight) / 2.0; + result.Height = scaledHeight; + } + + return result; + } + } +} diff --git a/ZXing.Net.Mobile/iOS/AVCaptureScannerView.ios.cs b/ZXing.Net.Mobile/iOS/AVCaptureScannerView.ios.cs new file mode 100644 index 000000000..f64f9bb5e --- /dev/null +++ b/ZXing.Net.Mobile/iOS/AVCaptureScannerView.ios.cs @@ -0,0 +1,632 @@ +using System; +using System.Linq; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +using Foundation; +using AVFoundation; +using CoreFoundation; +using CoreGraphics; +using CoreMedia; +using CoreVideo; +using ObjCRuntime; +using UIKit; + +using ZXing.Common; +using ZXing.Mobile; + +namespace ZXing.Mobile +{ + public class AVCaptureScannerView : UIView, IZXingScanner, IScannerSessionHost + { + public AVCaptureScannerView() + { + } + + public AVCaptureScannerView(IntPtr handle) : base(handle) + { + } + + public AVCaptureScannerView(CGRect frame) : base(frame) + { + } + + AVCaptureSession session; + AVCaptureVideoPreviewLayer previewLayer; + //AVCaptureVideoDataOutput output; + //OutputRecorder outputRecorder; + //DispatchQueue queue; + Action resultCallback; + volatile bool stopped = true; + + volatile bool foundResult = false; + CaptureDelegate captureDelegate; + + UIView layerView; + UIView overlayView = null; + + public event Action OnCancelButtonPressed; + + public string CancelButtonText { get; set; } + public string FlashButtonText { get; set; } + + public MobileBarcodeScanningOptions ScanningOptions { get; set; } + + void Setup() + { + if (overlayView != null) + overlayView.RemoveFromSuperview(); + + if (UseCustomOverlayView && CustomOverlayView != null) + overlayView = CustomOverlayView; + else + { + overlayView = new ZXingDefaultOverlayView(new CGRect(0, 0, this.Frame.Width, this.Frame.Height), + TopText, BottomText, CancelButtonText, FlashButtonText, + () => OnCancelButtonPressed?.Invoke(), ToggleTorch); + } + + if (overlayView != null) + { + overlayView.Frame = new CGRect(0, 0, this.Frame.Width, this.Frame.Height); + overlayView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; + } + } + + + bool torch = false; + bool analyzing = true; + DateTime lastAnalysis = DateTime.UtcNow.AddYears(-99); + bool wasScanned = false; + bool working = false; + + + bool SetupCaptureSession() + { + var availableResolutions = new List(); + + var consideredResolutions = new Dictionary { + { AVCaptureSession.Preset352x288, new CameraResolution { Width = 352, Height = 288 } }, + { AVCaptureSession.PresetMedium, new CameraResolution { Width = 480, Height = 360 } }, //480x360 + { AVCaptureSession.Preset640x480, new CameraResolution { Width = 640, Height = 480 } }, + { AVCaptureSession.Preset1280x720, new CameraResolution { Width = 1280, Height = 720 } }, + { AVCaptureSession.Preset1920x1080, new CameraResolution { Width = 1920, Height = 1080 } } + }; + + // configure the capture session for low resolution, change this if your code + // can cope with more data or volume + session = new AVCaptureSession() + { + SessionPreset = AVCaptureSession.Preset640x480 + }; + + // create a device input and attach it to the session + // var captureDevice = AVCaptureDevice.DefaultDeviceWithMediaType (AVMediaType.Video); + AVCaptureDevice captureDevice = null; + var devices = AVCaptureDevice.DevicesWithMediaType(AVMediaType.Video); + foreach (var device in devices) + { + captureDevice = device; + if (ScanningOptions.UseFrontCameraIfAvailable.HasValue && + ScanningOptions.UseFrontCameraIfAvailable.Value && + device.Position == AVCaptureDevicePosition.Front) + + break; //Front camera successfully set + else if (device.Position == AVCaptureDevicePosition.Back && (!ScanningOptions.UseFrontCameraIfAvailable.HasValue || !ScanningOptions.UseFrontCameraIfAvailable.Value)) + break; //Back camera succesfully set + } + if (captureDevice == null) + { + Console.WriteLine("No captureDevice - this won't work on the simulator, try a physical device"); + if (overlayView != null) + { + AddSubview(overlayView); + BringSubviewToFront(overlayView); + } + return false; + } + + CameraResolution resolution = null; + + // Find resolution + // Go through the resolutions we can even consider + foreach (var cr in consideredResolutions) + { + // Now check to make sure our selected device supports the resolution + // so we can add it to the list to pick from + if (captureDevice.SupportsAVCaptureSessionPreset(cr.Key)) + availableResolutions.Add(cr.Value); + } + + resolution = ScanningOptions.GetResolution(availableResolutions); + + // See if the user selected a resolution + if (resolution != null) + { + // Now get the preset string from the resolution chosen + var preset = (from c in consideredResolutions + where c.Value.Width == resolution.Width + && c.Value.Height == resolution.Height + select c.Key).FirstOrDefault(); + + // If we found a matching preset, let's set it on the session + if (!string.IsNullOrEmpty(preset)) + session.SessionPreset = preset; + } + + var input = AVCaptureDeviceInput.FromDevice(captureDevice); + if (input == null) + { + Console.WriteLine("No input - this won't work on the simulator, try a physical device"); + if (overlayView != null) + { + AddSubview(overlayView); + BringSubviewToFront(overlayView); + } + return false; + } + else + session.AddInput(input); + + + foundResult = false; + //Detect barcodes with built in avcapture stuff + var metadataOutput = new AVCaptureMetadataOutput(); + + captureDelegate = new CaptureDelegate(metaDataObjects => + { + if (!analyzing) + return; + + var msSinceLastPreview = (DateTime.UtcNow - lastAnalysis).TotalMilliseconds; + + if (msSinceLastPreview < ScanningOptions.DelayBetweenAnalyzingFrames + || (wasScanned && msSinceLastPreview < ScanningOptions.DelayBetweenContinuousScans) + || working) + return; + + try + { + working = true; + wasScanned = false; + lastAnalysis = DateTime.UtcNow; + + var mdo = metaDataObjects.FirstOrDefault(); + + if (!(mdo is AVMetadataMachineReadableCodeObject readableObj)) + return; + + if (readableObj.Type == AVMetadataObjectType.CatBody + || readableObj.Type == AVMetadataObjectType.DogBody + || readableObj.Type == AVMetadataObjectType.Face + || readableObj.Type == AVMetadataObjectType.HumanBody + || readableObj.Type == AVMetadataObjectType.SalientObject) + return; + + wasScanned = true; + + var zxingFormat = ZXingBarcodeFormatFromAVCaptureBarcodeFormat(readableObj.Type.ToString()); + + var rs = new ZXing.Result(readableObj.StringValue, null, null, zxingFormat); + + resultCallback(rs); + } + finally + { + working = false; + } + }); + + metadataOutput.SetDelegate(captureDelegate, DispatchQueue.MainQueue); + session.AddOutput(metadataOutput); + + //Setup barcode formats + if (ScanningOptions.PossibleFormats != null && ScanningOptions.PossibleFormats.Count > 0) + { + var formats = AVMetadataObjectType.None; + + foreach (var f in ScanningOptions.PossibleFormats) + formats |= AVCaptureBarcodeFormatFromZXingBarcodeFormat(f); + + formats &= ~AVMetadataObjectType.None; + + metadataOutput.MetadataObjectTypes = formats; + } + else + { + var availableMetaObjTypes = metadataOutput.AvailableMetadataObjectTypes; + + + metadataOutput.MetadataObjectTypes = metadataOutput.AvailableMetadataObjectTypes; + + + } + + previewLayer = new AVCaptureVideoPreviewLayer(session); + previewLayer.VideoGravity = AVLayerVideoGravity.ResizeAspectFill; + previewLayer.Frame = new CGRect(0, 0, this.Frame.Width, this.Frame.Height); + previewLayer.Position = new CGPoint(this.Layer.Bounds.Width / 2, (this.Layer.Bounds.Height / 2)); + + layerView = new UIView(new CGRect(0, 0, this.Frame.Width, this.Frame.Height)); + layerView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; + layerView.Layer.AddSublayer(previewLayer); + + AddSubview(layerView); + + ResizePreview(UIApplication.SharedApplication.StatusBarOrientation); + + if (overlayView != null) + { + AddSubview(overlayView); + BringSubviewToFront(overlayView); + } + + session.StartRunning(); + + if (captureDevice.IsFocusModeSupported(AVCaptureFocusMode.ContinuousAutoFocus)) + { + NSError err = null; + if (captureDevice.LockForConfiguration(out err)) + { + if (captureDevice.IsFocusModeSupported(AVCaptureFocusMode.ContinuousAutoFocus)) + captureDevice.FocusMode = AVCaptureFocusMode.ContinuousAutoFocus; + else if (captureDevice.IsFocusModeSupported(AVCaptureFocusMode.AutoFocus)) + captureDevice.FocusMode = AVCaptureFocusMode.AutoFocus; + + if (captureDevice.IsExposureModeSupported(AVCaptureExposureMode.ContinuousAutoExposure)) + captureDevice.ExposureMode = AVCaptureExposureMode.ContinuousAutoExposure; + else if (captureDevice.IsExposureModeSupported(AVCaptureExposureMode.AutoExpose)) + captureDevice.ExposureMode = AVCaptureExposureMode.AutoExpose; + + if (captureDevice.IsWhiteBalanceModeSupported(AVCaptureWhiteBalanceMode.ContinuousAutoWhiteBalance)) + captureDevice.WhiteBalanceMode = AVCaptureWhiteBalanceMode.ContinuousAutoWhiteBalance; + else if (captureDevice.IsWhiteBalanceModeSupported(AVCaptureWhiteBalanceMode.AutoWhiteBalance)) + captureDevice.WhiteBalanceMode = AVCaptureWhiteBalanceMode.AutoWhiteBalance; + + if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0) && captureDevice.AutoFocusRangeRestrictionSupported) + captureDevice.AutoFocusRangeRestriction = AVCaptureAutoFocusRangeRestriction.Near; + + if (captureDevice.FocusPointOfInterestSupported) + captureDevice.FocusPointOfInterest = new CGPoint(0.5f, 0.5f); + + if (captureDevice.ExposurePointOfInterestSupported) + captureDevice.ExposurePointOfInterest = new CGPoint(0.5f, 0.5f); + + captureDevice.UnlockForConfiguration(); + } + else + Console.WriteLine("Failed to Lock for Config: " + err.Description); + } + + return true; + } + + public void DidRotate(UIInterfaceOrientation orientation) + { + ResizePreview(orientation); + + LayoutSubviews(); + } + + public void ResizePreview(UIInterfaceOrientation orientation) + { + if (previewLayer == null) + return; + + previewLayer.Frame = new CGRect(0, 0, Frame.Width, Frame.Height); + + if (previewLayer.RespondsToSelector(new Selector("connection")) && previewLayer.Connection != null) + { + switch (orientation) + { + case UIInterfaceOrientation.LandscapeLeft: + previewLayer.Connection.VideoOrientation = AVCaptureVideoOrientation.LandscapeLeft; + break; + case UIInterfaceOrientation.LandscapeRight: + previewLayer.Connection.VideoOrientation = AVCaptureVideoOrientation.LandscapeRight; + break; + case UIInterfaceOrientation.Portrait: + previewLayer.Connection.VideoOrientation = AVCaptureVideoOrientation.Portrait; + break; + case UIInterfaceOrientation.PortraitUpsideDown: + previewLayer.Connection.VideoOrientation = AVCaptureVideoOrientation.PortraitUpsideDown; + break; + } + } + } + + public void Focus(CGPoint pointOfInterest) + { + //Get the device + if (AVMediaType.Video == null) + return; + + var device = AVCaptureDevice.DefaultDeviceWithMediaType(AVMediaType.Video); + + if (device == null) + return; + + //See if it supports focusing on a point + if (device.FocusPointOfInterestSupported && !device.AdjustingFocus) + { + NSError err = null; + + //Lock device to config + if (device.LockForConfiguration(out err)) + { + Console.WriteLine("Focusing at point: " + pointOfInterest.X + ", " + pointOfInterest.Y); + + //Focus at the point touched + device.FocusPointOfInterest = pointOfInterest; + device.FocusMode = AVCaptureFocusMode.ContinuousAutoFocus; + device.UnlockForConfiguration(); + } + } + } + + #region IZXingScanner implementation + public void StartScanning(Action scanResultHandler, MobileBarcodeScanningOptions options = null) + { + if (!analyzing) + analyzing = true; + + if (!stopped) + return; + + Setup(); + + ScanningOptions = options; + resultCallback = scanResultHandler; + + InvokeOnMainThread(() => + { + if (!SetupCaptureSession()) + { + //Setup 'simulated' view: + Console.WriteLine("Capture Session FAILED"); + } + + if (Runtime.Arch == Arch.SIMULATOR) + { + var simView = new UIView(new CGRect(0, 0, this.Frame.Width, this.Frame.Height)); + simView.BackgroundColor = UIColor.LightGray; + simView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; + InsertSubview(simView, 0); + } + }); + + stopped = false; + } + + + public void StopScanning() + { + if (stopped) + return; + + Console.WriteLine("Stopping..."); + + //Try removing all existing outputs prior to closing the session + try + { + while (session.Outputs.Length > 0) + session.RemoveOutput(session.Outputs[0]); + } + catch { } + + //Try to remove all existing inputs prior to closing the session + try + { + while (session.Inputs.Length > 0) + session.RemoveInput(session.Inputs[0]); + } + catch { } + + if (session.Running) + session.StopRunning(); + + stopped = true; + } + + public void PauseAnalysis() + => analyzing = false; + + public void ResumeAnalysis() + => analyzing = true; + + public void Torch(bool on) + { + try + { + var device = AVCaptureDevice.DefaultDeviceWithMediaType(AVMediaType.Video); + if (device.HasFlash || device.HasTorch) + { + device.LockForConfiguration(out var err); + + if (on) + { + if (device.HasTorch) + device.TorchMode = AVCaptureTorchMode.On; + if (device.HasFlash) + device.FlashMode = AVCaptureFlashMode.On; + } + else + { + if (device.HasTorch) + device.TorchMode = AVCaptureTorchMode.Off; + if (device.HasFlash) + device.FlashMode = AVCaptureFlashMode.Off; + } + + device.UnlockForConfiguration(); + } + device = null; + + torch = on; + } + catch { } + } + + public void ToggleTorch() + => Torch(!IsTorchOn); + + public void AutoFocus() + { + //Doesn't do much on iOS :( + } + + public void AutoFocus(int x, int y) + { + //Doesn't do much on iOS :( + } + + public string TopText { get; set; } + public string BottomText { get; set; } + + + public UIView CustomOverlayView { get; set; } + public bool UseCustomOverlayView { get; set; } + public bool IsAnalyzing => analyzing; + public bool IsTorchOn => torch; + + bool? hasTorch = null; + + public bool HasTorch + { + get + { + if (hasTorch.HasValue) + return hasTorch.Value; + + var device = AVCaptureDevice.DefaultDeviceWithMediaType(AVMediaType.Video); + hasTorch = device.HasFlash || device.HasTorch; + return hasTorch.Value; + } + } + #endregion + + public static bool SupportsAllRequestedBarcodeFormats(IEnumerable formats) + { + var supported = new List() { + BarcodeFormat.AZTEC, BarcodeFormat.CODE_128, BarcodeFormat.CODE_39, + BarcodeFormat.CODE_93, BarcodeFormat.EAN_13, BarcodeFormat.EAN_8, + BarcodeFormat.PDF_417, BarcodeFormat.QR_CODE, BarcodeFormat.UPC_E, + BarcodeFormat.DATA_MATRIX, BarcodeFormat.ITF, + BarcodeFormat.All_1D + }; + + return !formats.Any(f => !supported.Contains(f)); + } + + BarcodeFormat ZXingBarcodeFormatFromAVCaptureBarcodeFormat(string avMetadataObjectType) + { + switch (avMetadataObjectType) + { + case "AztecCode": + return BarcodeFormat.AZTEC; + case "Code128Code": + return BarcodeFormat.CODE_128; + case "Code39Code": + return BarcodeFormat.CODE_39; + case "Code39Mod43Code": + return BarcodeFormat.CODE_39; + case "Code93Code": + return BarcodeFormat.CODE_93; + case "EAN13Code": + return BarcodeFormat.EAN_13; + case "EAN8Code": + return BarcodeFormat.EAN_8; + case "PDF417Code": + return BarcodeFormat.PDF_417; + case "QRCode": + return BarcodeFormat.QR_CODE; + case "UPCECode": + return BarcodeFormat.UPC_E; + case "DataMatrixCode": + return BarcodeFormat.DATA_MATRIX; + case "Interleaved2of5Code": + return BarcodeFormat.ITF; + default: + return BarcodeFormat.QR_CODE; + } + } + + AVMetadataObjectType AVCaptureBarcodeFormatFromZXingBarcodeFormat(BarcodeFormat zxingBarcodeFormat) + { + var formats = AVMetadataObjectType.None; + + switch (zxingBarcodeFormat) + { + case BarcodeFormat.AZTEC: + formats |= AVMetadataObjectType.AztecCode; + break; + case BarcodeFormat.CODE_128: + formats |= AVMetadataObjectType.Code128Code; + break; + case BarcodeFormat.CODE_39: + formats |= AVMetadataObjectType.Code39Code; + formats |= AVMetadataObjectType.Code39Mod43Code; + break; + case BarcodeFormat.CODE_93: + formats |= AVMetadataObjectType.Code93Code; + break; + case BarcodeFormat.EAN_13: + formats |= AVMetadataObjectType.EAN13Code; + break; + case BarcodeFormat.EAN_8: + formats |= AVMetadataObjectType.EAN8Code; + break; + case BarcodeFormat.PDF_417: + formats |= AVMetadataObjectType.PDF417Code; + break; + case BarcodeFormat.QR_CODE: + formats |= AVMetadataObjectType.QRCode; + break; + case BarcodeFormat.UPC_E: + formats |= AVMetadataObjectType.UPCECode; + break; + case BarcodeFormat.All_1D: + formats |= AVMetadataObjectType.UPCECode; + formats |= AVMetadataObjectType.EAN13Code; + formats |= AVMetadataObjectType.EAN8Code; + formats |= AVMetadataObjectType.Code39Code; + formats |= AVMetadataObjectType.Code39Mod43Code; + formats |= AVMetadataObjectType.Code93Code; + break; + case BarcodeFormat.DATA_MATRIX: + formats |= AVMetadataObjectType.DataMatrixCode; + break; + case BarcodeFormat.ITF: + formats |= AVMetadataObjectType.ITF14Code; + break; + case BarcodeFormat.CODABAR: + case BarcodeFormat.MAXICODE: + case BarcodeFormat.MSI: + case BarcodeFormat.PLESSEY: + case BarcodeFormat.RSS_14: + case BarcodeFormat.RSS_EXPANDED: + case BarcodeFormat.UPC_A: + //TODO: Throw exception? + break; + } + + return formats; + } + } + + class CaptureDelegate : AVCaptureMetadataOutputObjectsDelegate + { + public CaptureDelegate(Action> onCapture) + => OnCapture = onCapture; + + public Action> OnCapture { get; set; } + + public override void DidOutputMetadataObjects(AVCaptureMetadataOutput captureOutput, AVMetadataObject[] metadataObjects, AVCaptureConnection connection) + { + if (OnCapture != null && metadataObjects != null) + OnCapture(metadataObjects); + } + } +} + diff --git a/ZXing.Net.Mobile/iOS/AVCaptureScannerViewController.ios.cs b/ZXing.Net.Mobile/iOS/AVCaptureScannerViewController.ios.cs new file mode 100644 index 000000000..e24228c7b --- /dev/null +++ b/ZXing.Net.Mobile/iOS/AVCaptureScannerViewController.ios.cs @@ -0,0 +1,175 @@ +using System; +using System.Drawing; +using System.Text; +using System.Collections.Generic; + +using UIKit; +using Foundation; +using AVFoundation; +using CoreGraphics; + +using ZXing; + +namespace ZXing.Mobile +{ + public class AVCaptureScannerViewController : UIViewController, IScannerViewController + { + AVCaptureScannerView scannerView; + + public event Action OnScannedResult; + + public MobileBarcodeScanningOptions ScanningOptions { get; set; } + public MobileBarcodeScanner Scanner { get; set; } + public bool ContinuousScanning { get; set; } + + UIActivityIndicatorView loadingView; + UIView loadingBg; + + public AVCaptureScannerViewController(MobileBarcodeScanningOptions options, MobileBarcodeScanner scanner) + { + ScanningOptions = options; + Scanner = scanner; + + var appFrame = UIScreen.MainScreen.ApplicationFrame; + + View.Frame = new CGRect(0, 0, appFrame.Width, appFrame.Height); + View.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; + } + + public UIViewController AsViewController() + => this; + + public void Cancel() + => InvokeOnMainThread(() => scannerView.StopScanning()); + + UIStatusBarStyle originalStatusBarStyle = UIStatusBarStyle.Default; + + public override void ViewDidLoad() + { + loadingBg = new UIView(this.View.Frame) + { + BackgroundColor = UIColor.Black, + AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight + }; + loadingView = new UIActivityIndicatorView(UIActivityIndicatorViewStyle.WhiteLarge) + { + AutoresizingMask = UIViewAutoresizing.FlexibleMargins + }; + loadingView.Frame = new CGRect((View.Frame.Width - loadingView.Frame.Width) / 2, + (View.Frame.Height - loadingView.Frame.Height) / 2, + loadingView.Frame.Width, + loadingView.Frame.Height); + + loadingBg.AddSubview(loadingView); + View.AddSubview(loadingBg); + loadingView.StartAnimating(); + + scannerView = new AVCaptureScannerView(new CGRect(0, 0, View.Frame.Width, View.Frame.Height)) + { + AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight, + UseCustomOverlayView = Scanner.UseCustomOverlay, + CustomOverlayView = Scanner.CustomOverlay, + TopText = Scanner.TopText, + BottomText = Scanner.BottomText, + CancelButtonText = Scanner.CancelButtonText, + FlashButtonText = Scanner.FlashButtonText + }; + scannerView.OnCancelButtonPressed += () => + Scanner.Cancel(); + + View.AddSubview(scannerView); + View.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; + } + + public void Torch(bool on) + => scannerView?.Torch(on); + + public void ToggleTorch() + => scannerView?.ToggleTorch(); + + public bool IsTorchOn + => scannerView?.IsTorchOn ?? false; + + public void PauseAnalysis() + => scannerView?.PauseAnalysis(); + + public void ResumeAnalysis() + => scannerView?.ResumeAnalysis(); + + public override void ViewDidAppear(bool animated) + { + originalStatusBarStyle = UIApplication.SharedApplication.StatusBarStyle; + + if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0)) + { + UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.Default; + SetNeedsStatusBarAppearanceUpdate(); + } + else + UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.BlackTranslucent, false); + + Console.WriteLine("Starting to scan..."); + + scannerView.StartScanning(result => + { + if (!ContinuousScanning) + { + Console.WriteLine("Stopping scan..."); + scannerView.StopScanning(); + } + + OnScannedResult?.Invoke(result); + }, ScanningOptions); + } + + public override void ViewDidDisappear(bool animated) + { + if (scannerView != null) + scannerView.StopScanning(); + } + + public override void ViewWillDisappear(bool animated) + => UIApplication.SharedApplication.SetStatusBarStyle(originalStatusBarStyle, false); + + public override void DidRotate(UIInterfaceOrientation fromInterfaceOrientation) + { + if (scannerView != null) + scannerView.DidRotate(this.InterfaceOrientation); + } + + public override bool ShouldAutorotate() + { + if (ScanningOptions.AutoRotate != null) + return (bool)ScanningOptions.AutoRotate; + + return false; + } + + public override UIInterfaceOrientationMask GetSupportedInterfaceOrientations() + => UIInterfaceOrientationMask.All; + + //void HandleOnScannerSetupComplete() + //{ + // BeginInvokeOnMainThread(() => + // { + // if (loadingView != null && loadingBg != null && loadingView.IsAnimating) + // { + // loadingView.StopAnimating(); + + // UIView.BeginAnimations("zoomout"); + + // UIView.SetAnimationDuration(2.0f); + // UIView.SetAnimationCurve(UIViewAnimationCurve.EaseOut); + + // loadingBg.Transform = CGAffineTransform.MakeScale(2.0f, 2.0f); + // loadingBg.Alpha = 0.0f; + + // UIView.CommitAnimations(); + + // loadingBg.RemoveFromSuperview(); + // } + // }); + //} + } +} + diff --git a/Source/ZXing.Net.Mobile.iOS/BarcodeWriter.cs b/ZXing.Net.Mobile/iOS/BarcodeWriter.ios.cs similarity index 58% rename from Source/ZXing.Net.Mobile.iOS/BarcodeWriter.cs rename to ZXing.Net.Mobile/iOS/BarcodeWriter.ios.cs index e03a61ea8..ea70e0fa2 100644 --- a/Source/ZXing.Net.Mobile.iOS/BarcodeWriter.cs +++ b/ZXing.Net.Mobile/iOS/BarcodeWriter.ios.cs @@ -15,26 +15,21 @@ */ using ZXing.Rendering; - -#if __UNIFIED__ using UIKit; -#else -using MonoTouch.UIKit; -#endif namespace ZXing.Mobile -{ - /// - /// A smart class to encode some content to a barcode image - /// - public class BarcodeWriter : BarcodeWriter, IBarcodeWriter - { - /// - /// Initializes a new instance of the class. - /// - public BarcodeWriter() - { - Renderer = new BitmapRenderer(); - } - } +{ + /// + /// A smart class to encode some content to a barcode image + /// + public class BarcodeWriter : BarcodeWriter, IBarcodeWriter + { + /// + /// Initializes a new instance of the class. + /// + public BarcodeWriter() + { + Renderer = new BitmapRenderer(); + } + } } diff --git a/ZXing.Net.Mobile/iOS/BitmapRenderer.ios.cs b/ZXing.Net.Mobile/iOS/BitmapRenderer.ios.cs new file mode 100644 index 000000000..8b9831fec --- /dev/null +++ b/ZXing.Net.Mobile/iOS/BitmapRenderer.ios.cs @@ -0,0 +1,42 @@ +using System; +using ZXing.Rendering; + +using Foundation; +using CoreFoundation; +using CoreGraphics; +using UIKit; + +using ZXing.Common; + +namespace ZXing.Mobile +{ + public class BitmapRenderer : IBarcodeRenderer + { + public UIImage Render(BitMatrix matrix, BarcodeFormat format, string content) + => Render(matrix, format, content, new EncodingOptions()); + + public UIImage Render(BitMatrix matrix, BarcodeFormat format, string content, EncodingOptions options) + { + UIGraphics.BeginImageContext(new CGSize(matrix.Width, matrix.Height)); + var context = UIGraphics.GetCurrentContext(); + + var black = new CGColor(0f, 0f, 0f); + var white = new CGColor(1.0f, 1.0f, 1.0f); + + for (var x = 0; x < matrix.Width; x++) + { + for (var y = 0; y < matrix.Height; y++) + { + context.SetFillColor(matrix[x, y] ? black : white); + context.FillRect(new CGRect(x, y, 1, 1)); + } + } + + var img = UIGraphics.GetImageFromCurrentImageContext(); + + UIGraphics.EndImageContext(); + + return img; + } + } +} diff --git a/ZXing.Net.Mobile/iOS/CVPixelBufferBGRA32LuminanceSource.ios.cs b/ZXing.Net.Mobile/iOS/CVPixelBufferBGRA32LuminanceSource.ios.cs new file mode 100644 index 000000000..23867d963 --- /dev/null +++ b/ZXing.Net.Mobile/iOS/CVPixelBufferBGRA32LuminanceSource.ios.cs @@ -0,0 +1,34 @@ +using System; +using System.Runtime.InteropServices; +using CoreVideo; +using ZXing; + +namespace ZXing.Mobile +{ + public class CVPixelBufferBGRA32LuminanceSource : BaseLuminanceSource + { + public unsafe CVPixelBufferBGRA32LuminanceSource(byte* cvPixelByteArray, int cvPixelByteArrayLength, int width, int height) + : base(width, height) => CalculateLuminance(cvPixelByteArray, cvPixelByteArrayLength); + + public CVPixelBufferBGRA32LuminanceSource(byte[] luminances, int width, int height) : base(luminances, width, height) + { + } + + unsafe void CalculateLuminance(byte* rgbRawBytes, int bytesLen) + { + for (int rgbIndex = 0, luminanceIndex = 0; rgbIndex < bytesLen && luminanceIndex < luminances.Length; luminanceIndex++) + { + // Calculate luminance cheaply, favoring green. + var b = rgbRawBytes[rgbIndex++]; + var g = rgbRawBytes[rgbIndex++]; + var r = rgbRawBytes[rgbIndex++]; + var alpha = rgbRawBytes[rgbIndex++]; + var luminance = (byte)((RChannelWeight * r + GChannelWeight * g + BChannelWeight * b) >> ChannelWeight); + luminances[luminanceIndex] = (byte)(((luminance * alpha) >> 8) + (255 * (255 - alpha) >> 8)); + } + } + + protected override LuminanceSource CreateLuminanceSource(byte[] newLuminances, int width, int height) + => new CVPixelBufferBGRA32LuminanceSource(newLuminances, width, height); + } +} diff --git a/Source/ZXing.Net.Mobile.iOS/IScannerViewController.cs b/ZXing.Net.Mobile/iOS/IScannerViewController.ios.cs similarity index 57% rename from Source/ZXing.Net.Mobile.iOS/IScannerViewController.cs rename to ZXing.Net.Mobile/iOS/IScannerViewController.ios.cs index f2817f5ac..9836ee5f6 100644 --- a/Source/ZXing.Net.Mobile.iOS/IScannerViewController.cs +++ b/ZXing.Net.Mobile/iOS/IScannerViewController.ios.cs @@ -12,15 +12,15 @@ public interface IScannerViewController void Cancel(); bool IsTorchOn { get; } - bool ContinuousScanning { get;set; } + bool ContinuousScanning { get; set; } - void PauseAnalysis (); - void ResumeAnalysis (); + void PauseAnalysis(); + void ResumeAnalysis(); event Action OnScannedResult; - MobileBarcodeScanningOptions ScanningOptions { get;set; } - MobileBarcodeScanner Scanner { get;set; } + MobileBarcodeScanningOptions ScanningOptions { get; set; } + MobileBarcodeScanner Scanner { get; set; } UIViewController AsViewController(); } diff --git a/ZXing.Net.Mobile/iOS/MobileBarcodeScanner.ios.cs b/ZXing.Net.Mobile/iOS/MobileBarcodeScanner.ios.cs new file mode 100644 index 000000000..09adb58ac --- /dev/null +++ b/ZXing.Net.Mobile/iOS/MobileBarcodeScanner.ios.cs @@ -0,0 +1,224 @@ +using System; +using System.Threading; +using System.Threading.Tasks; + +using Foundation; +using CoreFoundation; +using UIKit; + +namespace ZXing.Mobile +{ + public partial class MobileBarcodeScanner : MobileBarcodeScannerBase + { + IScannerViewController viewController; + + WeakReference weakAppController; + ManualResetEvent scanResultResetEvent = new ManualResetEvent(false); + + public MobileBarcodeScanner(UIViewController delegateController) + => weakAppController = new WeakReference(delegateController); + + public MobileBarcodeScanner() + { + foreach (var window in UIApplication.SharedApplication.Windows) + { + if (window.RootViewController != null) + { + weakAppController = new WeakReference(window.RootViewController); + break; + } + } + } + + public Task Scan(bool useAVCaptureEngine) + => Scan(new MobileBarcodeScanningOptions(), useAVCaptureEngine); + + + Task PlatformScan(MobileBarcodeScanningOptions options) + => Scan(options, false); + + void PlatformScanContinuously(MobileBarcodeScanningOptions options, Action scanHandler) + => InternalScanContinuously(options, false, scanHandler); + + public void ScanContinuously(MobileBarcodeScanningOptions options, bool useAVCaptureEngine, Action scanHandler) + => InternalScanContinuously(options, useAVCaptureEngine, scanHandler); + + void InternalScanContinuously(MobileBarcodeScanningOptions options, bool useAVCaptureEngine, Action scanHandler) + { + try + { + var sv = new Version(0, 0, 0); + Version.TryParse(UIDevice.CurrentDevice.SystemVersion, out sv); + + var is7orgreater = sv.Major >= 7; + var allRequestedFormatsSupported = true; + + if (useAVCaptureEngine) + allRequestedFormatsSupported = AVCaptureScannerView.SupportsAllRequestedBarcodeFormats(options.PossibleFormats); + + UIViewController appController; + if (weakAppController.TryGetTarget(out appController)) + { + var tcs = new TaskCompletionSource(); + + appController.InvokeOnMainThread(() => + { + if (useAVCaptureEngine && is7orgreater && allRequestedFormatsSupported) + { + viewController = new AVCaptureScannerViewController(options, this); + viewController.ContinuousScanning = true; + } + else + { + if (useAVCaptureEngine && !is7orgreater) + Console.WriteLine("Not iOS 7 or greater, cannot use AVCapture for barcode decoding, using ZXing instead"); + else if (useAVCaptureEngine && !allRequestedFormatsSupported) + Console.WriteLine("Not all requested barcode formats were supported by AVCapture, using ZXing instead"); + + viewController = new ZXing.Mobile.ZXingScannerViewController(options, this); + viewController.ContinuousScanning = true; + } + + viewController.OnScannedResult += barcodeResult => + { + // If null, stop scanning was called + if (barcodeResult == null) + { + ((UIViewController)viewController).InvokeOnMainThread(() => + { + ((UIViewController)viewController).DismissViewController(true, null); + }); + } + + scanHandler(barcodeResult); + }; + + appController.PresentViewController((UIViewController)viewController, true, null); + }); + } + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + } + + public Task Scan(MobileBarcodeScanningOptions options, bool useAVCaptureEngine) => Task.Factory.StartNew(() => + { + try + { + scanResultResetEvent.Reset(); + + Result result = null; + + var sv = new Version(0, 0, 0); + Version.TryParse(UIDevice.CurrentDevice.SystemVersion, out sv); + + var is7orgreater = sv.Major >= 7; + var allRequestedFormatsSupported = true; + + if (useAVCaptureEngine) + allRequestedFormatsSupported = AVCaptureScannerView.SupportsAllRequestedBarcodeFormats(options.PossibleFormats); + + if (weakAppController.TryGetTarget(out var appController)) + { + appController.InvokeOnMainThread(() => + { + + + if (useAVCaptureEngine && is7orgreater && allRequestedFormatsSupported) + { + viewController = new AVCaptureScannerViewController(options, this); + } + else + { + if (useAVCaptureEngine && !is7orgreater) + Console.WriteLine("Not iOS 7 or greater, cannot use AVCapture for barcode decoding, using ZXing instead"); + else if (useAVCaptureEngine && !allRequestedFormatsSupported) + Console.WriteLine("Not all requested barcode formats were supported by AVCapture, using ZXing instead"); + + viewController = new ZXing.Mobile.ZXingScannerViewController(options, this); + } + + viewController.OnScannedResult += barcodeResult => + { + + ((UIViewController)viewController).InvokeOnMainThread(() => + { + + viewController.Cancel(); + + // Handle error situation that occurs when user manually closes scanner in the same moment that a QR code is detected + try + { + ((UIViewController)viewController).DismissViewController(true, () => + { + result = barcodeResult; + scanResultResetEvent.Set(); + }); + } + catch (ObjectDisposedException) + { + // In all likelihood, iOS has decided to close the scanner at this point. But just in case it executes the + // post-scan code instead, set the result so we will not get a NullReferenceException. + result = barcodeResult; + scanResultResetEvent.Set(); + } + }); + }; + + appController.PresentViewController((UIViewController)viewController, true, null); + }); + } + + scanResultResetEvent.WaitOne(); + ((UIViewController)viewController).Dispose(); + + return result; + } + catch (Exception ex) + { + Console.WriteLine(ex); + return null; + } + }); + + void PlatformCancel() + { + if (viewController != null) + { + ((UIViewController)viewController).InvokeOnMainThread(() => + { + viewController.Cancel(); + + // Calling with animated:true here will result in a blank screen when the scanner is closed on iOS 7. + ((UIViewController)viewController).DismissViewController(true, null); + }); + } + + scanResultResetEvent.Set(); + } + + void PlatformTorch(bool on) + => viewController?.Torch(on); + + void PlatformToggleTorch() + => viewController?.ToggleTorch(); + + void PlatformAutoFocus() + { + //Does nothing on iOS + } + + void PlatformPauseAnalysis() + => viewController?.PauseAnalysis(); + + void PlatformResumeAnalysis() + => viewController?.ResumeAnalysis(); + + bool PlatformIsTorchOn + => viewController.IsTorchOn; + + public UIView CustomOverlay { get; set; } + } +} diff --git a/ZXing.Net.Mobile/iOS/RGBLuminanceSourceiOS.ios.cs b/ZXing.Net.Mobile/iOS/RGBLuminanceSourceiOS.ios.cs new file mode 100644 index 000000000..755d86d3c --- /dev/null +++ b/ZXing.Net.Mobile/iOS/RGBLuminanceSourceiOS.ios.cs @@ -0,0 +1,43 @@ +using System; +using System.Runtime.InteropServices; + +using UIKit; +using CoreGraphics; + +namespace ZXing.Mobile +{ + public class RGBLuminanceSourceiOS : RGBLuminanceSource + { + public RGBLuminanceSourceiOS(UIImage d) + : base((int)d.CGImage.Width, (int)d.CGImage.Height) + => CalculateLuminance(d); + + void CalculateLuminance(UIImage d) + { + var imageRef = d.CGImage; + var width = (int)imageRef.Width; + var height = (int)imageRef.Height; + var colorSpace = CGColorSpace.CreateDeviceRGB(); + + var rawData = Marshal.AllocHGlobal(height * width * 4); + + try + { + var flags = CGBitmapFlags.PremultipliedFirst | CGBitmapFlags.ByteOrder32Little; + var context = new CGBitmapContext(rawData, width, height, 8, 4 * width, + colorSpace, (CGImageAlphaInfo)flags); + + context.DrawImage(new CGRect(0.0f, 0.0f, (float)width, (float)height), imageRef); + var pixelData = new byte[height * width * 4]; + Marshal.Copy(rawData, pixelData, 0, pixelData.Length); + + CalculateLuminance(pixelData, BitmapFormat.BGRA32); + } + finally + { + Marshal.FreeHGlobal(rawData); + } + } + } +} + diff --git a/Source/ZXing.Net.Mobile.iOS/ZXingDefaultOverlayView.cs b/ZXing.Net.Mobile/iOS/ZXingDefaultOverlayView.ios.cs similarity index 58% rename from Source/ZXing.Net.Mobile.iOS/ZXingDefaultOverlayView.cs rename to ZXing.Net.Mobile/iOS/ZXingDefaultOverlayView.ios.cs index d0b7ae323..0604461b1 100644 --- a/Source/ZXing.Net.Mobile.iOS/ZXingDefaultOverlayView.cs +++ b/ZXing.Net.Mobile/iOS/ZXingDefaultOverlayView.ios.cs @@ -13,27 +13,27 @@ namespace ZXing.Mobile { public class ZXingDefaultOverlayView : UIView { - public ZXingDefaultOverlayView (CGRect frame, string topText, - string bottomText, string cancelText, string flashText, - Action onCancel, Action onTorch) : base(frame) + public ZXingDefaultOverlayView(CGRect frame, string topText, + string bottomText, string cancelText, string flashText, + Action onCancel, Action onTorch) : base(frame) { this.cancelText = cancelText ?? "Cancel"; this.flashText = flashText ?? "Flash"; this.topText = topText ?? ""; this.bottomText = bottomText ?? ""; - OnCancel = onCancel; - OnTorch = onTorch; + this.onCancel = onCancel; + this.onTorch = onTorch; Initialize(); } - string cancelText; - string flashText; - string topText; - string bottomText; + readonly string cancelText; + readonly string flashText; + readonly string topText; + readonly string bottomText; - Action OnCancel; - Action OnTorch; + readonly Action onCancel; + readonly Action onTorch; UIView topBg; UIView bottomBg; @@ -41,57 +41,55 @@ public ZXingDefaultOverlayView (CGRect frame, string topText, UILabel textBottom; UIView redLine; - private void Initialize () - { + void Initialize() + { Opaque = false; BackgroundColor = UIColor.Clear; - - //Add(_mainView); - var picFrameWidth = Math.Round(Frame.Width * 0.90); //screenFrame.Width; + + // Add(_mainView); + var picFrameWidth = Math.Round(Frame.Width * 0.90); // screenFrame.Width; var picFrameHeight = Math.Round(Frame.Height * 0.60); var picFrameX = (Frame.Width - picFrameWidth) / 2; var picFrameY = (Frame.Height - picFrameHeight) / 2; - - var picFrame = new CGRect((int)picFrameX, (int)picFrameY, (int)picFrameWidth, (int)picFrameHeight); + var picFrame = new CGRect((int)picFrameX, (int)picFrameY, (int)picFrameWidth, (int)picFrameHeight); //Setup Overlay - var overlaySize = new CGSize (this.Frame.Width, this.Frame.Height - 44); - - topBg = new UIView (new CGRect (0, 0, overlaySize.Width, (overlaySize.Height - picFrame.Height) / 2)); - topBg.Frame = new CGRect (0, 0, overlaySize.Width, overlaySize.Height * 0.30f); + var overlaySize = new CGSize(Frame.Width, Frame.Height - 44); + + topBg = new UIView(new CGRect(0, 0, overlaySize.Width, (overlaySize.Height - picFrame.Height) / 2)); + topBg.Frame = new CGRect(0, 0, overlaySize.Width, overlaySize.Height * 0.30f); topBg.BackgroundColor = UIColor.Black; topBg.Alpha = 0.6f; topBg.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleBottomMargin; - - bottomBg = new UIView (new CGRect (0, topBg.Frame.Height + picFrame.Height, overlaySize.Width, topBg.Frame.Height)); - bottomBg.Frame = new CGRect (0, overlaySize.Height * 0.70f, overlaySize.Width, overlaySize.Height * 0.30f); + + bottomBg = new UIView(new CGRect(0, topBg.Frame.Height + picFrame.Height, overlaySize.Width, topBg.Frame.Height)); + bottomBg.Frame = new CGRect(0, overlaySize.Height * 0.70f, overlaySize.Width, overlaySize.Height * 0.30f); bottomBg.BackgroundColor = UIColor.Black; bottomBg.Alpha = 0.6f; bottomBg.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleTopMargin; - - redLine = new UIView (new CGRect (0, overlaySize.Height * 0.5f - 2.0f, overlaySize.Width, 4.0f)); + redLine = new UIView(new CGRect(0, overlaySize.Height * 0.5f - 2.0f, overlaySize.Width, 4.0f)); redLine.BackgroundColor = UIColor.Red; redLine.Alpha = 0.4f; redLine.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleBottomMargin | UIViewAutoresizing.FlexibleTopMargin; - this.AddSubview (redLine); - this.AddSubview (topBg); - this.AddSubview (bottomBg); + AddSubview(redLine); + AddSubview(topBg); + AddSubview(bottomBg); var topTextLines = 1; if (!string.IsNullOrEmpty(topText)) - topTextLines = topText.Split ('\n').Length; + topTextLines = topText.Split('\n').Length; var botTextLines = 1; if (!string.IsNullOrEmpty(bottomText)) - botTextLines = bottomText.Split ('\n').Length; + botTextLines = bottomText.Split('\n').Length; - textTop = new UILabel () + textTop = new UILabel() { Frame = topBg.Frame, Text = topText, @@ -102,10 +100,10 @@ private void Initialize () BackgroundColor = UIColor.Clear }; - textTop.SizeToFit (); - this.AddSubview (textTop); + textTop.SizeToFit(); + AddSubview(textTop); - textBottom = new UILabel () + textBottom = new UILabel() { Frame = bottomBg.Frame, Text = bottomText, @@ -116,49 +114,50 @@ private void Initialize () BackgroundColor = UIColor.Clear }; - textBottom.SizeToFit (); - this.AddSubview (textBottom); + textBottom.SizeToFit(); + AddSubview(textBottom); var captureDevice = AVCaptureDevice.DefaultDeviceWithMediaType(AVMediaType.Video); - bool hasTorch = false; + var hasTorch = false; if (captureDevice != null) hasTorch = captureDevice.TorchAvailable; - - InvokeOnMainThread(delegate { + + InvokeOnMainThread(delegate + { // Setting tool bar var toolBar = new UIToolbar(new CGRect(0, Frame.Height - 44, Frame.Width, 44)); - + var buttons = new List(); - buttons.Add(new UIBarButtonItem(cancelText, UIBarButtonItemStyle.Done, - delegate { OnCancel(); })); - + buttons.Add(new UIBarButtonItem(cancelText, UIBarButtonItemStyle.Done, + delegate { onCancel(); })); + if (hasTorch) { buttons.Add(new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace)); buttons.Add(new UIBarButtonItem(flashText, UIBarButtonItemStyle.Done, - delegate { OnTorch(); })); + delegate { onTorch(); })); } - + toolBar.Items = buttons.ToArray(); - + toolBar.TintColor = UIColor.Black; toolBar.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleTopMargin; Add(toolBar); - }); + }); } - public override void LayoutSubviews () + public override void LayoutSubviews() { - base.LayoutSubviews (); + base.LayoutSubviews(); - var overlaySize = new CGSize (this.Frame.Width, this.Frame.Height - 44); + var overlaySize = new CGSize(Frame.Width, Frame.Height - 44); if (topBg != null) - topBg.Frame = new CGRect (0, 0, overlaySize.Width, overlaySize.Height * 0.30f); + topBg.Frame = new CGRect(0, 0, overlaySize.Width, overlaySize.Height * 0.30f); if (bottomBg != null) - bottomBg.Frame = new CGRect (0, overlaySize.Height * 0.70f, overlaySize.Width, overlaySize.Height * 0.30f); + bottomBg.Frame = new CGRect(0, overlaySize.Height * 0.70f, overlaySize.Width, overlaySize.Height * 0.30f); if (textTop != null) textTop.Frame = topBg.Frame;// new RectangleF(0, overlaySize.Height * 0.10f, overlaySize.Width, 42); @@ -166,17 +165,17 @@ public override void LayoutSubviews () textBottom.Frame = bottomBg.Frame; // new RectangleF(0, overlaySize.Height * 0.825f - 32f, overlaySize.Width, 64); if (redLine != null) - redLine.Frame = new CGRect (0, overlaySize.Height * 0.5f - 2.0f, overlaySize.Width, 4.0f); + redLine.Frame = new CGRect(0, overlaySize.Height * 0.5f - 2.0f, overlaySize.Width, 4.0f); } - public void Destroy () - { - InvokeOnMainThread (() => { - textTop.RemoveFromSuperview (); - textBottom.RemoveFromSuperview (); - topBg.RemoveFromSuperview (); - bottomBg.RemoveFromSuperview (); - redLine.RemoveFromSuperview (); + public void Destroy() + => InvokeOnMainThread(() => + { + textTop.RemoveFromSuperview(); + textBottom.RemoveFromSuperview(); + topBg.RemoveFromSuperview(); + bottomBg.RemoveFromSuperview(); + redLine.RemoveFromSuperview(); textBottom = null; textTop = null; @@ -184,7 +183,6 @@ public void Destroy () bottomBg = null; redLine = null; }); - } } } diff --git a/Source/ZXing.Net.Mobile.iOS/ZXingScannerView.cs b/ZXing.Net.Mobile/iOS/ZXingScannerView.ios.cs similarity index 51% rename from Source/ZXing.Net.Mobile.iOS/ZXingScannerView.cs rename to ZXing.Net.Mobile/iOS/ZXingScannerView.ios.cs index e0ddd1088..861999a4a 100644 --- a/Source/ZXing.Net.Mobile.iOS/ZXingScannerView.cs +++ b/ZXing.Net.Mobile/iOS/ZXingScannerView.ios.cs @@ -32,7 +32,7 @@ public ZXingScannerView(IntPtr handle) : base(handle) { } - public ZXingScannerView (CGRect frame) : base(frame) + public ZXingScannerView(CGRect frame) : base(frame) { } @@ -49,10 +49,10 @@ public ZXingScannerView (CGRect frame) : base(frame) public MobileBarcodeScanningOptions ScanningOptions { get; set; } - public event Action OnCancelButtonPressed; + public event Action OnCancelButtonPressed; - public string CancelButtonText { get;set; } - public string FlashButtonText { get;set; } + public string CancelButtonText { get; set; } + public string FlashButtonText { get; set; } bool shouldRotatePreviewBuffer = false; @@ -61,93 +61,80 @@ void Setup(CGRect frame) var started = DateTime.UtcNow; if (overlayView != null) - overlayView.RemoveFromSuperview (); - - if (UseCustomOverlayView) - overlayView = CustomOverlayView; - else { - overlayView = new ZXingDefaultOverlayView (new CGRect (0, 0, this.Frame.Width, this.Frame.Height), - TopText, BottomText, CancelButtonText, FlashButtonText, - () => { - var evt = OnCancelButtonPressed; - if (evt != null) - evt(); - }, ToggleTorch); - } + overlayView.RemoveFromSuperview(); - if (overlayView != null) + if (UseCustomOverlayView) + overlayView = CustomOverlayView; + else { - /*UITapGestureRecognizer tapGestureRecognizer = new UITapGestureRecognizer (); - - tapGestureRecognizer.AddTarget (() => { - - var pt = tapGestureRecognizer.LocationInView(overlayView); - - Focus(pt); - - Console.WriteLine("OVERLAY TOUCH: " + pt.X + ", " + pt.Y); - - }); - tapGestureRecognizer.CancelsTouchesInView = false; - tapGestureRecognizer.NumberOfTapsRequired = 1; - tapGestureRecognizer.NumberOfTouchesRequired = 1; - - overlayView.AddGestureRecognizer (tapGestureRecognizer);*/ + overlayView = new ZXingDefaultOverlayView(new CGRect(0, 0, Frame.Width, Frame.Height), + TopText, BottomText, CancelButtonText, FlashButtonText, + () => + { + var evt = OnCancelButtonPressed; + if (evt != null) + evt(); + }, ToggleTorch); + } + if (overlayView != null) + { overlayView.Frame = new CGRect(0, 0, this.Frame.Width, this.Frame.Height); overlayView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; } var total = DateTime.UtcNow - started; - Console.WriteLine ("ZXingScannerView.Setup() took {0} ms.", total.TotalMilliseconds); + Console.WriteLine("ZXingScannerView.Setup() took {0} ms.", total.TotalMilliseconds); } - - + + bool torch = false; bool analyzing = true; - - bool SetupCaptureSession () + + bool SetupCaptureSession() { var started = DateTime.UtcNow; - var availableResolutions = new List (); + var availableResolutions = new List(); var consideredResolutions = new Dictionary { - { AVCaptureSession.Preset352x288, new CameraResolution { Width = 352, Height = 288 } }, - { AVCaptureSession.PresetMedium, new CameraResolution { Width = 480, Height = 360 } }, //480x360 - { AVCaptureSession.Preset640x480, new CameraResolution { Width = 640, Height = 480 } }, + { AVCaptureSession.Preset352x288, new CameraResolution { Width = 352, Height = 288 } }, + { AVCaptureSession.PresetMedium, new CameraResolution { Width = 480, Height = 360 } }, //480x360 + { AVCaptureSession.Preset640x480, new CameraResolution { Width = 640, Height = 480 } }, { AVCaptureSession.Preset1280x720, new CameraResolution { Width = 1280, Height = 720 } }, { AVCaptureSession.Preset1920x1080, new CameraResolution { Width = 1920, Height = 1080 } } }; - + // configure the capture session for low resolution, change this if your code // can cope with more data or volume - session = new AVCaptureSession () { + session = new AVCaptureSession() + { SessionPreset = AVCaptureSession.Preset640x480 }; - + // create a device input and attach it to the session -// var captureDevice = AVCaptureDevice.DefaultDeviceWithMediaType (AVMediaType.Video); + // var captureDevice = AVCaptureDevice.DefaultDeviceWithMediaType (AVMediaType.Video); AVCaptureDevice captureDevice = null; var devices = AVCaptureDevice.DevicesWithMediaType(AVMediaType.Video); foreach (var device in devices) { captureDevice = device; if (ScanningOptions.UseFrontCameraIfAvailable.HasValue && - ScanningOptions.UseFrontCameraIfAvailable.Value && - device.Position == AVCaptureDevicePosition.Front) + ScanningOptions.UseFrontCameraIfAvailable.Value && + device.Position == AVCaptureDevicePosition.Front) break; //Front camera successfully set else if (device.Position == AVCaptureDevicePosition.Back && (!ScanningOptions.UseFrontCameraIfAvailable.HasValue || !ScanningOptions.UseFrontCameraIfAvailable.Value)) break; //Back camera succesfully set } - if (captureDevice == null){ - Console.WriteLine ("No captureDevice - this won't work on the simulator, try a physical device"); + if (captureDevice == null) + { + Console.WriteLine("No captureDevice - this won't work on the simulator, try a physical device"); if (overlayView != null) { - this.AddSubview (overlayView); - this.BringSubviewToFront (overlayView); + AddSubview(overlayView); + BringSubviewToFront(overlayView); } return false; } @@ -156,40 +143,43 @@ bool SetupCaptureSession () // Find resolution // Go through the resolutions we can even consider - foreach (var cr in consideredResolutions) { + foreach (var cr in consideredResolutions) + { // Now check to make sure our selected device supports the resolution // so we can add it to the list to pick from - if (captureDevice.SupportsAVCaptureSessionPreset (cr.Key)) - availableResolutions.Add (cr.Value); + if (captureDevice.SupportsAVCaptureSessionPreset(cr.Key)) + availableResolutions.Add(cr.Value); } - resolution = ScanningOptions.GetResolution (availableResolutions); + resolution = ScanningOptions.GetResolution(availableResolutions); // See if the user selected a resolution - if (resolution != null) { + if (resolution != null) + { // Now get the preset string from the resolution chosen var preset = (from c in consideredResolutions where c.Value.Width == resolution.Width && c.Value.Height == resolution.Height - select c.Key).FirstOrDefault (); + select c.Key).FirstOrDefault(); // If we found a matching preset, let's set it on the session if (!string.IsNullOrEmpty(preset)) session.SessionPreset = preset; } - var input = AVCaptureDeviceInput.FromDevice (captureDevice); - if (input == null){ - Console.WriteLine ("No input - this won't work on the simulator, try a physical device"); + var input = AVCaptureDeviceInput.FromDevice(captureDevice); + if (input == null) + { + Console.WriteLine("No input - this won't work on the simulator, try a physical device"); if (overlayView != null) { - this.AddSubview (overlayView); - this.BringSubviewToFront (overlayView); - } + AddSubview(overlayView); + BringSubviewToFront(overlayView); + } return false; } else - session.AddInput (input); + session.AddInput(input); var startedAVPreviewLayerAlloc = PerformanceCounter.Start(); @@ -198,69 +188,42 @@ bool SetupCaptureSession () PerformanceCounter.Stop(startedAVPreviewLayerAlloc, "Alloc AVCaptureVideoPreviewLayer took {0} ms."); + var perf2 = PerformanceCounter.Start(); - // //Framerate set here (15 fps) - // if (UIDevice.CurrentDevice.CheckSystemVersion (7, 0)) - // { - // var perf1 = PerformanceCounter.Start (); - - // NSError lockForConfigErr = null; - - // captureDevice.LockForConfiguration (out lockForConfigErr); - // if (lockForConfigErr == null) - // { - // captureDevice.ActiveVideoMinFrameDuration = new CMTime (1, 10); - // captureDevice.UnlockForConfiguration (); - // } - - // PerformanceCounter.Stop (perf1, "PERF: ActiveVideoMinFrameDuration Took {0} ms"); - // } - // else - // previewLayer.Connection.VideoMinFrameDuration = new CMTime(1, 10); - - - var perf2 = PerformanceCounter.Start (); - - #if __UNIFIED__ previewLayer.VideoGravity = AVLayerVideoGravity.ResizeAspectFill; - #else - previewLayer.LayerVideoGravity = AVLayerVideoGravity.ResizeAspectFill; - #endif - previewLayer.Frame = new CGRect(0, 0, this.Frame.Width, this.Frame.Height); - previewLayer.Position = new CGPoint(this.Layer.Bounds.Width / 2, (this.Layer.Bounds.Height / 2)); + previewLayer.Frame = new CGRect(0, 0, Frame.Width, Frame.Height); + previewLayer.Position = new CGPoint(Layer.Bounds.Width / 2, (Layer.Bounds.Height / 2)); - layerView = new UIView(new CGRect(0, 0, this.Frame.Width, this.Frame.Height)); + layerView = new UIView(new CGRect(0, 0, Frame.Width, Frame.Height)); layerView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; layerView.Layer.AddSublayer(previewLayer); - this.AddSubview(layerView); + AddSubview(layerView); ResizePreview(UIApplication.SharedApplication.StatusBarOrientation); if (overlayView != null) { - this.AddSubview (overlayView); - this.BringSubviewToFront (overlayView); - - //overlayView.LayoutSubviews (); + AddSubview(overlayView); + BringSubviewToFront(overlayView); } - PerformanceCounter.Stop (perf2, "PERF: Setting up layers took {0} ms"); + PerformanceCounter.Stop(perf2, "PERF: Setting up layers took {0} ms"); - var perf3 = PerformanceCounter.Start (); + var perf3 = PerformanceCounter.Start(); - session.StartRunning (); + session.StartRunning(); - PerformanceCounter.Stop (perf3, "PERF: session.StartRunning() took {0} ms"); + PerformanceCounter.Stop(perf3, "PERF: session.StartRunning() took {0} ms"); - var perf4 = PerformanceCounter.Start (); + var perf4 = PerformanceCounter.Start(); - var videoSettings = NSDictionary.FromObjectAndKey (new NSNumber ((int) CVPixelFormatType.CV32BGRA), + var videoSettings = NSDictionary.FromObjectAndKey(new NSNumber((int)CVPixelFormatType.CV32BGRA), CVPixelBuffer.PixelFormatTypeKey); - // create a VideoDataOutput and add it to the sesion - output = new AVCaptureVideoDataOutput { + output = new AVCaptureVideoDataOutput + { WeakVideoSettings = videoSettings }; @@ -269,7 +232,7 @@ bool SetupCaptureSession () var barcodeReader = ScanningOptions.BuildBarcodeReader(); - outputRecorder = new OutputRecorder (this, img => + outputRecorder = new OutputRecorder(this, img => { var ls = img; @@ -282,96 +245,95 @@ bool SetupCaptureSession () if (shouldRotatePreviewBuffer) ls = ls.rotateCounterClockwise(); - + var result = barcodeReader.Decode(ls); PerformanceCounter.Stop(perfDecode, "Decode Time: {0} ms"); - if (result != null) { + if (result != null) + { resultCallback(result); - return true; - } + return true; + } } catch (Exception ex) { Console.WriteLine("DECODE FAILED: " + ex); } - return false; + return false; }); output.AlwaysDiscardsLateVideoFrames = true; - output.SetSampleBufferDelegate (outputRecorder, queue); + output.SetSampleBufferDelegate(outputRecorder, queue); PerformanceCounter.Stop(perf4, "PERF: SetupCamera Finished. Took {0} ms."); - session.AddOutput (output); - //session.StartRunning (); + session.AddOutput(output); - - var perf5 = PerformanceCounter.Start (); + var perf5 = PerformanceCounter.Start(); NSError err = null; if (captureDevice.LockForConfiguration(out err)) { - if (ScanningOptions.DisableAutofocus) { + if (ScanningOptions.DisableAutofocus) + { captureDevice.FocusMode = AVCaptureFocusMode.Locked; - } else { + } + else + { if (captureDevice.IsFocusModeSupported(AVCaptureFocusMode.ContinuousAutoFocus)) captureDevice.FocusMode = AVCaptureFocusMode.ContinuousAutoFocus; else if (captureDevice.IsFocusModeSupported(AVCaptureFocusMode.AutoFocus)) captureDevice.FocusMode = AVCaptureFocusMode.AutoFocus; } - if (captureDevice.IsExposureModeSupported (AVCaptureExposureMode.ContinuousAutoExposure)) + if (captureDevice.IsExposureModeSupported(AVCaptureExposureMode.ContinuousAutoExposure)) captureDevice.ExposureMode = AVCaptureExposureMode.ContinuousAutoExposure; else if (captureDevice.IsExposureModeSupported(AVCaptureExposureMode.AutoExpose)) captureDevice.ExposureMode = AVCaptureExposureMode.AutoExpose; - if (captureDevice.IsWhiteBalanceModeSupported (AVCaptureWhiteBalanceMode.ContinuousAutoWhiteBalance)) + if (captureDevice.IsWhiteBalanceModeSupported(AVCaptureWhiteBalanceMode.ContinuousAutoWhiteBalance)) captureDevice.WhiteBalanceMode = AVCaptureWhiteBalanceMode.ContinuousAutoWhiteBalance; - else if (captureDevice.IsWhiteBalanceModeSupported (AVCaptureWhiteBalanceMode.AutoWhiteBalance)) - captureDevice.WhiteBalanceMode = AVCaptureWhiteBalanceMode.AutoWhiteBalance; + else if (captureDevice.IsWhiteBalanceModeSupported(AVCaptureWhiteBalanceMode.AutoWhiteBalance)) + captureDevice.WhiteBalanceMode = AVCaptureWhiteBalanceMode.AutoWhiteBalance; - if (UIDevice.CurrentDevice.CheckSystemVersion (7, 0) && captureDevice.AutoFocusRangeRestrictionSupported) + if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0) && captureDevice.AutoFocusRangeRestrictionSupported) captureDevice.AutoFocusRangeRestriction = AVCaptureAutoFocusRangeRestriction.Near; if (captureDevice.FocusPointOfInterestSupported) captureDevice.FocusPointOfInterest = new PointF(0.5f, 0.5f); if (captureDevice.ExposurePointOfInterestSupported) - captureDevice.ExposurePointOfInterest = new PointF (0.5f, 0.5f); + captureDevice.ExposurePointOfInterest = new PointF(0.5f, 0.5f); captureDevice.UnlockForConfiguration(); } else Console.WriteLine("Failed to Lock for Config: " + err.Description); - PerformanceCounter.Stop (perf5, "PERF: Setup Focus in {0} ms."); - + PerformanceCounter.Stop(perf5, "PERF: Setup Focus in {0} ms."); + return true; } public void DidRotate(UIInterfaceOrientation orientation) { - ResizePreview (orientation); + ResizePreview(orientation); - this.LayoutSubviews (); - - // if (overlayView != null) - // overlayView.LayoutSubviews (); + LayoutSubviews(); } - public void ResizePreview (UIInterfaceOrientation orientation) + public void ResizePreview(UIInterfaceOrientation orientation) { shouldRotatePreviewBuffer = orientation == UIInterfaceOrientation.Portrait || orientation == UIInterfaceOrientation.PortraitUpsideDown; if (previewLayer == null) return; - previewLayer.Frame = new CGRect (0, 0, this.Frame.Width, this.Frame.Height); + previewLayer.Frame = new CGRect(0, 0, Frame.Width, Frame.Height); - if (previewLayer.RespondsToSelector (new Selector ("connection")) && previewLayer.Connection != null) + if (previewLayer.RespondsToSelector(new Selector("connection")) && previewLayer.Connection != null) { switch (orientation) { @@ -420,81 +382,80 @@ public void Focus(PointF pointOfInterest) } } - public class OutputRecorder : AVCaptureVideoDataOutputSampleBufferDelegate + public class OutputRecorder : AVCaptureVideoDataOutputSampleBufferDelegate { - public OutputRecorder(IScannerSessionHost scannerHost, Func handleImage) : base() - { - HandleImage = handleImage; + public OutputRecorder(IScannerSessionHost scannerHost, Func handleImage) : base() + { + this.handleImage = handleImage; this.scannerHost = scannerHost; - } + } IScannerSessionHost scannerHost; - Func HandleImage; + Func handleImage; DateTime lastAnalysis = DateTime.MinValue; volatile bool working = false; - volatile bool wasScanned = false; + volatile bool wasScanned = false; - [Export ("captureOutput:didDropSampleBuffer:fromConnection:")] + [Export("captureOutput:didDropSampleBuffer:fromConnection:")] public override void DidDropSampleBuffer(AVCaptureOutput captureOutput, CMSampleBuffer sampleBuffer, AVCaptureConnection connection) { - //Console.WriteLine("Dropped Sample Buffer"); } public CancellationTokenSource CancelTokenSource = new CancellationTokenSource(); - public override void DidOutputSampleBuffer (AVCaptureOutput captureOutput, CMSampleBuffer sampleBuffer, AVCaptureConnection connection) + public override void DidOutputSampleBuffer(AVCaptureOutput captureOutput, CMSampleBuffer sampleBuffer, AVCaptureConnection connection) { - var msSinceLastPreview = (DateTime.UtcNow - lastAnalysis).TotalMilliseconds; - - if (msSinceLastPreview < scannerHost.ScanningOptions.DelayBetweenAnalyzingFrames - || (wasScanned && msSinceLastPreview < scannerHost.ScanningOptions.DelayBetweenContinuousScans) - || working - || CancelTokenSource.IsCancellationRequested) + var msSinceLastPreview = (DateTime.UtcNow - lastAnalysis).TotalMilliseconds; + + if (msSinceLastPreview < scannerHost.ScanningOptions.DelayBetweenAnalyzingFrames + || (wasScanned && msSinceLastPreview < scannerHost.ScanningOptions.DelayBetweenContinuousScans) + || working + || CancelTokenSource.IsCancellationRequested) { if (msSinceLastPreview < scannerHost.ScanningOptions.DelayBetweenAnalyzingFrames) Console.WriteLine("Too soon between frames"); if (wasScanned && msSinceLastPreview < scannerHost.ScanningOptions.DelayBetweenContinuousScans) Console.WriteLine("Too soon since last scan"); - + if (sampleBuffer != null) { - sampleBuffer.Dispose (); + sampleBuffer.Dispose(); sampleBuffer = null; } return; } - wasScanned = false; + wasScanned = false; working = true; lastAnalysis = DateTime.UtcNow; - try + try { - // Get the CoreVideo image - using (var pixelBuffer = sampleBuffer.GetImageBuffer() as CVPixelBuffer) - { - // Lock the base address - pixelBuffer.Lock(CVPixelBufferLock.ReadOnly); // MAYBE NEEDS READ/WRITE + // Get the CoreVideo image + using (var pixelBuffer = sampleBuffer.GetImageBuffer() as CVPixelBuffer) + { + // Lock the base address + pixelBuffer.Lock(CVPixelBufferLock.ReadOnly); // MAYBE NEEDS READ/WRITE - LuminanceSource luminanceSource; + LuminanceSource luminanceSource; - // Let's access the raw underlying data and create a luminance source from it - unsafe - { - var rawData = (byte*)pixelBuffer.BaseAddress.ToPointer(); - var rawDatalen = (int)(pixelBuffer.Height * pixelBuffer.Width * 4); //This drops 8 bytes from the original length to give us the expected length + // Let's access the raw underlying data and create a luminance source from it + unsafe + { + var rawData = (byte*)pixelBuffer.BaseAddress.ToPointer(); + var rawDatalen = (int)(pixelBuffer.Height * pixelBuffer.Width * 4); //This drops 8 bytes from the original length to give us the expected length - luminanceSource = new CVPixelBufferBGRA32LuminanceSource(rawData, rawDatalen, (int)pixelBuffer.Width, (int)pixelBuffer.Height); - } + luminanceSource = new CVPixelBufferBGRA32LuminanceSource(rawData, rawDatalen, (int)pixelBuffer.Width, (int)pixelBuffer.Height); + } - if (HandleImage(luminanceSource)) - wasScanned = true; + if (handleImage(luminanceSource)) + wasScanned = true; - pixelBuffer.Unlock(CVPixelBufferLock.ReadOnly); - } + pixelBuffer.Unlock(CVPixelBufferLock.ReadOnly); + } // // Although this looks innocent "Oh, he is just optimizing this case away" @@ -502,43 +463,45 @@ public override void DidOutputSampleBuffer (AVCaptureOutput captureOutput, CMSam // has a fixed number of buffers and if it runs out of free buffers, it will stop // delivering frames. // - sampleBuffer.Dispose (); + sampleBuffer.Dispose(); sampleBuffer = null; - } catch (Exception e){ - Console.WriteLine (e); } - finally - { - working = false; - } + catch (Exception e) + { + Console.WriteLine(e); + } + finally + { + working = false; + } } } - + #region IZXingScanner implementation - public void StartScanning (Action scanResultHandler, MobileBarcodeScanningOptions options = null) + public void StartScanning(Action scanResultHandler, MobileBarcodeScanningOptions options = null) { if (!stopped) return; stopped = false; - var perf = PerformanceCounter.Start (); + var perf = PerformanceCounter.Start(); - Setup (this.Frame); + Setup(Frame); - this.ScanningOptions = options ?? MobileBarcodeScanningOptions.Default; - this.resultCallback = scanResultHandler; + ScanningOptions = options ?? MobileBarcodeScanningOptions.Default; + resultCallback = scanResultHandler; Console.WriteLine("StartScanning"); - this.InvokeOnMainThread(() => { + InvokeOnMainThread(() => + { if (!SetupCaptureSession()) { //Setup 'simulated' view: Console.WriteLine("Capture Session FAILED"); - } if (Runtime.Arch == Arch.SIMULATOR) @@ -546,7 +509,7 @@ public void StartScanning (Action scanResultHandler, MobileBarcodeScanni var simView = new UIView(new CGRect(0, 0, this.Frame.Width, this.Frame.Height)); simView.BackgroundColor = UIColor.LightGray; simView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; - this.InsertSubview(simView, 0); + InsertSubview(simView, 0); } }); @@ -556,20 +519,19 @@ public void StartScanning (Action scanResultHandler, MobileBarcodeScanni PerformanceCounter.Stop(perf, "PERF: StartScanning() Took {0} ms."); - var evt = this.OnScannerSetupComplete; - if (evt != null) - evt (); + OnScannerSetupComplete?.Invoke(); } - + public void StopScanning() { - if (overlayView != null) { + if (overlayView != null) + { if (overlayView is ZXingDefaultOverlayView) - (overlayView as ZXingDefaultOverlayView).Destroy (); + (overlayView as ZXingDefaultOverlayView).Destroy(); overlayView = null; } - + if (stopped) return; @@ -577,12 +539,12 @@ public void StopScanning() if (outputRecorder != null) outputRecorder.CancelTokenSource.Cancel(); - + //Try removing all existing outputs prior to closing the session try { while (session.Outputs.Length > 0) - session.RemoveOutput (session.Outputs [0]); + session.RemoveOutput(session.Outputs[0]); } catch { } @@ -590,7 +552,7 @@ public void StopScanning() try { while (session.Inputs.Length > 0) - session.RemoveInput (session.Inputs [0]); + session.RemoveInput(session.Inputs[0]); } catch { } @@ -600,17 +562,13 @@ public void StopScanning() stopped = true; } - public void PauseAnalysis () - { - analyzing = false; - } + public void PauseAnalysis() + => analyzing = false; - public void ResumeAnalysis () - { - analyzing = true; - } + public void ResumeAnalysis() + => analyzing = true; - public void Torch (bool on) + public void Torch(bool on) { try { @@ -618,27 +576,28 @@ public void Torch (bool on) var device = AVCaptureDevice.DefaultDeviceWithMediaType(AVMediaType.Video); - if (device.HasTorch || device.HasFlash) { - - device.LockForConfiguration(out err); - - if (on) - { - if (device.HasTorch) - device.TorchMode = AVCaptureTorchMode.On; - if (device.HasFlash) - device.FlashMode = AVCaptureFlashMode.On; - } - else - { - if (device.HasTorch) - device.TorchMode = AVCaptureTorchMode.Off; - if (device.HasFlash) - device.FlashMode = AVCaptureFlashMode.Off; - } - - device.UnlockForConfiguration(); - } + if (device.HasTorch || device.HasFlash) + { + + device.LockForConfiguration(out err); + + if (on) + { + if (device.HasTorch) + device.TorchMode = AVCaptureTorchMode.On; + if (device.HasFlash) + device.FlashMode = AVCaptureFlashMode.On; + } + else + { + if (device.HasTorch) + device.TorchMode = AVCaptureTorchMode.Off; + if (device.HasFlash) + device.FlashMode = AVCaptureFlashMode.Off; + } + + device.UnlockForConfiguration(); + } device = null; @@ -648,22 +607,20 @@ public void Torch (bool on) } public void ToggleTorch() + => Torch(!IsTorchOn); + + public void AutoFocus() { - Torch(!IsTorchOn); + //Doesn't do much on iOS :( } - public void AutoFocus () + public void AutoFocus(int x, int y) { //Doesn't do much on iOS :( } - public void AutoFocus (int x, int y) - { - //Doesn't do much on iOS :( - } - - public string TopText { get;set; } - public string BottomText { get;set; } + public string TopText { get; set; } + public string BottomText { get; set; } public UIView CustomOverlayView { get; set; } @@ -671,17 +628,19 @@ public void AutoFocus (int x, int y) public bool IsAnalyzing { get { return analyzing; } } public bool IsTorchOn { get { return torch; } } - bool? hasTorch = null; - public bool HasTorch { - get { - if (hasTorch.HasValue) - return hasTorch.Value; - - var device = AVCaptureDevice.DefaultDeviceWithMediaType(AVMediaType.Video); - hasTorch = device.HasFlash || device.HasTorch; - return hasTorch.Value; - } - } + bool? hasTorch = null; + public bool HasTorch + { + get + { + if (hasTorch.HasValue) + return hasTorch.Value; + + var device = AVCaptureDevice.DefaultDeviceWithMediaType(AVMediaType.Video); + hasTorch = device.HasFlash || device.HasTorch; + return hasTorch.Value; + } + } #endregion } } diff --git a/ZXing.Net.Mobile/iOS/ZXingScannerViewController.ios.cs b/ZXing.Net.Mobile/iOS/ZXingScannerViewController.ios.cs new file mode 100644 index 000000000..776709b41 --- /dev/null +++ b/ZXing.Net.Mobile/iOS/ZXingScannerViewController.ios.cs @@ -0,0 +1,188 @@ +using System; +using System.Text; +using System.Collections.Generic; +using System.Threading.Tasks; + +using UIKit; +using Foundation; +using AVFoundation; +using CoreGraphics; + +using ZXing; + +namespace ZXing.Mobile +{ + public class ZXingScannerViewController : UIViewController, IScannerViewController + { + ZXingScannerView scannerView; + + public event Action OnScannedResult; + + public MobileBarcodeScanningOptions ScanningOptions { get; set; } + public MobileBarcodeScanner Scanner { get; set; } + public bool ContinuousScanning { get; set; } + + UIActivityIndicatorView loadingView; + UIView loadingBg; + + public UIView CustomLoadingView { get; set; } + + public ZXingScannerViewController(MobileBarcodeScanningOptions options, MobileBarcodeScanner scanner) + { + ScanningOptions = options; + Scanner = scanner; + + var appFrame = UIScreen.MainScreen.ApplicationFrame; + + View.Frame = new CGRect(0, 0, appFrame.Width, appFrame.Height); + View.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; + + if (UIDevice.CurrentDevice.CheckSystemVersion(13, 0)) + ModalPresentationStyle = UIModalPresentationStyle.FullScreen; + } + + public UIViewController AsViewController() + => this; + + public void Cancel() + => InvokeOnMainThread(scannerView.StopScanning); + + UIStatusBarStyle originalStatusBarStyle = UIStatusBarStyle.Default; + + public override void ViewDidLoad() + { + loadingBg = new UIView(View.Frame) { BackgroundColor = UIColor.Black, AutoresizingMask = UIViewAutoresizing.FlexibleDimensions }; + loadingView = new UIActivityIndicatorView(UIActivityIndicatorViewStyle.WhiteLarge) + { + AutoresizingMask = UIViewAutoresizing.FlexibleMargins + }; + loadingView.Frame = new CGRect((View.Frame.Width - loadingView.Frame.Width) / 2, + (View.Frame.Height - loadingView.Frame.Height) / 2, + loadingView.Frame.Width, + loadingView.Frame.Height); + + loadingBg.AddSubview(loadingView); + View.AddSubview(loadingBg); + loadingView.StartAnimating(); + + scannerView = new ZXingScannerView(new CGRect(0, 0, View.Frame.Width, View.Frame.Height)) + { + AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight, + UseCustomOverlayView = Scanner.UseCustomOverlay, + CustomOverlayView = Scanner.CustomOverlay, + TopText = Scanner.TopText, + BottomText = Scanner.BottomText, + CancelButtonText = Scanner.CancelButtonText, + FlashButtonText = Scanner.FlashButtonText + }; + scannerView.OnCancelButtonPressed += delegate + { + Scanner.Cancel(); + }; + + //this.View.AddSubview(scannerView); + View.InsertSubviewBelow(scannerView, loadingView); + + View.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight; + + if (UIDevice.CurrentDevice.CheckSystemVersion(13, 0)) + { + if (UIApplication.SharedApplication.KeyWindow != null) + OverrideUserInterfaceStyle = UIApplication.SharedApplication.KeyWindow.RootViewController.OverrideUserInterfaceStyle; + } + } + + public void Torch(bool on) + => scannerView?.Torch(on); + + public void ToggleTorch() + => scannerView?.ToggleTorch(); + + public void PauseAnalysis() + => scannerView?.PauseAnalysis(); + + public void ResumeAnalysis() + => scannerView?.ResumeAnalysis(); + + public bool IsTorchOn + => scannerView?.IsTorchOn ?? false; + + public override void ViewDidAppear(bool animated) + { + scannerView.OnScannerSetupComplete += HandleOnScannerSetupComplete; + + originalStatusBarStyle = UIApplication.SharedApplication.StatusBarStyle; + + if (UIDevice.CurrentDevice.CheckSystemVersion(7, 0)) + { + UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.Default; + SetNeedsStatusBarAppearanceUpdate(); + } + else + UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.BlackTranslucent, false); + + Console.WriteLine("Starting to scan..."); + + Task.Factory.StartNew(() => + { + BeginInvokeOnMainThread(() => scannerView.StartScanning(result => + { + + if (!ContinuousScanning) + { + Console.WriteLine("Stopping scan..."); + scannerView.StopScanning(); + } + + OnScannedResult?.Invoke(result); + + }, ScanningOptions)); + }); + } + + public override void ViewDidDisappear(bool animated) + { + scannerView?.StopScanning(); + + scannerView.OnScannerSetupComplete -= HandleOnScannerSetupComplete; + } + + public override void ViewWillDisappear(bool animated) + => UIApplication.SharedApplication.SetStatusBarStyle(originalStatusBarStyle, false); + + public override void DidRotate(UIInterfaceOrientation fromInterfaceOrientation) + => scannerView?.DidRotate(this.InterfaceOrientation); + + public override bool ShouldAutorotate() + => ScanningOptions?.AutoRotate ?? false; + + public override UIInterfaceOrientationMask GetSupportedInterfaceOrientations() + => UIInterfaceOrientationMask.All; + + [Obsolete("Deprecated in iOS6. Replace it with both GetSupportedInterfaceOrientations and PreferredInterfaceOrientationForPresentation")] + public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation toInterfaceOrientation) + => ScanningOptions?.AutoRotate ?? false; + + void HandleOnScannerSetupComplete() + => BeginInvokeOnMainThread(() => + { + if (loadingView != null && loadingBg != null && loadingView.IsAnimating) + { + loadingView.StopAnimating(); + + UIView.BeginAnimations("zoomout"); + + UIView.SetAnimationDuration(2.0f); + UIView.SetAnimationCurve(UIViewAnimationCurve.EaseOut); + + loadingBg.Transform = CGAffineTransform.MakeScale(2.0f, 2.0f); + loadingBg.Alpha = 0.0f; + + UIView.CommitAnimations(); + + + loadingBg.RemoveFromSuperview(); + } + }); + } +} diff --git a/ZXing.Net/zxing.dll b/ZXing.Net/zxing.dll new file mode 100644 index 000000000..f33adb199 Binary files /dev/null and b/ZXing.Net/zxing.dll differ diff --git a/ZXing.Net/zxing.pdb b/ZXing.Net/zxing.pdb new file mode 100644 index 000000000..4f18f3123 Binary files /dev/null and b/ZXing.Net/zxing.pdb differ diff --git a/ZXing.Net/zxing.xml b/ZXing.Net/zxing.xml new file mode 100644 index 000000000..20e11447c --- /dev/null +++ b/ZXing.Net/zxing.xml @@ -0,0 +1,10863 @@ + + + + zxing + + + + + Interface for a class to convert a BitMatrix to an output image format + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + + + + + Renders the specified matrix to its graphically representation + + The matrix. + The format. + The encoded content of the barcode which should be included in the image. + That can be the numbers below a 1D barcode or something other. + The options. + + + + + represents the generated code as a byte array with pixel data (4 byte per pixel, BGRA) + + + + + the generated code as byte array of BGRA pixels + + + + + the width of the image + + + + + the height of the image + + + + + Renders a to an byte array with pixel data (4 byte per pixel, BGRA) + + + + + represents a color defined as ARGB byte data + + + + + the color black + + + + + the color white + + + + + value of the alpha channel + + + + + value of the red channel + + + + + value of the green channel + + + + + value of the blue channel + + + + + Initializes a new instance of the struct. + + + + + Gets or sets the foreground color. + + + The foreground color. + + + + + Gets or sets the background color. + + + The background color. + + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Renders a barcode into a Svg image + + + + + represents a color value + + + + + color black + + + + + color white + + + + + alpha channel + + + + + red channel + + + + + green channel + + + + + blur channel + + + + + initializing constructor + + + + + initializing constructor + + + + + Gets or sets the foreground color. + + The foreground color. + + + + Gets or sets the background color. + + The background color. + + + + Gets or sets the font family name + + The font family name. + + + + Gets or sets the font size in pixel + + The font size in pixel. + + + + Initializes a new instance of the class. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + + + + + Renders the specified matrix. + + The matrix. + The format. + The content. + The options. + + + + + Represents a barcode as a Svg image + + + + + Gets or sets the content. + + + The content. + + + + + The original height of the bitmatrix for the barcode + + + + + The original width of the bitmatrix for the barcode + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The content. + + + + Gives the XML representation of the SVG image + + + + + Enumerates barcode formats known to this package. + + Sean Owen + + + Aztec 2D barcode format. + + + CODABAR 1D format. + + + Code 39 1D format. + + + Code 93 1D format. + + + Code 128 1D format. + + + Data Matrix 2D barcode format. + + + EAN-8 1D format. + + + EAN-13 1D format. + + + ITF (Interleaved Two of Five) 1D format. + + + MaxiCode 2D barcode format. + + + PDF417 format. + + + QR Code 2D barcode format. + + + RSS 14 + + + RSS EXPANDED + + + UPC-A 1D format. + + + UPC-E 1D format. + + + UPC/EAN extension format. Not a stand-alone format. + + + MSI + + + Plessey + + + Intelligent Mail barcode + + + Pharmacode format. + + + + UPC_A | UPC_E | EAN_13 | EAN_8 | CODABAR | CODE_39 | CODE_93 | CODE_128 | ITF | RSS_14 | RSS_EXPANDED + without MSI (to many false-positives) and IMB (not enough tested, and it looks more like a 2D) + + + + + A smart class to decode the barcode inside a bitmap object or byte array with raw pixel color values + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + A smart class to decode the barcode inside a bitmap object + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a luminance source object for a bitmap. + If null, an exception is thrown when Decode is called + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Constructor for additional image formats for one BarcodeReader class + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb raw byte array. + + + + Optional: Gets or sets the function to create a luminance source object for a bitmap. + If null a platform specific default LuminanceSource is used + + + The function to create a luminance source object. + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + A smart class to decode the barcode inside a bitmap object + + + + + represents the default function which is called to get a instance from a raw byte array + + + + + Gets or sets the options. + + + The options. + + + + + Gets the reader which should be used to find and decode the barcode. + + + The reader. + + + + + Gets or sets a method which is called if an important point is found + + + The result point callback. + + + + + event is executed if a result was found via decode + + + + + Gets or sets a value indicating whether the image should be automatically rotated. + Rotation is supported for 90, 180 and 270 degrees + + + true if image should be rotated; otherwise, false. + + + + + Gets or sets a value indicating whether the image should be automatically inverted + if no result is found in the original image. + ATTENTION: Please be carefully because it slows down the decoding process if it is used + + + true if image should be inverted; otherwise, false. + + + + + Optional: Gets or sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + + + The function to create a binarizer object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Sets the reader which should be used to find and decode the barcode. + If null then MultiFormatReader is used + Sets the function to create a binarizer object for a luminance source. + If null then HybridBinarizer is used + Sets the function to create a luminance source object for a rgb array. + If null the RGBLuminanceSource is used. The handler is only called when Decode with a byte[] array is called. + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + raises the ResultFound event + + + + + + raises the ResultFound event + + + + + + calls the explicitResultPointFound action + + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + Decodes the specified barcode bitmap. + + The image as byte[] array. + The width. + The height. + The format. + + the result data or null + + + + + A smart class to encode some content to raw pixel data + + + + + Initializes a new instance of the class. + + + + + A smart class to encode some content to a svg barcode image + + + + + Initializes a new instance of the class. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + The type of the output. + + + + Gets or sets the renderer which should be used to render the encoded BitMatrix. + + + + + Encodes the specified contents and returns a rendered instance of the barcode. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + For rendering the instance of the property Renderer is used and has to be set before + calling that method. + + The matrix. + + + + + A base class for specific barcode writers with specific formats of barcode images. + + + + + Gets or sets the barcode format. + The value is only suitable if the MultiFormatWriter is used. + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + + + + + + + + + + + + Encodes the specified contents and returns a BitMatrix array. + That array has to be rendered manually or with a IBarcodeRenderer. + + The contents. + + + + + The base class for luminance sources which supports + cropping and rotating based upon the luminance values. + + + + + weight of the red channel for calculating a gray scale image + + + + + weight of the green channel for calculating a gray scale image + + + + + weight of the blue channel for calculating a gray scale image + + + + + numbers of bits which for right shifting + + + + + + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + + The luminance array. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + gets the luminance matrix + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + TODO: not implemented yet + + + A rotated version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports cropping. + + + + + Whether this subclass supports invertion. + + + + Inverts the luminance values (newValue = 255 - oldValue) + + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + This class hierarchy provides a set of methods to convert luminance data to 1 bit data. + It allows the algorithm to vary polymorphically, for example allowing a very expensive + thresholding technique for servers and a fast one for mobile. It also permits the implementation + to vary, e.g. a JNI version for Android and a Java fallback version for other platforms. + + dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The source. + + + + Gets the luminance source object. + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + For callers which only examine one row of pixels at a time, the same BitArray should be reused + and passed in with each call for performance. However it is legal to keep more than one row + at a time if needed. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + A new concrete Binarizer implementation object. + + + + Gets the width of the luminance source object. + + + + + Gets the height of the luminance source object. + + + + + This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects + accept a BinaryBitmap and attempt to decode it. + + dswitkin@google.com (Daniel Switkin) + + + + + + + + + + The width of the bitmap. + + + + + The height of the bitmap. + + + + + Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + cached data. Callers should assume this method is expensive and call it as seldom as possible. + This method is intended for decoding 1D barcodes and may choose to apply sharpening. + + The row to fetch, which must be in [0, bitmap height). + An optional preallocated array. If null or too small, it will be ignored. + If used, the Binarizer will call BitArray.clear(). Always use the returned object. + + The array of bits for this row (true means black). + + + + Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + may not apply sharpening. Therefore, a row from this matrix may not be identical to one + fetched using getBlackRow(), so don't mix and match between them. + + The 2D array of bits for the image (true means black). + + + + Whether this bitmap can be cropped. + + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if isCropSupported() is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + + Whether this bitmap supports counter-clockwise rotation. + + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Encapsulates a type of hint that a caller may pass to a barcode reader to help it + more quickly or accurately decode it. It is up to implementations to decide what, + if anything, to do with the information that is supplied. + + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Unspecified, application-specific hint. Maps to an unspecified . + + + + + Image is a pure monochrome image of a barcode. Doesn't matter what it maps to; + use = true. + + + + + Image is known to be of one of a few possible formats. + Maps to a of s. + + + + + Spend more time to try to find a barcode; optimize for accuracy, not speed. + Doesn't matter what it maps to; use = true. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + + + The caller needs to be notified via callback when a possible + is found. Maps to a . + + + + + Assume MSI codes employ a check digit. Maps to . + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + Maps to . + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + 1D readers supporting rotation with TRY_HARDER enabled. + But BarcodeReader class can do auto-rotating for 1D and 2D codes. + Enabling that option prevents 1D readers doing double rotation. + BarcodeReader enables that option automatically if "global" auto-rotation is enabled. + Maps to . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to; + use . + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Simply encapsulates a width and height. + + + + + initializing constructor + + + + + + + the width + + + + + the height + + + + + + + + + + + + + + + + + + + + + + + + These are a set of hints that you may pass to Writers to specify their behavior. + + dswitkin@google.com (Daniel Switkin) + + + + Specifies the width of the barcode image + type: + + + + + Specifies the height of the barcode image + type: + + + + + Don't put the content string into the output image. + type: + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + + For Aztec it is of type , representing the minimal percentage of error correction words. + In all cases, it can also be a representation of the desired value as well. + Note: an Aztec symbol should have a minimum of 25% EC words. + For PDF417 it is of type or (between 0 and 8), + + + + + Specifies what character encoding to use where applicable. + type: + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + type: , or representation of the integer value + + + + + Specifies the aspect ratio to use. Default is 4. + type: , or 1-4. + + + + + Specifies the desired aspect ratio (number of columns / number of rows) of the output image. Default is 3. + type: . + + + + + Specifies whether to use compact mode for PDF417 + type: , or "true" or "false" + value + + + + + Specifies what compaction mode to use for PDF417. + type: or value of one of its + enum values + + + + + Specifies the minimum and maximum number of rows and columns for PDF417. + type: + + + + + Don't append ECI segment. + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + type: + + + + + Specifies the matrix shape for Data Matrix (type ) + + + + + Specifies a minimum barcode size (type ). Only applicable to Data Matrix now. + + + + + Specifies a maximum barcode size (type ). Only applicable to Data Matrix now. + + + + + if true, don't switch to codeset C for numbers + + + + + Specifies the default encodation for Data Matrix (type ) + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + Specifies the required number of layers for an Aztec code. + A negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + type: , or representation of the integer value + + + + + Specifies the exact version of QR code to be encoded. + (Type , or representation of the integer value). + + + + + Specifies whether the data should be encoded to the GS1 standard + type: , or "true" or "false" + value + + + + + Specifies the QR code mask pattern to be used. Allowed values are + 0..QRCode.NUM_MASK_PATTERNS-1. By default the code will automatically select + the optimal mask pattern. + (Type , or representation of the integer value). + + + + + Thrown when a barcode was successfully detected, but some aspect of + the content did not conform to the barcode's format rules. This could have + been due to a mis-detection. + Sean Owen + + + + + + + + + + + + + + + + + + + + + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The image as RGB24 array. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Decodes the specified barcode bitmap. + + The barcode bitmap. + the result data or null + + + + Interface for a smart class to decode the barcode inside a bitmap object + + + Interface for a smart class to decode multiple barcodes inside a bitmap object + + + + + event is executed when a result point was found + + + + + event is executed when a result was found via decode + + + + + Specifies some options which influence the decoding process + + + + + Decodes the specified barcode bitmap which is given by a generic byte array. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode a barcode within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Decodes the specified barcode bitmap which is given by a generic byte array with the order RGB24. + + The barcode bitmap. + The width. + The height. + The format. + + the result data or null + + + + + Tries to decode barcodes within an image which is given by a luminance source. + That method gives a chance to prepare a luminance source completely before calling + the time consuming decoding method. On the other hand there is a chance to create + a luminance source which is independent from external resources (like Bitmap objects) + and the decoding call can be made in a background thread. + + The luminance source. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Creates a visual representation of the contents + + The contents. + + + + + Returns a rendered instance of the barcode which is given by a BitMatrix. + + The matrix. + + + + + Interface for a smart class to encode some content into a barcode + + + + + Get or sets the barcode format which should be generated + (only suitable if MultiFormatWriter is used for property Encoder which is the default) + + + + + Gets or sets the options container for the encoding and renderer process. + + + + + Gets or sets the writer which encodes the content to a BitMatrix. + If no value is set the MultiFormatWriter is used. + + + + + Encodes the specified contents. + + The contents. + + + + + A wrapper implementation of {@link LuminanceSource} which inverts the luminances it returns -- black becomes + white and vice versa, and each value becomes (255-value). + + Sean Owen + + + + Initializes a new instance of the class. + + The @delegate. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff; + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + + Whether this subclass supports counter-clockwise rotation. + + + + Inverts this instance. + + original delegate {@link LuminanceSource} since invert undoes itself + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if {@link #isRotateSupported()} is true. + + + A rotated version of this object. + + + + + The purpose of this class hierarchy is to abstract different bitmap implementations across + platforms into a standard interface for requesting greyscale luminance values. The interface + only provides immutable methods; therefore crop and rotation create copies. This is to ensure + that one Reader does not modify the original luminance source and leave it in an unknown state + for other Readers in the chain. + + dswitkin@google.com (Daniel Switkin) + + + + initializing constructor + + + + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, which must be in [0, bitmap height) + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + Fetches luminance data for the underlying bitmap. Values should be fetched using: + int luminance = array[y * width + x] & 0xff + + + A row-major 2D array of luminance values. Do not use result.length as it may be + larger than width * height bytes on some platforms. Do not modify the contents + of the result. + + + + The width of the bitmap. + + + The height of the bitmap. + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, which must be in [0, Width) + The top coordinate, which must be in [0, Height) + The width of the rectangle to crop. + The height of the rectangle to crop. + A cropped version of this object. + + + Whether this subclass supports counter-clockwise rotation. + + + + Returns a new object with rotated image data by 90 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + Returns a new object with rotated image data by 45 degrees counterclockwise. + Only callable if is true. + + A rotated version of this object. + + + + + Whether this subclass supports invertion. + + + + inverts the luminance values, not supported here. has to implemented in sub classes + + + + + + + + + + + + MultiFormatReader is a convenience class and the main entry point into the library for most uses. + By default it attempts to decode all barcode formats that the library supports. Optionally, you + can provide a hints object to request different behavior, for example only decoding QR codes. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + This version of decode honors the intent of Reader.decode(BinaryBitmap) in that it + passes null as a hint to the decoders. However, that makes it inefficient to call repeatedly. + Use setHints() followed by decodeWithState() for continuous scan applications. + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the hints provided. Does not honor existing state. + + + The pixel data to decode + + The hints to use, clearing the previous state. + + The contents of the image + + ReaderException Any errors which occurred + + + Decode an image using the state set up by calling setHints() previously. Continuous scan + clients will get a large speed increase by using this instead of decode(). + + + The pixel data to decode + + The contents of the image + + ReaderException Any errors which occurred + + + This method adds state to the MultiFormatReader. By setting the hints once, subsequent calls + to decodeWithState(image) can reuse the same set of readers without reallocating memory. This + is important for performance in continuous scan clients. + + + + + + resets all specific readers + + + + This is a factory class which finds the appropriate Writer subclass for the BarcodeFormat + requested and encodes the barcode with the supplied contents. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Gets the collection of supported writers. + + + + + encode the given data + + + + + + + + + + encode the given data + + + + + + + + + + + This object extends LuminanceSource around an array of YUV data returned from the camera driver, + with the option to crop to a rectangle within the full data. This can be used to exclude + superfluous pixels around the perimeter and speed up decoding. + It works for any pixel format where the Y channel is planar and appears first, including + YCbCr_420_SP and YCbCr_422_SP. + @author dswitkin@google.com (Daniel Switkin) + + + + + Initializes a new instance of the class. + + The yuv data. + Width of the data. + Height of the data. + The left. + The top. + The width. + The height. + if set to true [reverse horiz]. + + + + Initializes a new instance of the class. + + The luminances. + The width. + The height. + + + + Fetches one row of luminance data from the underlying platform's bitmap. Values range from + 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + to bitwise and with 0xff for each value. It is preferable for implementations of this method + to only fetch this row rather than the whole image, since no 2D Readers may be installed and + getMatrix() may never be called. + + The row to fetch, 0 <= y < Height. + An optional preallocated array. If null or too small, it will be ignored. + Always use the returned object, and ignore the .length of the array. + + An array containing the luminance data. + + + + + + + + + + + Whether this subclass supports cropping. + + + + Returns a new object with cropped image data. Implementations may keep a reference to the + original data rather than a copy. Only callable if CropSupported is true. + + The left coordinate, 0 <= left < Width. + The top coordinate, 0 <= top <= Height. + The width of the rectangle to crop. + The height of the rectangle to crop. + + A cropped version of this object. + + + + + Renders the cropped greyscale bitmap. + + + + + + width of image from {@link #renderThumbnail()} + + + + + height of image from {@link #renderThumbnail()} + + + + + creates a new instance + + + + + + + + + Implementations of this interface can decode an image of a barcode in some format into + the String it encodes. For example, can + decode a QR code. The decoder may optionally receive hints from the caller which may help + it decode more quickly or accurately. + + See , which attempts to determine what barcode + format is present within the image as well, and then decodes it accordingly. + + Sean Owen + dswitkin@google.com (Daniel Switkin) + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + String which the barcode encodes + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + The general exception class throw when something goes wrong during decoding of a barcode. + This includes, but is not limited to, failing checksums / error correction algorithms, being + unable to locate finder timing patterns, and so on. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class. + + The inner exception. + + + + Initializes a new instance of the class. + + The inner exception. + + + + + Encapsulates the result of decoding a barcode within an image. + + + + raw text encoded by the barcode, if applicable, otherwise null + + + raw bytes encoded by the barcode, if applicable, otherwise null + + + + points related to the barcode in the image. These are typically points + identifying finder patterns or the corners of the barcode. The exact meaning is + specific to the type of barcode that was decoded. + + + + {@link BarcodeFormat} representing the format of the barcode that was decoded + + + + {@link Hashtable} mapping {@link ResultMetadataType} keys to values. May be + null. This contains optional metadata about what was detected about the barcode, + like orientation. + + + + + Gets the timestamp. + + + + + how many bits of are valid; typically 8 times its length + + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + The result points. + The format. + The timestamp. + + + + Initializes a new instance of the class. + + The text. + The raw bytes. + + The result points. + The format. + The timestamp. + + + + Adds one metadata to the result + + The type. + The value. + + + + Adds a list of metadata to the result + + The metadata. + + + + Adds the result points. + + The new points. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Represents some type of metadata about the result of the decoding that the decoder + wishes to communicate back to the caller. + + Sean Owen + + + + Unspecified, application-specific metadata. Maps to an unspecified {@link Object}. + + + + + Denotes the likely approximate orientation of the barcode in the image. This value + is given as degrees rotated clockwise from the normal, upright orientation. + For example a 1D barcode which was found by reading top-to-bottom would be + said to have orientation "90". This key maps to an {@link Integer} whose + value is in the range [0,360). + + + + +

2D barcode formats typically encode text, but allow for a sort of 'byte mode' + which is sometimes used to encode binary data. While {@link Result} makes available + the complete raw bytes in the barcode for these formats, it does not offer the bytes + from the byte segments alone.

+

This maps to a {@link java.util.List} of byte arrays corresponding to the + raw bytes in the byte segments in the barcode, in order.

+
+
+ + + Error correction level used, if applicable. The value type depends on the + format, but is typically a String. + + + + + For some periodicals, indicates the issue number as an {@link Integer}. + + + + + For some products, indicates the suggested retail price in the barcode as a + formatted {@link String}. + + + + + For some products, the possible country of manufacture as a {@link String} denoting the + ISO country code. Some map to multiple possible countries, like "US/CA". + + + + + For some products, the extension text + + + + + If the code format supports structured append and + the current scanned code is part of one then the + sequence number is given with it. + + + + + If the code format supports structured append and + the current scanned code is part of one then the + parity is given with it. + + + + + PDF417-specific metadata + + + + + Aztec-specific metadata + + + + + Encapsulates a point of interest in an image containing a barcode. Typically, this + would be the location of a finder pattern or the corner of the barcode, for example. + + Sean Owen + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The x. + The y. + + + + Gets the X. + + + + + Gets the Y. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC and + BC is less than AC and the angle between BC and BA is less than 180 degrees. + + array of three to order + + + + calculates the distance between two points + + first pattern + second pattern + + distance between two points + + + + + Returns the z component of the cross product between vectors BC and BA. + + + + Callback which is invoked when a possible result point (significant + point in the barcode image such as a corner) is found. + + + + + + + + Luminance source class which support different formats of images. + + + + + enumeration of supported bitmap format which the RGBLuminanceSource can process + + + + + format of the byte[] isn't known. RGBLuminanceSource tries to determine the best possible value + + + + + grayscale array, the byte array is a luminance array with 1 byte per pixel + + + + + grayscale array, the byte array is a luminance array with 2 bytes per pixel + + + + + 3 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels red, green and blue + + + + + 4 bytes per pixel with the channels alpha, red, green and blue + + + + + 3 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green and red + + + + + 4 bytes per pixel with the channels blue, green, red and alpha + + + + + 2 bytes per pixel, 5 bit red, 6 bits green and 5 bits blue + + + + + 4 bytes per pixel with the channels red, green, blue and alpha + + + + + 4 bytes for two pixels, UYVY formatted + + + + + 4 bytes for two pixels, YUYV formatted + + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + + + + Initializes a new instance of the class. + It supports a byte array with 1 byte per pixel (Gray8). + That means the whole array consists of the luminance values (grayscale). + + The luminance array. + The width. + The height. + if set to true [is8 bit]. + + + + Initializes a new instance of the class. + It supports a byte array with 3 bytes per pixel (RGB24). + + The RGB raw bytes. + The width. + The height. + The bitmap format. + + + + Should create a new luminance source with the right class type. + The method is used in methods crop and rotate. + + The new luminances. + The width. + The height. + + + + + calculates the luminance values for the given byte array and bitmap format + + + + + + + Contains conversion support elements such as classes, interfaces and static methods. + + + + + Copies an array of chars obtained from a String into a specified array of chars + + The String to get the chars from + Position of the String to start getting the chars + Position of the String to end getting the chars + Array to return the chars + Position of the destination array of chars to start storing the chars + An array of chars + + + + Sets the capacity for the specified List + + The List which capacity will be set + The new capacity value + + + + Converts a string-Collection to an array + + The strings. + + + + + Joins all elements to one string. + + + The separator. + The values. + + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The value. + + + + Fills the specified array. + (can't use extension method because of .Net 2.0 support) + + + The array. + The start index. + The end index. + The value. + + + + + + + + + + + + + + + + + + Savely gets the value of a decoding hint + if hints is null the default is returned + + + The hints. + Type of the hint. + The @default. + + + + The base class for all objects which encode/generate a barcode image. + + + dswitkin@google.com (Daniel Switkin) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + A base class which covers the range of exceptions which may occur when encoding a barcode using + the Writer framework. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exc. + + + + Extends with more information specific to the Aztec format, + like the number of layers and whether it's compact. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + Initializes a new instance of the class. + + The bits. + The points. + if set to true [compact]. + The nb datablocks. + The nb layers. + + + + The main class which implements Aztec Code decoding -- as opposed to locating and extracting + the Aztec Code from an image. + + David Olivier + + + + Decodes the specified detector result. + + The detector result. + + + + + This method is used for testing the high-level encoder + + + + + + + Gets the string encoded in the aztec code bits + + The corrected bits. + the decoded string + + + + gets the table corresponding to the char passed + + The t. + + + + + Gets the character (or string) corresponding to the passed code in the given table + + the table used + the code of the character + + + + + Performs RS error correction on an array of bits. + + The rawbits. + the corrected array + + + + Gets the array of bits from an Aztec Code matrix + + The matrix. + the array of bits + + + + Reads a code of given length and at given index in an array of bits + + The rawbits. + The start index. + The length. + + + + + Reads a code of length 8 in an array of bits, padding with zeros + + + + + + + + Packs a bit array into bytes, most significant bit first + + + + + + + Encapsulates logic that can detect an Aztec Code in an image, even if the Aztec Code + is rotated or skewed, or partially obscured. + + David Olivier + + + + Initializes a new instance of the class. + + The image. + + + + Detects an Aztec Code in an image. + + + + + Detects an Aztec Code in an image. + + if true, image is a mirror-image of original. + + encapsulating results of detecting an Aztec Code + + + + + Extracts the number of data layers and data blocks from the layer around the bull's eye + + bullEyeCornerPoints the array of bull's eye corners + + + + + Corrects the parameter bits using Reed-Solomon algorithm + + paremeter bits + compact true if this is a compact Aztec code + + + + + Finds the corners of a bull-eye centered on the passed point + This returns the centers of the diagonal points just outside the bull's eye + Returns [topRight, bottomRight, bottomLeft, topLeft] + + Center point + The corners of the bull-eye + + + + Finds a candidate center point of an Aztec code from an image + + the center point + + + + Gets the Aztec code corners from the bull's eye corners and the parameters. + + the array of bull's eye corners + the array of aztec code corners + + + + Creates a BitMatrix by sampling the provided image. + topLeft, topRight, bottomRight, and bottomLeft are the centers of the squares on the + diagonal just outside the bull's eye. + + The image. + The top left. + The bottom left. + The bottom right. + The top right. + + + + + Samples a line + + start point (inclusive) + end point (exclusive) + number of bits + the array of bits as an int (first bit is high-order bit of result) + + + + Determines whether [is white or black rectangle] [the specified p1]. + + The p1. + The p2. + The p3. + The p4. + true if the border of the rectangle passed in parameter is compound of white points only + or black points only + + + + Gets the color of a segment + + The p1. + The p2. + 1 if segment more than 90% black, -1 if segment is more than 90% white, 0 else + + + + Gets the coordinate of the first point with a different color in the given direction + + The init. + if set to true [color]. + The dx. + The dy. + + + + + Expand the square represented by the corner points by pushing out equally in all directions + + the corners of the square, which has the bull's eye at its center + the original length of the side of the square in the target bit matrix + the new length of the size of the square in the target bit matrix + the corners of the expanded square + + + + Aztec 2D code representation + + Rustam Abdullaev + + + + Compact or full symbol indicator + + + + + Size in pixels (width and height) + + + + + Number of levels + + + + + Number of data codewords + + + + + The symbol image + + + + + represents a token for a binary shift + + + + + initializing constructor + + + + + + + + appends the byte array to the BitArray + + + + + + + string representation + + + + + + Generates Aztec 2D barcodes. + + Rustam Abdullaev + + + + Encodes the given binary content as an Aztec symbol + + input data string + Aztec symbol matrix with metadata + + + + Encodes the given binary content as an Aztec symbol + + input data string + minimal percentage of error check words (According to ISO/IEC 24778:2008, + a minimum of 23% + 3 words is recommended) + if non-zero, a user-specified value for the number of layers + + Aztec symbol matrix with metadata + + + + + This produces nearly optimal encodings of text into the first-level of + encoding used by Aztec code. + It uses a dynamic algorithm. For each prefix of the string, it determines + a set of encodings that could lead to this prefix. We repeatedly add a + character and generate a new set of optimal encodings until we have read + through the entire input. + @author Frank Yellin + @author Rustam Abdullaev + + + + + + + + + + + Convert the text represented by this High Level Encoder into a BitArray. + + text represented by this encoder encoded as a + + + + State represents all information about a sequence necessary to generate the current output. + Note that a state is immutable. + + + + + Create a new state representing this state with a latch to a (not + necessary different) mode, and then a code. + + + + + Create a new state representing this state, with a temporary shift + to a different mode to output a single value. + + + + + Create a new state representing this state, but an additional character + output in Binary Shift mode. + + + + + Create the state identical to this one, but we are no longer in + Binary Shift mode. + + + + + Returns true if "this" state is better (or equal) to be in than "that" + state under all possible circumstances. + + + + + This implementation can detect and decode Aztec codes in an image. + + David Olivier + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + a String representing the content encoded by the Data Matrix code + + + + + Locates and decodes a Data Matrix code in an image. + + image of barcode to decode + passed as a {@link java.util.Hashtable} from {@link com.google.zxing.DecodeHintType} + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Aztec result meta data. + + + + + Gets a value indicating whether this Aztec code is compact. + + + true if compact; otherwise, false. + + + + + Gets the nb datablocks. + + + + + Gets the nb layers. + + + + + + + + + + + + + Renders an Aztec code as a + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + The class holds the available options for the + + + + + Representing the minimal percentage of error correction words. + Note: an Aztec symbol should have a minimum of 25% EC words. + + + + + Specifies the required number of layers for an Aztec code: + a negative number (-1, -2, -3, -4) specifies a compact Aztec code + 0 indicates to use the minimum number of layers (the default) + a positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code + + + +

See + + DoCoMo's documentation about the result types represented by subclasses of this class.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + Implements KDDI AU's address book format. See + + http://www.au.kddi.com/ezfactory/tec/two_dimensions/index.html. + (Thanks to Yuzo for translating!) + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Implements the "MECARD" address book entry format. + + Supported keys: N, SOUND, TEL, EMAIL, NOTE, ADR, BDAY, URL, plus ORG + Unsupported keys: TEL-AV, NICKNAME + + Except for TEL, multiple values for keys are also not supported; + the first one found takes precedence. + + Our understanding of the MECARD format is based on this document: + + http://www.mobicode.org.tw/files/OMIA%20Mobile%20Bar%20Code%20Standard%20v3.2.1.doc + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes contact information, like that in an address book entry. + + Sean Owen + + + + initializing constructor + + + + + + + + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + the names + + + + + the nicknames + + + + + In Japanese, the name is written in kanji, which can have multiple readings. Therefore a hint + is often provided, called furigana, which spells the name phonetically. + + The pronunciation of the getNames() field, often in hiragana or katakana. + + + + the phone numbers + + + + optional descriptions of the type of each phone number. It could be like "HOME", but, + there is no guaranteed or standard format. + + + + the e-mail addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the instant messenger addresses + + + + + the note field + + + + + the addresses + + + + optional descriptions of the type of each e-mail. It could be like "WORK", but, + there is no guaranteed or standard format. + + + + the title + + + + + the urls + + + + birthday formatted as yyyyMMdd (e.g. 19780917) + + + a location as a latitude/longitude pair + + + Implements the "BIZCARD" address book entry format, though this has been + largely reverse-engineered from examples observed in the wild -- still + looking for a definitive reference. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location. + + Sean Owen + + + + Gets the start. + + + + + Determines whether [is start all day]. + + if start time was specified as a whole day + + + + event end , or null if event has no duration + + + + + Gets a value indicating whether this instance is end all day. + + true if end time was specified as a whole day + + + + Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) + or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC). + + The string to parse + + if not a date formatted string + + + + Represents a parsed result that encodes an email message including recipients, subject and body text. + + Sean Owen + + + + the email address + + + + + the TOs + + + + + the CCs + + + + + the BCCs + + + + + the subject + + + + + the body + + + + + the mailto: uri + + + + + Represents a result that encodes an e-mail address, either as a plain address + like "joe@example.org" or a mailto: URL like "mailto:joe@example.org". + + Sean Owen + + + + Implements the "MATMSG" email message entry format. + + Supported keys: TO, SUB, BODY + + Sean Owen + + + + This implements only the most basic checking for an email address's validity -- that it contains + an '@' and contains no characters disallowed by RFC 2822. This is an overly lenient definition of + validity. We want to generally be lenient here since this class is only intended to encapsulate what's + in a barcode, not "judge" it. + + The email. + + true if it is basically a valid email address; otherwise, false. + + + + + Represents a parsed result that encodes extended product information as encoded by the RSS format, like weight, price, dates, etc. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + extension for kilogram weight type + + + + + extension for pounds weight type + + + + + initializing constructor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the raw text + + + + + the product id + + + + + the sscc + + + + + the lot number + + + + + the production date + + + + + the packaging date + + + + + the best before date + + + + + the expiration date + + + + + the weight + + + + + the weight type + + + + + the weight increment + + + + + the price + + + + + the price increment + + + + + the price currency + + + + + the uncommon AIs + + + + + the display representation (raw text) + + + + + Parses strings of digits that represent a RSS Extended code. + + Antonio Manuel Benjumea Conde, Servinform, S.A. + Agustín Delgado, Servinform, S.A. + + + + tries to parse a text representation to a specific result object + + + + + + + Represents a parsed result that encodes a geographic coordinate, with latitude, longitude and altitude. + + Sean Owen + + + latitude in degrees + + + + longitude in degrees + + + + altitude in meters. If not specified, in the geo URI, returns 0.0 + + + + query string associated with geo URI or null if none exists + + + + the geo URI + + + + a URI link to Google Maps which display the point on the Earth described + by this instance, and sets the zoom level in a way that roughly reflects the + altitude, if specified + + + + Parses a "geo:" URI result, which specifies a location on the surface of + the Earth as well as an optional altitude above the surface. See + + http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00. + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a product ISBN number. + + jbreiden@google.com (Jeff Breidenbach) + + + + the ISBN number + + + + Parses strings of digits that represent a ISBN. + + + jbreiden@google.com (Jeff Breidenbach) + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + See ISBN-13 For Dummies + + The result. + + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link ResultParser#parseResult(Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Represents the type of data encoded by a barcode -- from plain text, to a + URI, to an e-mail address, etc. + + Sean Owen + + + + Represents a parsed result that encodes a product by an identifier of some kind. + + dswitkin@google.com (Daniel Switkin) + + + + Parses strings of digits that represent a UPC code. + + dswitkin@google.com (Daniel Switkin) + + +

Abstract class representing the result of decoding a barcode, as more than + a String -- as some type of structured data. This might be a subclass which represents + a URL, or an e-mail address. {@link #parseResult(com.google.zxing.Result)} will turn a raw + decoded string into the most appropriate type of structured representation.

+ +

Thanks to Jeff Griffin for proposing rewrite of these classes that relies less + on exception-based mechanisms during parsing.

+
+ Sean Owen +
+ + + Attempts to parse the raw {@link Result}'s contents as a particular type + of information (email, URL, etc.) and return a {@link ParsedResult} encapsulating + the result of parsing. + + the raw to parse + encapsulating the parsing result + + + + Parses the result. + + The result. + + + +

Parses an "sms:" URI result, which specifies a number to SMS and optional + "via" number. See + the IETF draft on this.

+ +

This actually also parses URIs starting with "mms:", "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + + Represents a parsed result that encodes an SMS message, including recipients, subject and body text. + + Sean Owen + + + +

Parses an "smsto:" URI result, whose format is not standardized but appears to be like: + {@code smsto:number(:body)}.

+

This actually also parses URIs starting with "smsto:", "mmsto:", "SMSTO:", and + "MMSTO:", and treats them all the same way, and effectively converts them to an "sms:" URI + for purposes of forwarding to the platform.

+
+ Sean Owen +
+ + +

Parses an "smtp:" URI result, whose format is not standardized but appears to be like: + smtp[:subject[:body]]}.

+

See http://code.google.com/p/zxing/issues/detail?id=536

+
+ Sean Owen +
+ + + Represents a parsed result that encodes a telephone number. + + Sean Owen + + + + Parses a "tel:" URI result, which specifies a phone number. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + A simple result type encapsulating a string that has no further interpretation. + + Sean Owen + + + + A simple result type encapsulating a URI that has no further interpretation. + + Sean Owen + + + true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + + Transforms a string that represents a URI into something more proper, by adding or canonicalizing + the protocol. + + + + + Tries to parse results that are a URI of some kind. + + Sean Owen + + + @return true if the URI contains suspicious patterns that may suggest it intends to + mislead the user about its true nature. At the moment this looks for the presence + of user/password syntax in the host/authority portion of a URI which may be used + in attempts to make the URI's host appear to be other than it is. Example: + http://yourbank.com@phisher.com This URI connects to phisher.com but may appear + to connect to yourbank.com at first glance. + + + Parses the "URLTO" result format, which is of the form "URLTO:[title]:[url]". + This seems to be used sometimes, but I am not able to find documentation + on its origin or official format? + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Parses contact information formatted according to the VCard (2.1) format. This is not a complete + implementation but should parse information as commonly encoded in 2D barcodes. + + Sean Owen + + + Formats name fields of the form "Public;John;Q.;Reverend;III" into a form like + "Reverend John Q. Public III". + + @param names name values to format, in place + + + + Partially implements the iCalendar format's "VEVENT" format for specifying a + calendar event. See RFC 2445. This supports SUMMARY, DTSTART and DTEND fields. + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + Represents a parsed result that encodes a Vehicle Identification Number (VIN). + + + + + Detects a result that is likely a vehicle identification number. + @author Sean Owen + + + + + Represents a parsed result that encodes wifi network information, like SSID and password. + + Vikram Aggarwal + + + + + A simple, fast array of bits, represented compactly by an array of ints internally. + + Sean Owen + + + + size of the array, number of elements + + + + + size of the array in bytes + + + + + index accessor + + + + + + + default constructor + + + + + initializing constructor + + desired size of the array + + + + Flips bit i. + + bit to set + + + + + Gets the next set. + + first bit to check + index of first bit that is set, starting from the given index, or size if none are set + at or beyond this given index + + + + see getNextSet(int) + + index to start looking for unset bit + index of next unset bit, or if none are unset until the end + + + Sets a block of 32 bits, starting at bit i. + + + first bit to set + + the new value of the next 32 bits. Note again that the least-significant bit + corresponds to bit i, the next-least-significant to i+1, and so on. + + + + + Sets a range of bits. + + start of range, inclusive. + end of range, exclusive + + + Clears all bits (sets to false). + + + Efficient method to check if a range of bits is set, or not set. + + + start of range, inclusive. + + end of range, exclusive + + if true, checks that bits in range are set, otherwise checks that they are not set + + true iff all bits are set or not set in range, according to value argument + if end is less than start or the range is not contained in the array + + + + Appends the bit. + + The bit. + + + underlying array of ints. The first element holds the first 32 bits, and the least + significant bit is bit 0. + + + + + Appends the least-significant bits, from value, in order from most-significant to + least-significant. For example, appending 6 bits from 0x000001E will append the bits + 0, 1, 1, 1, 1, 0 in that order. + + containing bits to append + bits from value to append + + + + adds the array to the end + + + + + + XOR operation + + + + + + converts to bytes. + + first bit to start writing + array to write into. Bytes are written most-significant byte first. This is the opposite + of the internal representation, which is exposed by BitArray + position in array to start writing + how many bytes to write + + + Reverses all bits in the array. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Erstellt ein neues Objekt, das eine Kopie der aktuellen Instanz darstellt. + + + Ein neues Objekt, das eine Kopie dieser Instanz darstellt. + + + + +

Represents a 2D matrix of bits. In function arguments below, and throughout the common + module, x is the column position, and y is the row position. The ordering is always x, y. + The origin is at the top-left.

+

Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins + with a new int. This is done intentionally so that we can copy out a row into a BitArray very + efficiently.

+

The ordering of bits is row-major. Within each int, the least significant bits are used first, + meaning they represent lower x values. This is compatible with BitArray's implementation.

+
+ Sean Owen + dswitkin@google.com (Daniel Switkin) +
+ + The width of the matrix + + + + The height of the matrix + + + + This method is for compatibility with older code. It's only logical to call if the matrix + is square, so I'm throwing if that's not the case. + + + row/column dimension of this matrix + + + + + The rowsize of the matrix + + + + + Creates an empty square . + + height and width + + + + Creates an empty square . + + bit matrix width + bit matrix height + + + + Interprets a 2D array of booleans as a , where "true" means an "on" bit. + + bits of the image, as a row-major 2D array. Elements are arrays representing rows + representation of image + + +

Gets the requested bit, where true means black.

+ +
+ The horizontal component (i.e. which column) + + The vertical component (i.e. which row) + + value of given bit in matrix + +
+ + +

Flips the given bit.

+
+ The horizontal component (i.e. which column) + The vertical component (i.e. which row) +
+ + + flip all of the bits, if shouldBeFlipped is true for the coordinates + + should return true, if the bit at a given coordinate should be flipped + + + + Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + mask bit is set. + + The mask. + + + Clears all bits (sets to false). + + +

Sets a square region of the bit matrix to true.

+ +
+ The horizontal position to begin at (inclusive) + + The vertical position to begin at (inclusive) + + The width of the region + + The height of the region + +
+ + A fast method to retrieve one row of data from the matrix as a BitArray. + + + The row to retrieve + + An optional caller-allocated BitArray, will be allocated if null or too small + + The resulting BitArray - this reference should always be used even when passing + your own row + + + + + Sets the row. + + row to set + {@link BitArray} to copy from + + + + Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + + + + + This is useful in detecting the enclosing rectangle of a 'pure' barcode. + + {left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + + + + This is useful in detecting a corner of a 'pure' barcode. + + {x,y} coordinate of top-left-most 1 bit, or null if it is all white + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The set string. + The unset string. + The line separator. + + A that represents this instance. + + + + + Clones this instance. + + + + +

This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + number of bits read is not often a multiple of 8.

+ +

This class is thread-safe but not reentrant. Unless the caller modifies the bytes array + it passed in, in which case all bets are off.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ + bytes from which this will read bits. Bits will be read from the first byte first. + Bits are read within a byte from most-significant to least-significant bit. + + + + + index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + + + + + index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + + + + number of bits to read + + int representing the bits read. The bits will appear as the least-significant + bits of the int + + if numBits isn't in [1,32] or more than is available + + + number of bits that can be read successfully + + + + Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1 + of ISO 18004. + + + Sean Owen + + + character set ECI value + representing ECI of given value, or null if it is legal but unsupported + + + character set ECI encoding name + representing ECI for character encoding, or null if it is legalbut unsupported + + + + Encapsulates the result of decoding a matrix of bits. This typically + applies to 2D barcode formats. For now it contains the raw bytes obtained, + as well as a String interpretation of those bytes, if applicable. + Sean Owen + + + + + raw bytes representing the result, or null if not applicable + + + + + how many bits of are valid; typically 8 times its length + + + + + text representation of the result + + + + + list of byte segments in the result, or null if not applicable + + + + + name of error correction level used, or null if not applicable + + + + + gets a value which describe if structure append data was found + + + + + number of errors corrected, or null if not applicable + + + + + gives the sequence number of the result if structured append was found + + + + + number of erasures corrected, or null if not applicable + + + + + gives the parity information if structured append was found + + + + + Miscellanseous data value for the various decoders + + The other. + + + + initializing constructor + + + + + + + + + initializing constructor + + + + + + + + + + + initializing constructor + + + + + + + + + + initializing constructor + + + + + + + + + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + event is raised when a value is changed + + + + + Gets or sets a flag which cause a deeper look into the bitmap + + + true if [try harder]; otherwise, false. + + + + + Image is a pure monochrome image of a barcode. + + + true if monochrome image of a barcode; otherwise, false. + + + + + Specifies what character encoding to use when decoding, where applicable (type String) + + + The character set. + + + + + Image is known to be of one of a few possible formats. + Maps to a {@link java.util.List} of {@link BarcodeFormat}s. + + + The possible formats. + + + + + if Code39 could be detected try to use extended mode for full ASCII character set + + + + + Don't fail if a Code39 is detected but can't be decoded in extended mode. + Return the raw Code39 result instead. Maps to . + + + + + Assume Code 39 codes employ a check digit. Maps to . + + + true if it should assume a Code 39 check digit; otherwise, false. + + + + + If true, return the start and end digits in a Codabar barcode instead of stripping them. They + are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them + to not be. Doesn't matter what it maps to; use . + + + + + Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed. + For example this affects FNC1 handling for Code 128 (aka GS1-128). + + + true if it should assume GS1; otherwise, false. + + + + + Assume MSI codes employ a check digit. Maps to . + + + true if it should assume a MSI check digit; otherwise, false. + + + + + Allowed lengths of encoded data -- reject anything else. Maps to an int[]. + + + + + Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this. + Maps to an int[] of the allowed extension lengths, for example [2], [5], or [2, 5]. + If it is optional to have an extension, do not set this hint. If this is set, + and a UPC or EAN barcode is found but an extension is not, then no result will be returned + at all. + + + + + Initializes a new instance of the class. + + + + Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Encapsulates the result of detecting a barcode in an image. This includes the raw + matrix of black/white pixels corresponding to the barcode, and possibly points of interest + in the image, like the location of finder patterns or corners of the barcode in the image.

+
+ Sean Owen +
+ + + the detected bits + + + + + the pixel points where the result is found + + + + + initializing constructor + + + + + + + General math-related and numeric utility functions. + + + + + Ends up being a bit faster than {@link Math#round(float)}. This merely rounds its + argument to the nearest int, where x.5 rounds up to x+1. Semantics of this shortcut + differ slightly from {@link Math#round(float)} in that half rounds down for negative + values. -2.5 rounds to -3, not -2. For purposes here it makes no difference. + + real value to round + nearest int + + + + + + + + + + Euclidean distance between points A and B + + + + + + + + + + Euclidean distance between points A and B + + + + + values to sum + sum of values in array + + +

A somewhat generic detector that looks for a barcode-like rectangular region within an image. + It looks within a mostly white region of an image for a region of black and white, but mostly + black. It returns the four corners of the region, as best it can determine.

+ +
+ Sean Owen +
+ + + initializing constructor + + + + + +

Detects a rectangular region of black and white -- mostly black -- with a region of mostly + white, in an image.

+
+ [] describing the corners of the rectangular region. The first and + last points are opposed on the diagonal, as are the second and third. The first point will be + the topmost point and the last, the bottommost. The second point will be leftmost and the + third, the rightmost + +
+ + Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + point which should be within the barcode. + + + center's x component (horizontal) + + same as deltaY but change in x per step instead + + minimum value of x + + maximum value of x + + center's y component (vertical) + + change in y per step. If scanning up this is negative; down, positive; + left or right, 0 + + minimum value of y to search through (meaningless when di == 0) + + maximum value of y + + maximum run of white pixels that can still be considered to be within + the barcode + + a encapsulating the corner that was found + + + + Computes the start and end of a region of pixels, either horizontally or vertically, that could + be part of a Data Matrix barcode. + + + if scanning horizontally, this is the row (the fixed vertical location) + where we are scanning. If scanning vertically it's the column, the fixed horizontal location + + largest run of white pixels that can still be considered part of the + barcode region + + minimum pixel location, horizontally or vertically, to consider + + maximum pixel location, horizontally or vertically, to consider + + if true, we're scanning left-right, instead of up-down + + int[] with start and end of found range, or null if no such range is found + (e.g. only white was found) + + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. By keeping track of the + last black points it encountered, it determines the corners of the barcode. + + David Olivier + + + + Creates a WhiteRectangleDetector instance + + The image. + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + Creates a WhiteRectangleDetector instance + + barcode image to find a rectangle in + initial size of search area around center + x position of search center + y position of search center + + null, if image is too small, otherwise a WhiteRectangleDetector instance + + + + + Initializes a new instance of the class. + + The image. + if image is too small + + + + Initializes a new instance of the class. + + The image. + Size of the init. + The x. + The y. + + + + Detects a candidate barcode-like rectangular region within an image. It + starts around the center of the image, increases the size of the candidate + region until it finds a white rectangular region. + + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + recenters the points of a constant distance towards the center + + bottom most point + left most point + right most point + top most point + [] describing the corners of the rectangular + region. The first and last points are opposed on the diagonal, as + are the second and third. The first point will be the topmost + point and the last, the bottommost. The second point will be + leftmost and the third, the rightmost + + + + Determines whether a segment contains a black point + + min value of the scanned coordinate + max value of the scanned coordinate + value of fixed coordinate + set to true if scan must be horizontal, false if vertical + + true if a black point has been found, else false. + + + + + Superclass of classes encapsulating types ECIs, according to "Extended Channel Interpretations" + 5.3 of ISO 18004. + + Sean Owen + + + + the ECI value + + + + ECI value + representing ECI of given value, or null if it is legal but unsupported + ArgumentException if ECI value is invalid + + + + Defines an container for encoder options + + + + + Gets the data container for all options + + + + + Specifies the height of the barcode image + + + + + Specifies the width of the barcode image + + + + + Don't put the content string into the output image. + + + + + Specifies margin, in pixels, to use when generating the barcode. The meaning can vary + by format; for example it controls margin before and after the barcode horizontally for + most 1D formats. + + + + + Specifies whether the data should be encoded to the GS1 standard; + FNC1 character is added in front of the data + + + + + Initializes a new instance of the class. + + + + This Binarizer implementation uses the old ZXing global histogram approach. It is suitable + for low-end mobile devices which don't have enough CPU or memory to use a local thresholding + algorithm. However, because it picks a global black point, it cannot handle difficult shadows + and gradients. + + Faster mobile devices and all desktop applications should probably use HybridBinarizer instead. + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The source. + + + + Applies simple sharpening to the row data to improve performance of the 1D Readers. + + + + + + + + Does not sharpen the data, as this call is intended to only be used by 2D Readers. + + + + + Creates a new object with the same type as this Binarizer implementation, but with pristine + state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + of 1 bit data. See Effective Java for why we can't use Java's clone() method. + + The LuminanceSource this Binarizer will operate on. + + A new concrete Binarizer implementation object. + + + + Implementations of this class can, given locations of finder patterns for a QR code in an + image, sample the right points in the image to reconstruct the QR code, accounting for + perspective distortion. It is abstracted since it is relatively expensive and should be allowed + to take advantage of platform-specific optimized implementations, like Sun's Java Advanced + Imaging library, but which may not be available in other environments such as J2ME, and vice + versa. + + The implementation used can be controlled by calling {@link #setGridSampler(GridSampler)} + with an instance of a class which implements this interface. + + Sean Owen + + + the current implementation of + + + + Sets the implementation of used by the library. One global + instance is stored, which may sound problematic. But, the implementation provided + ought to be appropriate for the entire platform, and all uses of this library + in the whole lifetime of the JVM. For instance, an Android activity can swap in + an implementation that takes advantage of native platform libraries. + + The platform-specific object to install. + + + +

Samples an image for a square matrix of bits of the given dimension. This is used to extract + the black/white modules of a 2D barcode like a QR Code found in an image. Because this barcode + may be rotated or perspective-distorted, the caller supplies four points in the source image + that define known points in the barcode, so that the image may be sampled appropriately.

+

The last eight "from" parameters are four X/Y coordinate pairs of locations of points in + the image that define some significant points in the image to be sample. For example, + these may be the location of finder pattern in a QR Code.

+

The first eight "to" parameters are four X/Y coordinate pairs measured in the destination + , from the top left, where the known points in the image given by the "from" + parameters map to.

+

These 16 parameters define the transformation needed to sample the image.

+
+ image to sample + The dimension X. + The dimension Y. + The p1 preimage X. + The p1 preimage Y. + The p2 preimage X. + The p2 preimage Y. + The p3 preimage X. + The p3 preimage Y. + The p4 preimage X. + The p4 preimage Y. + The p1 image X. + The p1 image Y. + The p2 image X. + The p2 image Y. + The p3 image X. + The p3 image Y. + The p4 image X. + The p4 image Y. + + representing a grid of points sampled from the image within a region + defined by the "from" parameters + + ReaderException if image can't be sampled, for example, if the transformation defined +
+ + + + + + + + + + + +

Checks a set of points that have been transformed to sample points on an image against + the image's dimensions to see if the point are even within the image.

+ +

This method will actually "nudge" the endpoints back onto the image if they are found to be + barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + patterns in an image where the QR Code runs all the way to the image border.

+ +

For efficiency, the method will check points from either end of the line until one is found + to be within the image. Because the set of points are assumed to be linear, this is valid.

+ +
+ image into which the points should map + + actual points in x1,y1,...,xn,yn form + +
+ + This class implements a local thresholding algorithm, which while slower than the + GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for + high frequency images of barcodes with black data on white backgrounds. For this application, + it does a much better job than a global blackpoint with severe shadows and gradients. + However it tends to produce artifacts on lower frequency images and is therefore not + a good general purpose binarizer for uses outside ZXing. + + This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, + and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already + inherently local, and only fails for horizontal gradients. We can revisit that problem later, + but for now it was not a win to use local blocks for 1D. + + This Binarizer is the default for the unit tests and the recommended class for library users. + dswitkin@google.com (Daniel Switkin) + + + + + gives the black matrix + + + + + initializing constructor + + + + + + creates a new instance + + + + + + + Calculates the final BitMatrix once for all requests. This could be called once from the + constructor instead, but there are some advantages to doing it lazily, such as making + profiling easier, and not doing heavy lifting when callers don't expect it. + + + + + For each 8x8 block in the image, calculate the average black point using a 5x5 grid + of the blocks around it. Also handles the corner cases (fractional blocks are computed based + on the last 8 pixels in the row/column which are also used in the previous block). + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + The black points. + The matrix. + + + + Applies a single threshold to an 8x8 block of pixels. + + The luminances. + The xoffset. + The yoffset. + The threshold. + The stride. + The matrix. + + + + Calculates a single black point for each 8x8 block of pixels and saves it away. + See the following thread for a discussion of this algorithm: + http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + + The luminances. + Width of the sub. + Height of the sub. + The width. + The height. + + + +

This class implements a perspective transform in two dimensions. Given four source and four + destination points, it will compute the transformation implied between them. The code is based + directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

+
+ Sean Owen +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Convenience method, not optimized for performance. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

This class contains utility methods for performing mathematical operations over + the Galois Fields. Operations use a given primitive polynomial in calculations.

+

Throughout this package, elements of the GF are represented as an {@code int} + for convenience and speed (but at the cost of memory). +

+
+ Sean Owen +
+ + + Create a representation of GF(size) using the given primitive polynomial. + + irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + the size of the field + the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + + + + Builds the monomial. + + The degree. + The coefficient. + the monomial representing coefficient * x^degree + + + + Implements both addition and subtraction -- they are the same in GF(size). + + sum/difference of a and b + + + + Exps the specified a. + + 2 to the power of a in GF(size) + + + + Logs the specified a. + + A. + base 2 log of a in GF(size) + + + + Inverses the specified a. + + multiplicative inverse of a + + + + Multiplies the specified a with b. + + A. + The b. + product of a and b in GF(size) + + + + Gets the size. + + + + + Gets the generator base. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + +

Represents a polynomial whose coefficients are elements of a GF. + Instances of this class are immutable.

+

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + the {@link GenericGF} instance representing the field to use + to perform computations + coefficients as ints representing elements of GF(size), arranged + from most significant (highest-power term) coefficient to least significant + if argument is null or empty, + or if leading coefficient is 0 and this is not a + constant polynomial (that is, it is not the monomial "0") + + + + degree of this polynomial + + + + + Gets a value indicating whether this is zero. + + true iff this polynomial is the monomial "0" + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + +

Implements Reed-Solomon decoding, as the name implies.

+ +

The algorithm will not be explained here, but the following references were helpful + in creating this implementation:

+ + + +

Much credit is due to William Rucklidge since portions of this code are an indirect + port of his C++ Reed-Solomon implementation.

+ +
+ Sean Owen + William Rucklidge + sanfordsquires +
+ + +

Decodes given set of received codewords, which include both data and error-correction + codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + in the input.

+
+ data and error-correction codewords + number of error-correction codewords available + false: decoding fails +
+ + + Implements Reed-Solomon encoding, as the name implies. + + Sean Owen + William Rucklidge + + + + Common string-related functions. + + Sean Owen + Alex Dupre + + + + SJIS + + + + + GB2312 + + + + + Guesses the encoding. + + bytes encoding a string, whose encoding should be guessed + decode hints if applicable + name of guessed encoding; at the moment will only guess one of: + {@link #SHIFT_JIS}, {@link #UTF8}, {@link #ISO88591}, or the platform + default encoding if none of these can possibly be correct + + + + This implementation can detect and decode Data Matrix codes in an image. + + bbrown@google.com (Brian Brown) + + + + + Locates and decodes a Data Matrix code in an image. + + + a String representing the content encoded by the Data Matrix code + + + + Locates and decodes a Data Matrix code in an image. + + + + a String representing the content encoded by the Data Matrix code + + + + does nothing here + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a Data Matrix code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + Guillaume Le Biller Added to zxing lib. + + + + encodes the content to a BitMatrix + + + + + + + + + + encodes the content to a BitMatrix + + + + + + + + + + + Encode the given symbol info to a bit matrix. + + The DataMatrix placement. + The symbol info to encode. + + + The bit matrix generated. + + + + Convert the ByteMatrix to BitMatrix. + + The input matrix. + The requested width of the image (in pixels) with the Datamatrix code + The requested height of the image (in pixels) with the Datamatrix code + The output matrix. + + + + bbrown@google.com (Brian Brown) + + + + + to parse + if dimension is < 8 or > 144 or not 0 mod 2 + + + + +

Creates the version object based on the dimension of the original bit matrix from + the datamatrix code.

+ +

See ISO 16022:2006 Table 7 - ECC 200 symbol attributes

+ + Original including alignment patterns + encapsulating the Data Matrix Code's "version" + if the dimensions of the mapping matrix are not valid + Data Matrix dimensions. +
+
+ + +

Reads the bits in the representing the mapping matrix (No alignment patterns) + in the correct order in order to reconstitute the codewords bytes contained within the + Data Matrix Code.

+ + bytes encoded within the Data Matrix Code + if the exact number of bytes expected is not read +
+
+ + +

Reads a bit of the mapping matrix accounting for boundary wrapping.

+ + Row to read in the mapping matrix + Column to read in the mapping matrix + Number of rows in the mapping matrix + Number of columns in the mapping matrix + value of the given bit in the mapping matrix +
+
+ + +

Reads the 8 bits of the standard Utah-shaped pattern.

+ +

See ISO 16022:2006, 5.8.1 Figure 6

+ + Current row in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Current column in the mapping matrix, anchored at the 8th bit (LSB) of the pattern + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the utah shape +
+
+ + +

Reads the 8 bits of the special corner condition 1.

+ +

See ISO 16022:2006, Figure F.3

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 1 +
+
+ + +

Reads the 8 bits of the special corner condition 2.

+ +

See ISO 16022:2006, Figure F.4

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 2 +
+
+ + +

Reads the 8 bits of the special corner condition 3.

+ +

See ISO 16022:2006, Figure F.5

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 3 +
+
+ + +

Reads the 8 bits of the special corner condition 4.

+ +

See ISO 16022:2006, Figure F.6

+ + Number of rows in the mapping matrix + Number of columns in the mapping matrix + byte from the Corner condition 4 +
+
+ + +

Extracts the data region from a that contains + alignment patterns.

+ + Original with alignment patterns + BitMatrix that has the alignment patterns removed +
+
+ + +

Encapsulates a block of data within a Data Matrix Code. Data Matrix Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ + bbrown@google.com (Brian Brown) +
+
+ + +

When Data Matrix Codes use multiple data blocks, they actually interleave the bytes of each of them. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ + bytes as read directly from the Data Matrix Code + version of the Data Matrix Code + DataBlocks containing original bytes, "de-interleaved" from representation in the + Data Matrix Code +
+
+ + +

Data Matrix Codes can encode text as bits in one of several modes, and can use multiple modes + in one Data Matrix Code. This class decodes the bits back into text.

+ +

See ISO 16022:2006, 5.2.1 - 5.2.9.2

+ + bbrown@google.com (Brian Brown) + Sean Owen +
+
+ + + See ISO 16022:2006, Annex C Table C.1 + The C40 Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, Annex C Table C.2 + The Text Basic Character Set (*'s used for placeholders for the shift values) + + + + + See ISO 16022:2006, 5.2.3 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.5 and Annex C, Table C.1 + + + + + See ISO 16022:2006, 5.2.6 and Annex C, Table C.2 + + + + + See ISO 16022:2006, 5.2.7 + + + + + See ISO 16022:2006, 5.2.8 and Annex C Table C.3 + + + + + See ISO 16022:2006, 5.2.9 and Annex B, B.2 + + + + + See ISO 16022:2006, Annex B, B.2 + + + + +

The main class which implements Data Matrix Code decoding -- as opposed to locating and extracting + the Data Matrix Code from an image.

+ + bbrown@google.com (Brian Brown) +
+
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a Data Matrix Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+ + booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code + if the Data Matrix Code cannot be decoded +
+
+ + +

Decodes a Data Matrix Code represented as a . A 1 or "true" is taken + to mean a black module.

+
+ booleans representing white/black Data Matrix Code modules + text and bytes encoded within the Data Matrix Code +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+ + data and error correction codewords + number of codewords that are data bytes +
+
+ + + The Version object encapsulates attributes about a particular + size Data Matrix Code. + + bbrown@google.com (Brian Brown) + + + + + returns the version numer + + + + + + returns the symbol size rows + + + + + + returns the symbols size columns + + + + + + retursn the data region size rows + + + + + + returns the data region size columns + + + + + + returns the total codewords count + + + + + +

Deduces version information from Data Matrix dimensions.

+ + Number of rows in modules + Number of columns in modules + Version for a Data Matrix Code of those dimensions + if dimensions do correspond to a valid Data Matrix size +
+
+ + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the Data Matrix code version's format.

+
+
+ + + returns the version number as string + + + + + + See ISO 16022:2006 5.5.1 Table 7 + + + + +

Encapsulates logic that can detect a Data Matrix Code in an image, even if the Data Matrix Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + +

Detects a Data Matrix Code in an image.

+
+ encapsulating results of detecting a Data Matrix Code or null +
+ + + Detect a solid side which has minimum transition. + + + + + + + Detect a second solid side next to first solid side. + + + + + + + Calculates the corner position of the white top right module. + + + + + + + Shift the edge points to the module center. + + + + + + + Counts the number of black/white transitions between two points, using something like Bresenham's algorithm. + + + + + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E). + + + + + Main constructor + + the codewords to place + the number of columns + the number of rows + + + + Places the 8 bits of a utah-shaped symbol character in ECC200. + + The row. + The col. + character position + + + + Handle "end of data" situations + + the encoder context + the buffer with the remaining encoded characters + + + + Enumeration for encodation types + + + + + Error Correction Code for ECC200. + + + + + Lookup table which factors to use for which number of error correction codewords. + See FACTORS. + + + + + Precomputed polynomial factors for ECC 200. + + + + + Creates the ECC200 error correction for an encoded message. + + The codewords. + information about the symbol to be encoded + the codewords with interleaved error correction. + + + + DataMatrix ECC 200 data encoder following the algorithm described in ISO/IEC 16022:200(E) in + annex S. + + + + + Padding character + + + + + mode latch to C40 encodation mode + + + + + mode latch to Base 256 encodation mode + + + + + FNC1 Codeword + + + + + Structured Append Codeword + + + + + Reader Programming + + + + + Upper Shift + + + + + 05 Macro + + + + + 06 Macro + + + + + mode latch to ANSI X.12 encodation mode + + + + + mode latch to Text encodation mode + + + + + mode latch to EDIFACT encodation mode + + + + + ECI character (Extended Channel Interpretation) + + + + + Unlatch from C40 encodation + + + + + Unlatch from X12 encodation + + + + + 05 Macro header + + + + + 06 Macro header + + + + + Macro trailer + + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + the encoded message (the char values range from 0 to 255) + + + + Performs message encoding of a DataMatrix message using the algorithm described in annex P + of ISO/IEC 16022:2000(E). + + the message + requested shape. May be {@code SymbolShapeHint.FORCE_NONE},{@code SymbolShapeHint.FORCE_SQUARE} or {@code SymbolShapeHint.FORCE_RECTANGLE}. + the minimum symbol size constraint or null for no constraint + the maximum symbol size constraint or null for no constraint + encoding mode to start with + the encoded message (the char values range from 0 to 255) + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + Symbol info table for DataMatrix. + + + + Overrides the symbol info set used by this class. Used for testing purposes. + + @param override the symbol info set to use + + + + Enumeration for DataMatrix symbol shape hint. It can be used to force square or rectangular + symbols. + + + + + The class holds the available options for the DatamatrixWriter + + + + + Specifies the matrix shape for Data Matrix + + + + + Specifies a minimum barcode size + + + + + Specifies a maximum barcode size + + + + + Specifies the default encodation + Make sure that the content fits into the encodation value, otherwise there will be an exception thrown. + standard value: Encodation.ASCII + + + + + implements an Intelligent Mail barcode + Rishabh Hatgadkar + + + + + mike32767 + Manuel Kasten + + + + + to parse + + + + +

MaxiCodes can encode text or structured information as bits in one of several modes, + with multiple character sets in one code. This class decodes the bits back into text.

+ + mike32767 + Manuel Kasten +
+
+ + +

The main class which implements MaxiCode decoding -- as opposed to locating and extracting + the MaxiCode from an image.

+ + Manuel Kasten +
+
+ + + This implementation can detect and decode a MaxiCode in an image. + + + + + Locates and decodes a MaxiCode in an image. + + a String representing the content encoded by the MaxiCode + if a MaxiCode cannot be decoded + + + + + Locates and decodes a MaxiCode within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + + This class attempts to decode a barcode from an image, not by scanning the whole image, + but by scanning subsets of the image. This is important when there may be multiple barcodes in + an image, and detecting a barcode may find parts of multiple barcode and fail to decode + (e.g. QR Codes). Instead this scans the four quadrants of the image -- and also the center + 'quadrant' to cover the case where a barcode is found in the center. + + + + + + Initializes a new instance of the class. + + The @delegate. + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Attempts to locate multiple barcodes in an image by repeatedly decoding portion of the image. + After one barcode is found, the areas left, above, right and below the barcode's + {@link com.google.zxing.ResultPoint}s are scanned, recursively.

+

A caller may want to also employ {@link ByQuadrantReader} when attempting to find multiple + 2D barcodes, like QR Codes, in an image, where the presence of multiple barcodes might prevent + detecting any one of them.

+

That is, instead of passing a {@link Reader} a caller might pass + new ByQuadrantReader(reader).

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The @delegate. + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + Implementation of this interface attempt to read several barcodes from one image. + Sean Owen + + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Encapsulates logic that can detect one or more QR Codes in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+ + Sean Owen + Hannes Erven +
+
+ + + Initializes a new instance of the class. + + The image. + + + + Detects the multi. + + The hints. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +

In contrast to , this class will return an array of all possible + QR code locations in the image.

+ +

Use the TRY_HARDER hint to ask for a more thorough detection.

+ + Sean Owen + Hannes Erven +
+
+ + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF_PERCENT percent in their + estimated modules sizes. + + + + + More or less arbitrary cutoff point for determining if two finder patterns might belong + to the same code if they differ less than DIFF_MODSIZE_CUTOFF pixels/module in their + estimated modules sizes. + + + + + A comparator that orders FinderPatterns by their estimated module size. + + + + +

Creates a finder that will search the image for three finder patterns.

+ + image to search +
+
+ + + + the 3 best s from our list of candidates. The "best" are + those that have been detected at least CENTER_QUORUM times, and whose module + size differs from the average among those patterns the least + + + + + This implementation can detect and decode multiple QR Codes in an image. + + + + + Decodes the multiple. + + The image. + + + + + Decodes the multiple. + + The image. + The hints. + + + + +

Decodes Codabar barcodes.

+ + Bas Vijfwinkel +
+
+ + These represent the encodings of characters, as patterns of wide and narrow bars. The 7 least-significant bits of + each int correspond to the pattern of wide and narrow, with 1s representing "wide" and 0s representing narrow. + + + + Records the size of all runs of white and black pixels, starting with white. + This is just like recordPattern, except it records all the counters, and + uses our builtin "counters" member for storage. + + row to count from + + + + This class renders CodaBar as []. + + dsbnatut@gmail.com (Kazuki Nishiura) + + + + The class holds the available options for the QrCodeWriter + + + + + if true, don't switch to codeset C for numbers + + + + +

Decodes Code 128 barcodes.

+ + Sean Owen +
+
+ + + This object renders a CODE128 code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + +

Decodes Code 39 barcodes. Supports "Full ASCII Code 39" if USE_CODE_39_EXTENDED_MODE is set.

+ Sean Owen + @see Code93Reader +
+
+ + + Returns a string with all possible characters + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. It will not decoded "extended Code 39" sequences. + + + + + Creates a reader that can be configured to check the last character as a check digit. + It will not decoded "extended Code 39" sequences. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + + Creates a reader that can be configured to check the last character as a check digit, + or optionally attempt to decode "extended Code 39" sequences that are used to encode + the full ASCII character set. + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + if true, will attempt to decode extended Code 39 sequences in the text. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE39 code as a . + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Decodes Code 93 barcodes.

+ Sean Owen + +
+
+ + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a CODE93 code as a BitMatrix + + + + + + barcode contents to encode.It should not be encoded for extended characters. + a { @code bool[]} of horizontal pixels(false = white, true = black) + + + + + output to append to + start position + pattern to append + unused + 9 + + + +

Implements decoding of the EAN-13 format.

+ + dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Initializes a new instance of the class. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + Get the format of this decoder. + The 1D format. + + + + + Based on pattern of odd-even ('L' and 'G') patterns used to encoded the explicitly-encoded + digits in a barcode, determines the implicitly encoded first digit and adds it to the + result string. + + string to insert decoded first digit into + int whose bits indicates the pattern of odd/even L/G patterns used to + encode digits + -1 if first digit cannot be determined + + + + This object renders an EAN13 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + +

Implements decoding of the EAN-8 format.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Get the format of this decoder. + The 1D format. + + + + + This object renders an EAN8 code as a . + aripollak@gmail.com (Ari Pollak) + + + + + + + a byte array of horizontal pixels (false = white, true = black) + + + + + Records EAN prefix to GS1 Member Organization, where the member organization + correlates strongly with a country. This is an imperfect means of identifying + a country of origin by EAN-13 barcode value. See + + http://en.wikipedia.org/wiki/List_of_GS1_country_codes. + + Sean Owen + + + + +

Implements decoding of the ITF format, or Interleaved Two of Five.

+ +

This Reader will scan ITF barcodes of certain lengths only. + At the moment it reads length 6, 8, 10, 12, 14, 16, 18, 20, 24, 44 and 48 as these have appeared "in the wild". Not all + lengths are scanned, especially shorter ones, to avoid false positives. This in turn is due to a lack of + required checksum function.

+ +

The checksum is optional and is not applied by this Reader. The consumer of the decoded + value will have to apply a checksum if required.

+ +

http://en.wikipedia.org/wiki/Interleaved_2_of_5 + is a great reference for Interleaved 2 of 5 information.

+ + kevin.osullivan@sita.aero, SITA Lab. +
+
+ + + Valid ITF lengths. Anything longer than the largest value is also allowed. + + + + + Start/end guard pattern. + + Note: The end pattern is reversed because the row is reversed before + searching for the END_PATTERN + + + + + Patterns of Wide / Narrow lines to indicate each digit + + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + + + row of black/white values to search + offset of start pattern + The payload end. + to append decoded chars to + + false, if decoding could not complete successfully + + + + + Identify where the start of the middle / payload section starts. + + row of black/white values to search + Array, containing index of start of 'start block' and end of 'start block' + + + + The start & end patterns must be pre/post fixed by a quiet zone. This + zone must be at least 10 times the width of a narrow line. Scan back until + we either get to the start of the barcode or match the necessary number of + quiet zone pixels. + + Note: Its assumed the row is reversed when using this method to find + quiet zone after the end pattern. + + ref: http://www.barcode-1.net/i25code.html + + bit array representing the scanned barcode. + index into row of the start or end pattern. + false, if the quiet zone cannot be found + + + + Skip all whitespace until we get to the first black line. + + row of black/white values to search + index of the first black line or -1 if no black lines are found in the row. + + + + Identify where the end of the middle / payload section ends. + + row of black/white values to search + Array, containing index of start of 'end block' and end of 'end + block' or null, if nothing found + + + + + row of black/white values to search + position to start search + pattern of counts of number of black and white pixels that are being searched for as a pattern + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a sequence of ITF black/white lines into single + digit. + + the counts of runs of observed black/white/black/... values + The decoded digit + + false, if digit cannot be decoded + + + + + This object renders a ITF code as a . + + erik.barbara@gmail.com (Erik Barbara) + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code bool[]} of horizontal pixels (false = white, true = black) + + + + + + + Decodes MSI barcodes. + + + + + These represent the encodings of characters, as patterns of wide and narrow bars. + The 9 least-significant bits of each int correspond to the pattern of wide and narrow, + with 1s representing "wide" and 0s representing narrow. + + + + + Creates a reader that assumes all encoded data is data, and does not treat the final + character as a check digit. + + + + + Creates a reader that can be configured to check the last character as a check digit, + + if true, treat the last data character as a check digit, not + data, and verify that the checksum passes. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + containing encoded string and start/end of barcode +
+ + + This object renders a MSI code as a . + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

A reader that can read all available UPC/EAN formats. If a caller wants to try to + read all such formats, it is most efficient to use this implementation rather than invoke + individual readers.

+ Sean Owen +
+
+ + + Initializes a new instance of the class. + + The hints. + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null if an error occurs or barcode cannot be found + +
+ + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + +

Encapsulates functionality and implementation that is common to one-dimensional barcodes.

+ dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode the contents following specified format. + {@code width} and {@code height} are required size. This method may return bigger size + {@code BitMatrix} when specified size is too small. The user can set both {@code width} and + {@code height} to zero to get minimum size barcode. If negative value is set to {@code width} + or {@code height}, {@code IllegalArgumentException} is thrown. + + + + + + a byte array of horizontal pixels (0 = white, 1 = black) + + + + Throw ArgumentException if input contains characters other than digits 0-9. + + string to check for numeric characters + if input contains characters other than digits 0-9. + + + + Appends the given pattern to the target array starting at pos. + + encode black/white pattern into this array + position to start encoding at in target + lengths of black/white runs to encode + starting color - false for white, true for black + the number of elements added to target. + + + + Gets the default margin. + + + + + Encode the contents to bool array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + + barcode contents to encode + a bool[] of horizontal pixels (false = white, true = black) + + + + Calculates the checksum digit modulo10. + + The contents. + + + + + Encapsulates functionality and implementation that is common to all families + of one-dimensional barcodes. + dswitkin@google.com (Daniel Switkin) + Sean Owen + + + + + + + + + + + + + + + Locates and decodes a barcode in some format within an image. + + image of barcode to decode + + String which the barcode encodes + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + Note that we don't try rotation without the try harder flag, even if rotation was supported. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + We're going to examine rows from the middle outward, searching alternately above and below the + middle, and farther out each time. rowStep is the number of rows between each successive + attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then + middle + rowStep, then middle - (2 * rowStep), etc. + rowStep is bigger as the image is taller, but is always at least 1. We've somewhat arbitrarily + decided that moving up and down by about 1/16 of the image is pretty good; we try more of the + image if "trying harder". + + The image to decode + Any hints that were requested + The contents of the decoded barcode + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the size of successive runs of white and black pixels in a row, starting at a given point. + The values are recorded in the given array, and the number of runs recorded is equal to the size + of the array. If the row starts on a white pixel at the given start point, then the first count + recorded is the run of white pixels starting from that point; likewise it is the count of a run + of black pixels if the row begin on a black pixels at that point. + + row to count from + offset into row to start at + array into which to record counts + + + + Records the pattern in reverse. + + The row. + The start. + The counters. + + + + + Determines how closely a set of observed counts of runs of black/white values matches a given + target pattern. This is reported as the ratio of the total variance from the expected pattern + proportions across all pattern elements, to the length of the pattern. + + observed counters + expected pattern + The most any counter can differ before we give up + ratio of total variance between counters and pattern compared to total pattern size, + where the ratio has been multiplied by 256. So, 0 means no variance (perfect match); 256 means + the total variance between counters and patterns equals the pattern length, higher values mean + even more variance + + + + Attempts to decode a one-dimensional barcode format given a single row of + an image. + + row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode + + + + +

Decodes PharmaCode

+ * @author Ruslan Karachun +
+
+ + + This object renders a Plessey code as a . + + + + + Encode the contents to byte array expression of one-dimensional barcode. + Start code and end code should be included in result, and side margins should not be included. + a {@code boolean[]} of horizontal pixels (false = white, true = black) + + + + + + + Superclass of implementations that read barcodes in the RSS family of formats. + + + + + Initializes a new instance of the class. + + + + + Gets the decode finder counters. + + + + + + Gets the data character counters. + + + + + + Gets the odd rounding errors. + + + + + + Gets the even rounding errors. + + + + + + Gets the odd counts. + + + + + + Gets the even counts. + + + + + + Parses the finder value. + + The counters. + The finder patterns. + The value. + + + + + Counts the specified array. + + The array. + + + + + Increments the specified array. + + The array. + The errors. + + + + Decrements the specified array. + + The array. + The errors. + + + + Determines whether [is finder pattern] [the specified counters]. + + The counters. + + true if [is finder pattern] [the specified counters]; otherwise, false. + + + + + Encapsulates a since character value in an RSS barcode, including its checksum information. + + + + + Gets the value. + + + + + Gets the checksum portion. + + + + + Initializes a new instance of the class. + + The value. + The checksum portion. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Gets the information. + + + + + + Parses the information. + + + + + + Creates the decoder. + + The information. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + + + + + One row of an RSS Expanded Stacked symbol, consisting of 1+ expanded pairs. + + + + + Two rows are equal if they contain the same pairs in the same order. + + + + + Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) + Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Encapsulates an RSS barcode finder pattern, including its start/end position and row. + + + + + Gets the value. + + + + + Gets the start end. + + + + + Gets the result points. + + + + + Initializes a new instance of the class. + + The value. + The start end. + The start. + The end. + The row number. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Decodes RSS-14, including truncated and stacked variants. See ISO/IEC 24724:2006. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Resets this instance. + + + + + Adapted from listings in ISO/IEC 24724 Appendix B and Appendix G. + + + + + Gets the RS svalue. + + The widths. + Width of the max. + if set to true [no narrow]. + + + + +

Implements decoding of the UPC-A format.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen +
+
+ + +

Like decodeRow(int, BitArray, java.util.Map), but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ + + + + +
+ + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + + Decodes the specified image. + + The image. + The hints. + + + + + Get the format of this decoder. + The 1D format. + + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + + + This object renders a UPC-A code as a . + qwandor@google.com (Andrew Walbran) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + @see UPCEANExtension5Support + + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + + + @see UPCEANExtension2Support + + + + Parses the extension string. + + raw content of extension + formatted interpretation of raw content as a {@link Map} mapping + one {@link ResultMetadataType} to appropriate value, or {@code null} if not known + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ dswitkin@google.com (Daniel Switkin) + Sean Owen + alasdair@google.com (Alasdair Mackintosh) +
+
+ + + Start/end guard pattern. + + + + + Pattern marking the middle of a UPC/EAN pattern, separating the two halves. + + + + + end guard pattern. + + + + + "Odd", or "L" patterns used to encode UPC/EAN digits. + + + + + As above but also including the "even", or "G" patterns used to encode UPC/EAN digits. + + + + + Initializes a new instance of the class. + + + + +

Attempts to decode a one-dimensional barcode format given a single row of + an image.

+
+ row number from top of the row + the black/white pixel data of the row + decode hints + + containing encoded string and start/end of barcode or null, if an error occurs or barcode cannot be found + +
+ + +

Like , but + allows caller to inform method about where the UPC/EAN start pattern is + found. This allows this to be computed once and reused across many implementations.

+
+ row index into the image + encoding of the row of the barcode image + start/end column where the opening start pattern was found + optional hints that influence decoding + encapsulating the result of decoding a barcode in the row +
+ + + + string of digits to check + see + + + + Computes the UPC/EAN checksum on a string of digits, and reports + whether the checksum is correct or not. + + string of digits to check + true iff string of digits passes the UPC/EAN checksum algorithm + + + + Decodes the end. + + The row. + The end start. + + + + + + row of black/white values to search + position to start search + if true, indicates that the pattern specifies white/black/white/... + pixel counts, otherwise, it is interpreted as black/white/black/... + pattern of counts of number of black and white pixels that are being + searched for as a pattern + array of counters, as long as pattern, to re-use + start/end horizontal offset of guard pattern, as an array of two ints + + + + Attempts to decode a single UPC/EAN-encoded digit. + + row of black/white values to decode + the counts of runs of observed black/white/black/... values + horizontal offset to start decoding from + the set of patterns to use to decode -- sometimes different encodings + for the digits 0-9 are used, and this indicates the encodings for 0 to 9 that should + be used + horizontal offset of first pixel beyond the decoded digit + + + + Get the format of this decoder. + + The 1D format. + + + + Subclasses override this to decode the portion of a barcode between the start + and end guard patterns. + + row of black/white values to search + start/end offset of start guard pattern + to append decoded chars to + horizontal offset of first pixel after the "middle" that was decoded or -1 if decoding could not complete successfully + + + +

Encapsulates functionality and implementation that is common to UPC and EAN families + of one-dimensional barcodes.

+ aripollak@gmail.com (Ari Pollak) + dsbnatut@gmail.com (Kazuki Nishiura) +
+
+ + + Gets the default margin. + + + + +

Implements decoding of the UPC-E format.

+

Thisis a great reference for + UPC-E information.

+ Sean Owen +
+
+ + + The pattern that marks the middle, and end, of a UPC-E pattern. + There is no "second half" to a UPC-E barcode. + + + + + See L_AND_G_PATTERNS these values similarly represent patterns of + even-odd parity encodings of digits that imply both the number system (0 or 1) + used, and the check digit. + + + + + Initializes a new instance of the class. + + + + + Decodes the middle. + + The row. + The start range. + The result. + + + + + Decodes the end. + + The row. + The end start. + + + + + see checkStandardUPCEANChecksum(String) + + + + + + + Determines the num sys and check digit. + + The result string. + The lg pattern found. + + + + + Get the format of this decoder. + The 1D format. + + + + + Expands a UPC-E value back into its full, equivalent UPC-A code value. + + UPC-E code as string of digits + equivalent UPC-A code as string of digits + + + + + This object renders an UPC-E code as a {@link BitMatrix}. + @author 0979097955s@gmail.com (RX) + + + + + Metadata about a PDF417 Barcode + + Guenther Grau + + + + A Barcode Value for the PDF417 barcode. + The scanner will iterate through the bitmatrix, + and given the different methods or iterations + will increment a given barcode value's confidence. + + When done, this will return the values of highest confidence. + + Guenther Grau + + + + Incremenets the Confidence for a given value. (Adds an occurance of a value) + + + Value. + + + + Determines the maximum occurrence of a set value and returns all values which were set with this occurrence. + + an array of int, containing the values with the highest occurrence, or null, if no value was set. + + + + Returns the confience value for a given barcode value + + Barcode value. + + + + A Bounding Box helper class + + Guenther Grau + + + + Initializes a new instance of the class. + returns null if the corner points don't match up correctly + + The image. + The top left. + The bottom left. + The top right. + The bottom right. + + + + + Creates the specified box. + + The box. + + + + + Initializes a new instance of the class. + Will throw an exception if the corner points don't match up correctly + + Image. + Top left. + Top right. + Bottom left. + Bottom right. + + + + Merge two Bounding Boxes, getting the left corners of left, and the right corners of right + (Images should be the same) + + Left. + Right. + + + + Adds the missing rows. + + The missing rows. + Missing start rows. + Missing end rows. + If set to true is left. + + + + A Codeword in the PDF417 barcode + + Guenther Grau + + + + Default value for the RowNumber (-1 being an invalid real number) + + + + + Initializes a new instance of the class. + + Start x. + End x. + Bucket. + Value. + + + + Gets the width. + + The width. + + + + Gets a value indicating whether this instance has valid row number. + + true if this instance has valid row number; otherwise, false. + + + + Determines whether this instance is valid row number the specified rowNumber. + + true if this instance is valid row number the specified rowNumber; otherwise, false. + Row number. + + + + Sets the row number as the row's indicator column. + + + + + Returns a that represents the current . + + A that represents the current . + + + +

This class contains the methods for decoding the PDF417 codewords.

+ + SITA Lab (kevin.osullivan@sita.aero) +
+
+ + + Table containing values for the exponent of 900. + This is used in the numeric compaction decode algorithm. + + + + + Text Compaction mode (see 5.4.1.5) permits all printable ASCII characters to be + encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as + well as selected control characters. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + The Text Compaction mode includes all the printable ASCII characters + (i.e. values from 32 to 126) and three ASCII control characters: HT or tab + (ASCII value 9), LF or line feed (ASCII value 10), and CR or carriage + return (ASCII value 13). The Text Compaction mode also includes various latch + and shift characters which are used exclusively within the mode. The Text + Compaction mode encodes up to 2 characters per codeword. The compaction rules + for converting data into PDF417 codewords are defined in 5.4.2.2. The sub-mode + switches are defined in 5.4.2.3. + + The text compaction data. + The byte compaction data if there + was a mode shift. + The size of the text compaction and byte compaction data. + The decoded data is appended to the result. + + + + + Byte Compaction mode (see 5.4.3) permits all 256 possible 8-bit byte values to be encoded. + This includes all ASCII characters value 0 to 127 inclusive and provides for international + character set support. + + The byte compaction mode i.e. 901 or 924 + The array of codewords (data + error) + Currently active character encoding + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Numeric Compaction mode (see 5.4.4) permits efficient encoding of numeric data strings. + + The array of codewords (data + error) + The current index into the codeword array. + The decoded data is appended to the result. + The next index into the codeword array. + + + + + Convert a list of Numeric Compacted codewords from Base 900 to Base 10. + EXAMPLE + Encode the fifteen digit numeric string 000213298174000 + Prefix the numeric string with a 1 and set the initial value of + t = 1 000 213 298 174 000 + Calculate codeword 0 + d0 = 1 000 213 298 174 000 mod 900 = 200 + + t = 1 000 213 298 174 000 div 900 = 1 111 348 109 082 + Calculate codeword 1 + d1 = 1 111 348 109 082 mod 900 = 282 + + t = 1 111 348 109 082 div 900 = 1 234 831 232 + Calculate codeword 2 + d2 = 1 234 831 232 mod 900 = 632 + + t = 1 234 831 232 div 900 = 1 372 034 + Calculate codeword 3 + d3 = 1 372 034 mod 900 = 434 + + t = 1 372 034 div 900 = 1 524 + Calculate codeword 4 + d4 = 1 524 mod 900 = 624 + + t = 1 524 div 900 = 1 + Calculate codeword 5 + d5 = 1 mod 900 = 1 + t = 1 div 900 = 0 + Codeword sequence is: 1, 624, 434, 632, 282, 200 + + Decode the above codewords involves + 1 x 900 power of 5 + 624 x 900 power of 4 + 434 x 900 power of 3 + + 632 x 900 power of 2 + 282 x 900 power of 1 + 200 x 900 power of 0 = 1000213298174000 + + Remove leading 1 => Result is 000213298174000 + The array of codewords + The number of codewords + The decoded string representing the Numeric data. + + + + + + + Guenther Grau + + + + Returns the DetectionResult Columns. This does a fair bit of calculation, so call it sparingly. + + The detection result columns. + + + + Adjusts the indicator column row numbers. + + Detection result column. + + + + return number of codewords which don't have a valid row number. Note that the count is not accurate as codewords . + will be counted several times. It just serves as an indicator to see when we can stop adjusting row numbers + + The row numbers. + + + + Adjusts the row numbers by row. + + The row numbers by row. + + + + Adjusts the row numbers from both Row Indicators + + zero + + + + Adjusts the row numbers from Right Row Indicator. + + The unadjusted row count. + + + + Adjusts the row numbers from Left Row Indicator. + + Unadjusted row Count. + + + + Adjusts the row number if valid. + + The invalid rows + Row indicator row number. + Invalid row counts. + Codeword. + + + + Adjusts the row numbers. + + Barcode column. + Codewords row. + Codewords. + + + + Adjusts the row number. + + true, if row number was adjusted, false otherwise. + Codeword. + Other codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + The maximum distance to search in the codeword array in both the positive and negative directions + + + + + The Bounding Box around the column (in the BitMatrix) + + The box. + + + + The Codewords the Box encodes for, offset by the Box minY. + Remember to Access this ONLY through GetCodeword(imageRow) if you're accessing it in that manner. + + The codewords. + + + + Initializes a new instance of the class. + + The Bounding Box around the column (in the BitMatrix) + + + + Converts the Image's Row to the index in the Codewords array + + The Codeword Index. + Image row. + + + + Converts the Codeword array index into a Row in the Image (BitMatrix) + + The Image Row. + Codeword index. + + + + Gets the codeword for a given row + + The codeword. + Image row. + + + + Gets the codeword closest to the specified row in the image + + Image row. + + + + Sets the codeword for an image row + + Image row. + Codeword. + + + + Returns a that represents the current . + + A that represents the current . + + + + Represents a Column in the Detection Result + + Guenther Grau + + + + Gets or sets a value indicating whether this instance is the left indicator + + true if this instance is left; otherwise, false. + + + + Initializes a new instance of the class. + + Box. + If set to true is left. + + + + Sets the Row Numbers as Inidicator Columns + + + + + TODO implement properly + TODO maybe we should add missing codewords to store the correct row number to make + finding row numbers for other columns easier + use row height count to make detection of invalid row numbers more reliable + + The indicator column row numbers. + Metadata. + + + + Gets the row heights. + + The row heights. + + + + Adjusts the in omplete indicator column row numbers. + + Metadata. + + + + Gets the barcode metadata. + + The barcode metadata. + + + + Prune the codewords which do not match the metadata + TODO Maybe we should keep the incorrect codewords for the start and end positions? + + Codewords. + Metadata. + + + + Returns a that represents the current . + + A that represents the current . + + + +

PDF417 error correction implementation.

+

This example + is quite useful in understanding the algorithm.

+ Sean Owen + +
+
+ + + Initializes a new instance of the class. + + + + + Decodes the specified received. + + received codewords + number of those codewords used for EC + location of erasures + The error locations count. + + + + + Runs the euclidean algorithm (Greatest Common Divisor) until r's degree is less than R/2 + + The euclidean algorithm. + + + + Finds the error locations as a direct application of Chien's search + + The error locations. + Error locator. + + + + Finds the error magnitudes by directly applying Forney's Formula + + The error magnitudes. + Error evaluator. + Error locator. + Error locations. + + + +

A field based on powers of a generator integer, modulo some modulus.

+ +
+ Sean Owen +
+ + + + + Sean Owen + + + + Gets the coefficients. + + The coefficients. + + + + degree of this polynomial + + + + + Gets a value indicating whether this instance is zero. + + true if this polynomial is the monomial "0" + + + + + coefficient of x^degree term in this polynomial + + The degree. + coefficient of x^degree term in this polynomial + + + + evaluation of this polynomial at a given point + + A. + evaluation of this polynomial at a given point + + + + Adds another Modulus + + Other. + + + + Subtract another Modulus + + Other. + + + + Multiply by another Modulus + + Other. + + + + Returns a Negative version of this instance + + + + + Multiply by a Scalar. + + Scalar. + + + + Multiplies by a Monomial + + The by monomial. + Degree. + Coefficient. + + + + Returns a that represents the current . + + A that represents the current . + + + + + + Guenther Grau + creatale GmbH (christoph.schulz@creatale.de) + + + + The ratios table + + + + + Initializes the class & Pre-computes the symbol ratio table. + + + + + Gets the decoded value. + + The decoded value. + Module bit count. + + + + Samples the bit counts. + + The bit counts. + Module bit count. + + + + Gets the decoded codeword value. + + The decoded codeword value. + Module bit count. + + + + Gets the bit value. + + The bit value. + Module bit count. + + + + Gets the closest decoded value. + + The closest decoded value. + Module bit count. + + + + + + Guenther Grau + + + + Decode the specified image, imageTopLeft, imageBottomLeft, imageTopRight, imageBottomRight, minCodewordWidth + and maxCodewordWidth. + TODO: don't pass in minCodewordWidth and maxCodewordWidth, pass in barcode columns for start and stop pattern + columns. That way width can be deducted from the pattern column. + This approach also allows to detect more details about the barcode, e.g. if a bar type (white or black) is wider + than it should be. This can happen if the scanner used a bad blackpoint. + + Image. + Image top left. + Image bottom left. + Image top right. + Image bottom right. + Minimum codeword width. + Max codeword width. + + + + Merge the specified leftRowIndicatorColumn and rightRowIndicatorColumn. + + Left row indicator column. + Right row indicator column. + + + + Adjusts the bounding box. + + The bounding box. + Row indicator column. + + + + Gets the barcode metadata. + + The barcode metadata. + Left row indicator column. + Right row indicator column. + + + + Gets the row indicator column. + + The row indicator column. + Image. + Bounding box. + Start point. + If set to true left to right. + Minimum codeword width. + Max codeword width. + + + + Adjusts the codeword count. + + Detection result. + Barcode matrix. + + + + Creates the decoder result. + + The decoder result. + Detection result. + + + + This method deals with the fact, that the decoding process doesn't always yield a single most likely value. The + current error correction implementation doesn't deal with erasures very well, so it's better to provide a value + for these ambiguous codewords instead of treating it as an erasure. The problem is that we don't know which of + the ambiguous values to choose. We try decode using the first value, and if that fails, we use another of the + ambiguous values and try to decode again. This usually only happens on very hard to read and decode barcodes, + so decoding the normal barcodes is not affected by this. + + The decoder result from ambiguous values. + Ec level. + Codewords. + contains the indexes of erasures. + array with the indexes that have more than one most likely value. + two dimensional array that contains the ambiguous values. The first dimension must + be the same Length as the ambiguousIndexes array. + + + + Creates the barcode matrix. + + The barcode matrix. + Detection result. + + + + Tests to see if the Barcode Column is Valid + + true, if barcode column is valid, false otherwise. + Detection result. + Barcode column. + + + + Gets the start column. + + The start column. + Detection result. + Barcode column. + Image row. + If set to true left to right. + + + + Detects the codeword. + + The codeword. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + Minimum codeword width. + Max codeword width. + + + + Gets the module bit count. + + The module bit count. + Image. + Minimum column. + Max column. + If set to true left to right. + Start column. + Image row. + + + + Gets the number of EC code words. + + The number of EC code words. + Barcode EC level. + + + + Adjusts the codeword start column. + + The codeword start column. + Image. + Minimum column. + Max column. + If set to true left to right. + Codeword start column. + Image row. + + + + Checks the codeword for any skew. + + true, if codeword is within the skew, false otherwise. + Codeword size. + Minimum codeword width. + Max codeword width. + + + + Decodes the codewords. + + The codewords. + Codewords. + Ec level. + Erasures. + + + + Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place. + + The errors. + data and error correction codewords. + positions of any known erasures. + number of error correction codewords that are available in codewords. + + + + Verifies that all is well with the the codeword array. + + Codewords. + Number EC codewords. + + + + Gets the bit count for codeword. + + The bit count for codeword. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Codeword. + + + + Gets the codeword bucket number. + + The codeword bucket number. + Module bit count. + + + + Returns a that represents the jagged array. + + A that represents the jagged array. + Barcode matrix as a jagged array. + + + +

Encapsulates logic that can detect a PDF417 Code in an image, even if the + PDF417 Code is rotated or skewed, or partially obscured.

+ + SITA Lab (kevin.osullivan@sita.aero) + dswitkin@google.com (Daniel Switkin) + Guenther Grau +
+
+ + + B S B S B S B S Bar/Space pattern + 11111111 0 1 0 1 0 1 000. + + + + + 1111111 0 1 000 1 0 1 00 1 + + + + + if we set the value too low, then we don't detect the correct height of the bar if the start patterns are damaged. + if we set the value too high, then we might detect the start pattern from a neighbor barcode. + + + + + A PDF471 barcode should have at least 3 rows, with each row being >= 3 times the module width. Therefore it should be at least + 9 pixels tall. To be conservative, we use about half the size to ensure we don't miss it. + + + + +

Detects a PDF417 Code in an image. Only checks 0 and 180 degree rotations.

+
+ barcode image to decode + optional hints to detector + if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned + + encapsulating results of detecting a PDF417 code + +
+ + + Detects PDF417 codes in an image. Only checks 0 degree rotation (so rotate the matrix and check again outside of this method) + + multiple if true, then the image is searched for multiple codes. If false, then at most one code will be found and returned. + bit matrix to detect barcodes in. + List of ResultPoint arrays containing the coordinates of found barcodes + + + + Locate the vertices and the codewords area of a black blob using the Start and Stop patterns as locators. + + Matrix. + Start row. + Start column. + an array containing the vertices: + vertices[0] x, y top left barcode + vertices[1] x, y bottom left barcode + vertices[2] x, y top right barcode + vertices[3] x, y bottom right barcode + vertices[4] x, y top left codeword area + vertices[5] x, y bottom left codeword area + vertices[6] x, y top right codeword area + vertices[7] x, y bottom right codeword area + + + + + Copies the temp data to the final result + + Result. + Temp result. + Destination indexes. + + + + Finds the rows with the given pattern. + + The rows with pattern. + Matrix. + Height. + Width. + Start row. + Start column. + Pattern. + + + + Finds the guard pattern. Uses System.Linq.Enumerable.Repeat to fill in counters. This might be a performance issue? + + start/end horizontal offset of guard pattern, as an array of two ints. + matrix row of black/white values to search + column x position to start search. + row y position to start search. + width the number of pixels to search on this row. + If set to true search the white patterns first. + pattern of counts of number of black and white pixels that are being searched for as a pattern. + counters array of counters, as long as pattern, to re-use . + + + + Determines how closely a set of observed counts of runs of black/white. + values matches a given target pattern. This is reported as the ratio of + the total variance from the expected pattern proportions across all + pattern elements, to the length of the pattern. + + + ratio of total variance between counters and pattern compared to + total pattern size, where the ratio has been multiplied by 256. + So, 0 means no variance (perfect match); 256 means the total + variance between counters and patterns equals the pattern length, + higher values mean even more variance + + observed counters. + expected pattern. + The most any counter can differ before we give up. + + + + PDF 417 Detector Result class. Skipped private backing stores. + Guenther Grau + + + + + Initializes a new instance of the class. + + Bits. + Points. + + + + Holds all of the information for a barcode in a format where it can be easily accessible + + Jacob Haynes + + + + + the height of the matrix (Rows) + the width of the matrix (Cols) + + + + + Jacob Haynes + + + + + Creates a Barcode row of the width + + The width. + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + Sets a specific location in the bar + + The location in the bar + Black if true, white if false; + + + + + A boolean which is true if the bar black false if it is white + How many spots wide the bar is. + + + + + This function scales the row + + How much you want the image to be scaled, must be greater than or equal to 1. + the scaled row + + + + + Represents possible PDF417 barcode compaction types. + + + + + + + + + + + + + + + + + + + + + + + + + Data object to specify the minimum and maximum number of rows and columns for a PDF417 barcode. + @author qwandor@google.com (Andrew Walbran) + + + + + Initializes a new instance of the class. + + The min cols. + The max cols. + The min rows. + The max rows. + + + + Gets the min cols. + + + + + Gets the max cols. + + + + + Gets the min rows. + + + + + Gets the max rows. + + + + + Top-level class for the logic part of the PDF417 implementation. + + + + + The start pattern (17 bits) + + + + + The stop pattern (18 bits) + + + + + The codeword table from the Annex A of ISO/IEC 15438:2001(E). + + + + + Calculates the necessary number of rows as described in annex Q of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol (r) + + + + Calculates the number of pad codewords as described in 4.9.2 of ISO/IEC 15438:2001(E). + + the number of source codewords prior to the additional of the Symbol Length + Descriptor and any pad codewords + the number of error correction codewords + the number of columns in the symbol in the data region (excluding start, stop and + row indicator codewords) + the number of rows in the symbol + the number of pad codewords + + + + Generates the barcode logic. + + the message to encode + PDF417 error correction level to use + + + + Determine optimal nr of columns and rows for the specified number of + codewords. + + number of code words + number of error correction code words + The longest dimension of the barcode, used for columns + The short dimension of the barcode, used for rows + The height of a row, will alter this parameter if aspectRatio>4 (aspectRatio==AUTO) + dimension object containing cols as width and rows as height + + + + Sets the desired aspect ratio for the output image. + + + + + + Sets max/min row/col values + + maximum allowed columns + minimum allowed columns + maximum allowed rows + minimum allowed rows + + + + Sets compaction to values stored in enum + + compaction mode to use + + + + Sets compact to be true or false + + if true, enables compaction + + + + Sets output encoding. + + sets character encoding to use + + + + Sets the disable eci. + + if set to true don't add an ECI segment for different encodings than default. + + + + defines the level of the error correction / count of error correction codewords + + + + + PDF417 error correction code following the algorithm described in ISO/IEC 15438:2001(E) in + chapter 4.10. + + + + + Tables of coefficients for calculating error correction words + (see annex F, ISO/IEC 15438:2001(E)) + + + + + Determines the number of error correction codewords for a specified error correction + level. + + the error correction level (0-8) + the number of codewords generated for error correction + + + + Determines the error correction level for AUTO + + The error correction level (0-9) + The number of codewords for AUTO errorCorrectionLevel + the number of codewords generated for error correction + + + + Returns the recommended minimum error correction level as described in annex E of + ISO/IEC 15438:2001(E). + + the number of data codewords + the recommended minimum error correction level + + + + Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E). + + the data codewords + the error correction level (0-8) + the String representing the error correction codewords + + + + defines the level of the error correction / count of error correction codewords + + + + + PDF417 high-level encoder following the algorithm described in ISO/IEC 15438:2001(E) in + annex P. + + + + + code for Text compaction + + + + + code for Byte compaction + + + + + code for Numeric compaction + + + + + Text compaction submode Alpha + + + + + Text compaction submode Lower + + + + + Text compaction submode Mixed + + + + + Text compaction submode Punctuation + + + + + mode latch to Text Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters NOT a multiple of 6) + + + + + mode latch to Numeric Compaction mode + + + + + mode shift to Byte Compaction mode + + + + + mode latch to Byte Compaction mode (number of characters a multiple of 6) + + + + + identifier for a user defined Extended Channel Interpretation (ECI) + + + + + identifier for a general purpose ECO format + + + + + identifier for an ECI of a character set of code page + + + + + Raw code table for text compaction Mixed sub-mode + + + + + Raw code table for text compaction: Punctuation sub-mode + + + + + Performs high-level encoding of a PDF417 message using the algorithm described in annex P + of ISO/IEC 15438:2001(E). If byte compaction has been selected, then only byte compaction + is used. + + the message + compaction mode to use + character encoding used to encode in default or byte compaction + or null for default / not applicable + if true, don't add an ECI segment for different encodings than default + the encoded message (the char values range from 0 to 928) + + + + Encode parts of the message using Text Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.2. + + the message + the start position within the message + the number of characters to encode + receives the encoded codewords + should normally be SUBMODE_ALPHA + the text submode in which this method ends + + + + + Encode parts of the message using Byte Compaction as described in ISO/IEC 15438:2001(E), + chapter 4.4.3. The Unicode characters will be converted to binary using the cp437 + codepage. + + the message converted to a byte array + the start position within the message + the number of bytes to encode + the mode from which this method starts + receives the encoded codewords + + + + + Determines the number of consecutive characters that are encodable using numeric compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using text compaction. + + the message + the start position within the message + the requested character count + + + + + Determines the number of consecutive characters that are encodable using binary compaction. + + the message + the message converted to a byte array + the start position within the message + + the requested character count + + + + The class holds the available options for the + + + + + Specifies whether to use compact mode for PDF417 (type ). + + + + + Specifies what compaction mode to use for PDF417 (type + ). + + + + + Specifies the minimum and maximum number of rows and columns for PDF417 (type + ). + + + + + Specifies what degree of error correction to use + + + + + Specifies the aspect ratio of the smallest codeword. + (Width of narrowest bar / Row Height) + + + + + Specifies the desired output image aspect ratio (Width / Height). + The actual aspect ratio is calculated based on the necessary number of codewords. + + + + + Specifies what character encoding to use where applicable (type {@link String}) + + + + + Explicitly disables ECI segment when generating PDF417 Code + That is against the specification but some + readers have problems if the charset is switched from + CP437 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use different encodings + and the ECI segment is omitted. + + + + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Maximum Codewords (Data + Error). + + + + + Gets the bit count sum. + + The bit count sum. + Module bit count. + + + + Converts an ICollection<int> to an int[] + Carry-over from Java. Will likely remove and replace with the Generic .ToArray() method. + + The int array. + List. + + + + Translate the symbol into a codeword + + the codeword corresponding to the symbol. + encoded symbol to translate to a codeword + + + + The sorted table of all possible symbols. Extracted from the PDF417 + specification. The index of a symbol in this table corresponds to the + index into the codeword table. + + + + + This table contains to codewords for all symbols. + + + + + This implementation can detect and decode PDF417 codes in an image. + + SITA Lab (kevin.osullivan@sita.aero) + Guenther Grau + + + + + Locates and decodes a PDF417 code in an image. + + a String representing the content encoded by the PDF417 code + if a PDF417 cannot be decoded + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + **Note** this will return the FIRST barcode discovered if there are many. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Locates and decodes Multiple PDF417 codes in an image. + + an array of Strings representing the content encoded by the PDF417 codes + + + + + Locates and decodes multiple barcodes in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcodes encode + + + + + Decode the specified image, with the hints and optionally multiple barcodes. + Based on Owen's Comments in , this method has been modified to continue silently + if a barcode was not decoded where it was detected instead of throwing a new exception object. + + Image. + Hints. + If set to true multiple. + + + + Gets the maximum width of the barcode + + The max width. + P1. + P2. + + + + Gets the minimum width of the barcode + + The minimum width. + P1. + P2. + + + + Gets the maximum width of the codeword. + + The max codeword width. + P. + + + + Gets the minimum width of the codeword. + + The minimum codeword width. + P. + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + PDF 417 result meta data. + Guenther Grau + + + + + The Segment ID represents the segment of the whole file distributed over different symbols. + + + + + Is the same for each related PDF417 symbol + + + + + old optional data format as int array, always null + + + + + true if it is the last segment + + + + + count of segments, -1 if not set + + + + + Filename of the encoded file + + + + + filesize in bytes of the encoded file + returns filesize in bytes, -1 if not set + + + + + 16-bit CRC checksum using CCITT-16 + returns crc checksum, -1 if not set + + + + + unix epock timestamp, elapsed seconds since 1970-01-01 + returns elapsed seconds, -1 if not set + + + + + Jacob Haynes + qwandor@google.com (Andrew Walbran) + + + + + default white space (margin) around the code + + + + + default error correction level + + + + + default aspect ratio + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + The height of a row in the barcode + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + Takes encoder, accounts for width/height, and retrieves bit matrix + + + + + This takes an array holding the values of the PDF 417 + + a byte array of information with 0 is black, and 1 is white + border around the barcode + BitMatrix of the input + + + + Takes and rotates the it 90 degrees + + + + Sean Owen + + + {@link BitMatrix} to parse + ReaderException if dimension is not >= 21 and 1 mod 4 + + +

Reads format information from one of its two locations within the QR Code.

+ +
+ {@link FormatInformation} encapsulating the QR Code's format info + + ReaderException if both format information locations cannot be parsed as + the valid encoding of format information + +
+ +

Reads version information from one of its two locations within the QR Code.

+ +
+ {@link Version} encapsulating the QR Code's version + + ReaderException if both version information locations cannot be parsed as + the valid encoding of version information + +
+ +

Reads the bits in the {@link BitMatrix} representing the finder pattern in the + correct order in order to reconstruct the codewords bytes contained within the + QR Code.

+ +
+ bytes encoded within the QR Code + + ReaderException if the exact number of bytes expected is not read +
+ + Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + + + Prepare the parser for a mirrored operation. + This flag has effect only on the {@link #readFormatInformation()} and the + {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + {@link #mirror()} method should be called. + + @param mirror Whether to read version and format information mirrored. + + + Mirror the bit matrix in order to attempt a second reading. + + +

Encapsulates a block of data within a QR Code. QR Codes may split their data into + multiple blocks, each of which is a unit of data and error-correction codewords. Each + is represented by an instance of this class.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

When QR Codes use multiple data blocks, they are actually interleaved. + That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + method will separate the data into original blocks.

+ +
+ bytes as read directly from the QR Code + + version of the QR Code + + error-correction level of the QR Code + + {@link DataBlock}s containing original bytes, "de-interleaved" from representation in the + QR Code + +
+ +

Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + including areas used for finder patterns, timing patterns, etc. These areas should be unused + after the point they are unmasked anyway.

+ +

Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + and j is row position. In fact, as the text says, i is row position and j is column position.

+ +
+ Sean Owen +
+ + See ISO 18004:2006 6.8.1 + + +

Implementations of this method reverse the data masking process applied to a QR Code and + make its bits ready to read.

+
+ + representation of QR Code bits + dimension of QR Code, represented by bits, being unmasked +
+ +

QR Codes can encode text as bits in one of several modes, and can use multiple modes + in one QR Code. This class decodes the bits back into text.

+ +

See ISO 18004:2006, 6.4.3 - 6.4.7

+ Sean Owen +
+
+ + + See ISO 18004:2006, 6.4.4 Table 5 + + + + + See specification GBT 18284-2000 + + The bits. + The result. + The count. + + + + +

The main class which implements QR Code decoding -- as opposed to locating and extracting + the QR Code from an image.

+
+ + Sean Owen + +
+ + + Initializes a new instance of the class. + + + + +

Convenience method that can decode a QR Code represented as a 2D array of booleans. + "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

+
+ booleans representing white/black QR Code modules + decoding hints that should be used to influence decoding + + text and bytes encoded within the QR Code + +
+ + +

Given data and error-correction codewords received, possibly corrupted by errors, attempts to + correct the errors in-place using Reed-Solomon error correction.

+
+ data and error correction codewords + number of codewords that are data bytes + +
+ + +

See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + defined by the QR code standard.

+
+ Sean Owen +
+ + L = ~7% correction + + + M = ~15% correction + + + Q = ~25% correction + + + H = ~30% correction + + + + Gets the bits. + + + + + Gets the name. + + + + + Ordinals this instance. + + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Fors the bits. + + int containing the two bits encoding a QR Code's error correction level + + representing the encoded error correction level + + + +

Encapsulates a QR Code's format information, including the data mask used and + error correction level.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + + + + + +
+ + See ISO 18004:2006, Annex C, Table C.1 + + + Offset i holds the number of 1 bits in the binary representation of i + + + + Decodes the format information. + + format info indicator, with mask still applied + The masked format info2. + + information about the format it specifies, or null + if doesn't seem to match any known pattern + + + + +

See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + data can be encoded to bits in the QR code standard.

+
+ Sean Owen +
+ + + Gets the name. + + + + + enumeration for encoding modes + + + + + + + + + + numeric encoding + + + + + alpha-numeric encoding + + + + + structured append + + + + + byte mode encoding + + + + + ECI segment + + + + + Kanji mode + + + + + FNC1 char, first position + + + + + FNC1 char, second position + + + + + Hanzi mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. + + + + Fors the bits. + + four bits encoding a QR Code data mode + + encoded by these bits + + if bits do not correspond to a known mode + + + version in question + + number of bits used, in this QR Code symbol {@link Version}, to encode the + count of characters that will follow encoded in this {@link Mode} + + + + + Gets the bits. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Meta-data container for QR Code decoding. Instances of this class may be used to convey information back to the + decoding caller. Callers are expected to process this. + + + + + Initializes a new instance of the class. + + if set to true [mirrored]. + + + + true if the QR Code was mirrored. + + + + + Apply the result points' order correction due to mirroring. + + Array of points to apply mirror correction to. + + + + See ISO 18004:2006 Annex D + + Sean Owen + + + See ISO 18004:2006 Annex D. + Element i represents the raw version bits that specify version i + 7 + + + + + Gets the version number. + + + + + Gets the alignment pattern centers. + + + + + Gets the total codewords. + + + + + Gets the dimension for version. + + + + + Gets the EC blocks for level. + + The ec level. + + + +

Deduces version information purely from QR Code dimensions.

+ +
+ dimension in modules + + for a QR Code of that dimension or null +
+ + + Gets the version for number. + + The version number. + + + + See ISO 18004:2006 Annex E + + +

Encapsulates a set of error-correction blocks in one symbol version. Most versions will + use blocks of differing sizes within one version, so, this encapsulates the parameters for + each set of blocks. It also holds the number of error-correction codewords per block since it + will be the same across all blocks within one version.

+
+
+ + + Gets the EC codewords per block. + + + + + Gets the num blocks. + + + + + Gets the total EC codewords. + + + + + Gets the EC blocks. + + + + +

Encapsulates the parameters for one error-correction block in one symbol version. + This includes the number of data codewords, and the number of times a block with these + parameters is used consecutively in the QR code version's format.

+
+
+ + + Gets the count. + + + + + Gets the data codewords. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + See ISO 18004:2006 6.5.1 Table 9 + + +

Encapsulates an alignment pattern, which are the smaller square patterns found in + all but the simplest QR Codes.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Determines if this alignment pattern "about equals" an alignment pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + + The i. + The j. + New size of the module. + + + +

This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + patterns but are smaller and appear at regular intervals throughout the image.

+ +

At the moment this only looks for the bottom-right alignment pattern.

+ +

This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + pasted and stripped down here for maximum performance but does unfortunately duplicate + some code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+ +
+ Sean Owen + + www.Redivivus.in (suraj.supekar@redivivus.in) - Ported from ZXING Java Source + +
+ +

Creates a finder that will look in a portion of the whole image.

+ +
+ image to search + + left column from which to start searching + + top row from which to start searching + + width of region to search + + height of region to search + + estimated module size so far + + callback function which is called, when a result point is found +
+ +

This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + it's pretty performance-critical and so is written to be fast foremost.

+ +
+ if found +
+ + Given a count of black/white/black pixels just seen and an end position, + figures the location of the center of this black/white/black run. + + + + count of black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/1 ratios + used by alignment patterns to be considered a match + + + + +

After a horizontal scan finds a potential alignment pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + alignment pattern to see if the same proportion is detected.

+
+ row where an alignment pattern was detected + center of the section that appears to cross an alignment pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of alignment pattern, or null if not found + +
+ +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will see if this pattern had been + found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + found the alignment pattern.

+ +
+ reading state module counts from horizontal scan + + row where alignment pattern may be found + + end of possible alignment pattern in row + + {@link AlignmentPattern} if we have found the same pattern twice, or null if not + +
+ + +

Encapsulates logic that can detect a QR Code in an image, even if the QR Code + is rotated or skewed, or partially obscured.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The image. + + + + Gets the image. + + + + + Gets the result point callback. + + + + +

Detects a QR Code in an image.

+
+ + encapsulating results of detecting a QR Code + +
+ + +

Detects a QR Code in an image.

+
+ optional hints to detector + + encapsulating results of detecting a QR Code + +
+ + + Processes the finder pattern info. + + The info. + + + +

Computes the dimension (number of modules on a size) of the QR Code based on the position + of the finder patterns and estimated module size.

+
+
+ + +

Computes an average estimated module size based on estimated derived from the positions + of the three finder patterns.

+
+ detected top-left finder pattern center + detected top-right finder pattern center + detected bottom-left finder pattern center + estimated module size +
+ +

Estimates module size based on two finder patterns -- it uses + {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + width of each, measuring along the axis between their centers.

+
+
+ + See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + a finder pattern by looking for a black-white-black run from the center in the direction + of another point (another finder pattern center), and in the opposite direction too. + + + +

This method traces a line from a point in the image, in the direction towards another point. + It begins in a black region, and keeps going until it finds white, then black, then white again. + It reports the distance from the start to this point.

+ +

This is used when figuring out how wide a finder pattern is, when the finder pattern + may be skewed or rotated.

+
+
+ + +

Attempts to locate an alignment pattern in a limited region of the image, which is + guessed to contain it. This method uses {@link AlignmentPattern}.

+
+ estimated module size so far + x coordinate of center of area probably containing alignment pattern + y coordinate of above + number of pixels in all directions to search from the center + + if found, or null otherwise + +
+ + +

Encapsulates a finder pattern, which are the three square patterns found in + the corners of QR Codes. It also encapsulates a count of similar finder patterns, + as a convenience to the finder's bookkeeping.

+
+ Sean Owen +
+ + + Gets the size of the estimated module. + + + The size of the estimated module. + + + +

Determines if this finder pattern "about equals" a finder pattern at the stated + position and size -- meaning, it is at nearly the same center with nearly the same size.

+
+
+ + + Combines this object's current estimate of a finder pattern position and module size + with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + based on count. + + The i. + The j. + New size of the module. + + + + +

This class attempts to find finder patterns in a QR Code. Finder patterns are the square + markers at three corners of a QR Code.

+ +

This class is thread-safe but not reentrant. Each thread must allocate its own object.

+
+ Sean Owen +
+ + + 1 pixel/module times 3 modules/center + + + + + support up to version 20 for mobile clients + + + + +

Creates a finder that will search the image for three finder patterns.

+
+ image to search +
+ + + Initializes a new instance of the class. + + The image. + The result point callback. + + + + Gets the image. + + + + + Gets the possible centers. + + + + Given a count of black/white/black/white/black pixels just seen and an end position, + figures the location of the center of this run. + + + + count of black/white/black/white/black pixels just read + + true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + used by finder patterns to be considered a match + + + + + + count of black/white/black/white/black pixels just read + true if the proportions of the counts is close enough to the 1/1/3/1/1 ratios + by finder patterns to be considered a match + + + + After a vertical and horizontal scan finds a potential finder pattern, this method + "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + finder pattern to see if the same proportion is detected. + + row where a finder pattern was detected + center of the section that appears to cross a finder pattern + true if proportions are withing expected limits + + + +

After a horizontal scan finds a potential finder pattern, this method + "cross-checks" by scanning down vertically through the center of the possible + finder pattern to see if the same proportion is detected.

+
+ row where a finder pattern was detected + center of the section that appears to cross a finder pattern + maximum reasonable number of modules that should be + observed in any reading state, based on the results of the horizontal scan + The original state count total. + + vertical center of finder pattern, or null if not found + +
+ +

Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + except it reads horizontally instead of vertically. This is used to cross-cross + check a vertical cross check and locate the real center of the alignment pattern.

+
+
+ + + @see #handlePossibleCenter(int[], int, int) + + reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + ignored + true if a finder pattern candidate was found this time + + + +

This is called when a horizontal scan finds a possible alignment pattern. It will + cross check with a vertical scan, and if successful, will, ah, cross-cross-check + with another horizontal scan. This is needed primarily to locate the real horizontal + center of the pattern in cases of extreme skew. + And then we cross-cross-cross check with another diagonal scan.

+ If that succeeds the finder pattern location is added to a list that tracks + the number of times each location has been nearly-matched as a finder pattern. + Each additional find is more evidence that the location is in fact a finder + pattern center +
+ reading state module counts from horizontal scan + row where finder pattern may be found + end of possible finder pattern in row + + true if a finder pattern candidate was found this time + +
+ + number of rows we could safely skip during scanning, based on the first + two finder patterns that have been located. In some cases their position will + allow us to infer that the third pattern must lie below a certain point farther + down in the image. + + + + true iff we have found at least 3 finder patterns that have been detected + at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + candidates is "pretty similar" + + + + + Get square of distance between a and b. + + + + + + + the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + those have similar module size and form a shape closer to a isosceles right triangle. + + + + + Orders by {@link FinderPatternFinder#getEstimatedModuleSize()} + + + + +

Encapsulates information about finder patterns in an image, including the location of + the three finder patterns, and their estimated module size.

+
+ Sean Owen +
+ + + Initializes a new instance of the class. + + The pattern centers. + + + + Gets the bottom left. + + + + + Gets the top left. + + + + + Gets the top right. + + + + + JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned + 0, 1 and 2 I'm going to use less memory and go with bytes. + + dswitkin@google.com (Daniel Switkin) + + + + Initializes a new instance of the class. + + The width. + The height. + + + + Gets the height. + + + + + Gets the width. + + + + + Gets or sets the with the specified x. + + + + + an internal representation as bytes, in row-major order. array[y][x] represents point (x,y) + + + + + Sets the specified x. + + The x. + The y. + The value. + + + + Sets the specified x. + + The x. + The y. + if set to true [value]. + + + + Clears the specified value. + + The value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen + internally by chooseMode(). On success, store the result in "qrCode". + We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for + "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very + strong error correction for this purpose. + Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() + with which clients can specify the encoding mode. For now, we don't need the functionality. + + text to encode + error correction level to use + representing the encoded QR code + + + + Encodes the specified content. + + The content. + The ec level. + The hints. + + + + + Decides the smallest version of QR code that will contain all of the provided data. + + if the data cannot fit in any version + + + + Gets the alphanumeric code. + + The code. + the code point of the table used in alphanumeric mode or + -1 if there is no corresponding code in the table. + + + + Chooses the mode. + + The content. + + + + + Choose the best mode by examining the content. Note that 'encoding' is used as a hint; + if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}. + + The content. + The encoding. + + + + + true if the number of input bits will fit in a code with the specified version and error correction level. + + + + Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24). + + The num data bytes. + The bits. + + + + Get number of data bytes and number of error correction bytes for block id "blockID". Store + the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of + JISX0510:2004 (p.30) + + The num total bytes. + The num data bytes. + The num RS blocks. + The block ID. + The num data bytes in block. + The num EC bytes in block. + + + + Interleave "bits" with corresponding error correction bytes. On success, store the result in + "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details. + + The bits. + The num total bytes. + The num data bytes. + The num RS blocks. + + + + + Append mode info. On success, store the result in "bits". + + The mode. + The bits. + + + + Append length info. On success, store the result in "bits". + + The num letters. + The version. + The mode. + The bits. + + + + Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". + + The content. + The mode. + The bits. + The encoding. + + + + + + Satoru Takabayashi + Daniel Switkin + Sean Owen + + + + Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and + give penalty to them. Example: 00000 or 11111. + + The matrix. + + + + + Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give + penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a + penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block. + + The matrix. + + + + + Apply mask penalty rule 3 and return the penalty. Find consecutive cells of 00001011101 or + 10111010000, and give penalty to them. If we find patterns like 000010111010000, we give + penalties twice (i.e. 40 * 2). + + The matrix. + + + + + Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give + penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance. + + The matrix. + + + + + Return the mask bit for "getMaskPattern" at "x" and "y". See 8.8 of JISX0510:2004 for mask + pattern conditions. + + The mask pattern. + The x. + The y. + + + + + Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both + vertical and horizontal orders respectively. + + The matrix. + if set to true [is horizontal]. + + + + + + + + satorux@google.com (Satoru Takabayashi) - creator + + + + + Set all cells to 2. 2 means that the cell is empty (not set yet). + + JAVAPORT: We shouldn't need to do this at all. The code should be rewritten to begin encoding + with the ByteMatrix initialized all to zero. + + The matrix. + + + + Build 2D matrix of QR Code from "dataBits" with "ecLevel", "version" and "getMaskPattern". On + success, store the result in "matrix" and return true. + + The data bits. + The ec level. + The version. + The mask pattern. + The matrix. + + + + Embed basic patterns. On success, modify the matrix and return true. + The basic patterns are: + - Position detection patterns + - Timing patterns + - Dark dot at the left bottom corner + - Position adjustment patterns, if need be + + The version. + The matrix. + + + + Embed type information. On success, modify the matrix. + + The ec level. + The mask pattern. + The matrix. + + + + Embed version information if need be. On success, modify the matrix and return true. + See 8.10 of JISX0510:2004 (p.47) for how to embed version information. + + The version. + The matrix. + + + + Embed "dataBits" using "getMaskPattern". On success, modify the matrix and return true. + For debugging purposes, it skips masking process if "getMaskPattern" is -1. + See 8.7 of JISX0510:2004 (p.38) for how to embed data bits. + + The data bits. + The mask pattern. + The matrix. + + + + Return the position of the most significant bit set (to one) in the "value". The most + significant bit is position 32. If there is no bit set, return 0. Examples: + - findMSBSet(0) => 0 + - findMSBSet(1) => 1 + - findMSBSet(255) => 8 + + The value_ renamed. + + + + + Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH + code is used for encoding type information and version information. + Example: Calculation of version information of 7. + f(x) is created from 7. + - 7 = 000111 in 6 bits + - f(x) = x^2 + x^2 + x^1 + g(x) is given by the standard (p. 67) + - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1 + Multiply f(x) by x^(18 - 6) + - f'(x) = f(x) * x^(18 - 6) + - f'(x) = x^14 + x^13 + x^12 + Calculate the remainder of f'(x) / g(x) + x^2 + __________________________________________________ + g(x) )x^14 + x^13 + x^12 + x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2 + -------------------------------------------------- + x^11 + x^10 + x^7 + x^4 + x^2 + + The remainder is x^11 + x^10 + x^7 + x^4 + x^2 + Encode it in binary: 110010010100 + The return value is 0xc94 (1100 1001 0100) + + Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit + operations. We don't care if coefficients are positive or negative. + + The value. + The poly. + + + + + Make bit vector of type information. On success, store the result in "bits" and return true. + Encode error correction level and mask pattern. See 8.9 of + JISX0510:2004 (p.45) for details. + + The ec level. + The mask pattern. + The bits. + + + + Make bit vector of version information. On success, store the result in "bits" and return true. + See 8.10 of JISX0510:2004 (p.45) for details. + + The version. + The bits. + + + + Check if "value" is empty. + + The value. + + true if the specified value is empty; otherwise, false. + + + + + Embed the lonely dark dot at left bottom corner. JISX0510:2004 (p.46) + + The matrix. + + + + + + The x start. + The y start. + The matrix. + + + + Embed position detection patterns and surrounding vertical/horizontal separators. + + The matrix. + + + + Embed position adjustment patterns if need be. + + The version. + The matrix. + + + satorux@google.com (Satoru Takabayashi) - creator + dswitkin@google.com (Daniel Switkin) - ported from C++ + + + + + + + + + Initializes a new instance of the class. + + + + + Gets or sets the mode. + + + The mode. + + + + + Gets or sets the EC level. + + + The EC level. + + + + + Gets or sets the version. + + + The version. + + + + + Gets or sets the mask pattern. + + + The mask pattern. + + + + + Gets or sets the matrix. + + + The matrix. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Check if "mask_pattern" is valid. + + The mask pattern. + + true if [is valid mask pattern] [the specified mask pattern]; otherwise, false. + + + + + The class holds the available options for the QrCodeWriter + + + + + Specifies what degree of error correction to use, for example in QR Codes. + Type depends on the encoder. For example for QR codes it's type + . + + + + + Specifies what character encoding to use where applicable (type ) + + + + + Explicitly disables ECI segment when generating QR Code + That is against the specification of QR Code but some + readers have problems if the charset is switched from + ISO-8859-1 (default) to UTF-8 with the necessary ECI segment. + If you set the property to true you can use UTF-8 encoding + and the ECI segment is omitted. + + + + + Specifies the exact version of QR code to be encoded. An integer, range 1 to 40. If the data specified + cannot fit within the required version, a WriterException will be thrown. + + + + + This implementation can detect and decode QR Codes in an image. + Sean Owen + + + + + Gets the decoder. + + + + + + Locates and decodes a QR code in an image. + + a String representing the content encoded by the QR code + + + + + Locates and decodes a barcode in some format within an image. This method also accepts + hints, each possibly associated to some data, which may help the implementation decode. + + image of barcode to decode + passed as a from + to arbitrary data. The + meaning of the data depends upon the hint type. The implementation may or may not do + anything with these hints. + + String which the barcode encodes + + + + + Resets any internal state the implementation has after a decode, to prepare it + for reuse. + + + + + This method detects a code in a "pure" image -- that is, pure monochrome image + which contains only an unrotated, unskewed, image of a code, with some white border + around it. This is a specialized method that works exceptionally fast in this special + case. + + + + + + + This object renders a QR Code as a BitMatrix 2D array of greyscale values. + + dswitkin@google.com (Daniel Switkin) + + + + + Encode a barcode using the default settings. + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + + + + + The contents to encode in the barcode + The barcode format to generate + The preferred width in pixels + The preferred height in pixels + Additional parameters to supply to the encoder + + The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white) + + +
+
diff --git a/build.cake b/build.cake deleted file mode 100644 index 79a18c5a9..000000000 --- a/build.cake +++ /dev/null @@ -1,84 +0,0 @@ -#tool nuget:?package=XamarinComponent - -#addin nuget:?package=Cake.Android.SdkManager -#addin nuget:?package=Cake.XCode -#addin nuget:?package=Cake.Xamarin -#addin nuget:?package=Cake.Xamarin.Build -#addin nuget:?package=Cake.SemVer -#addin nuget:?package=Cake.FileHelpers -#addin nuget:?package=Cake.MonoApiTools - -var PREVIEW = ""; -var VERSION = EnvironmentVariable ("APPVEYOR_BUILD_VERSION") ?? Argument("version", "0.0.0"); -var NUGET_VERSION_SUFFIX = ""; -var NUGET_VERSION = VERSION + NUGET_VERSION_SUFFIX; - -var ANDROID_HOME = EnvironmentVariable ("ANDROID_HOME") ?? Argument ("android_home", ""); - -var TARGET = Argument ("t", Argument ("target", "Default")); - -Task("externals").Does (() => { - Information ("ANDROID_HOME: {0}", ANDROID_HOME); - - var androidSdkSettings = new AndroidSdkManagerToolSettings { - SdkRoot = ANDROID_HOME, - SkipVersionCheck = true - }; - - try { AcceptLicenses (androidSdkSettings); } catch { } - - AndroidSdkManagerInstall (new [] { - "platforms;android-15", - "platforms;android-23", - "platforms;android-25", - "platforms;android-26" - }, androidSdkSettings); -}); - -Task("libs") - .Does(() => -{ - NuGetRestore("./ZXing.Net.Mobile.sln"); - NuGetRestore("./ZXing.Net.Mobile.Forms.sln"); - - var config = IsRunningOnWindows() ? "ReleaseWin" : "ReleaseMac"; - MSBuild ("./ZXing.Net.Mobile.sln", c => c.SetConfiguration(config).SetMSBuildPlatform(MSBuildPlatform.x86)); - MSBuild ("./ZXing.Net.Mobile.Forms.sln", c => c.SetConfiguration(config).SetMSBuildPlatform(MSBuildPlatform.x86)); -}); - -Task ("samples") - .IsDependentOn("libs") - .Does (() => -{ - NuGetRestore ("./Samples/Android/Sample.Android.sln"); - NuGetRestore ("./Samples/iOS/Sample.iOS.sln"); - NuGetRestore ("./Samples/Forms/Sample.Forms.sln"); - NuGetRestore ("./Samples/WindowsUniversal/Sample.WindowsUniversal.sln"); - - var config = "Release"; - MSBuild ("./Samples/Android/Sample.Android.sln", c => c.SetConfiguration(config).SetMSBuildPlatform(MSBuildPlatform.x86)); - MSBuild ("./Samples/iOS/Sample.iOS.sln", c => c.SetConfiguration(config).SetMSBuildPlatform(MSBuildPlatform.x86)); - - if (IsRunningOnWindows()) { - MSBuild ("./Samples/Forms/Sample.Forms.sln", c => c.SetConfiguration(config).SetMSBuildPlatform(MSBuildPlatform.x86)); - MSBuild ("./Samples/WindowsUniversal/Sample.WindowsUniversal.sln", c => c.SetConfiguration(config).SetMSBuildPlatform(MSBuildPlatform.x86)); - } -}); - -Task ("nuget") - .IsDependentOn("libs") - .Does (() => -{ - NuGetPack ("./ZXing.Net.Mobile.nuspec", new NuGetPackSettings { Version = NUGET_VERSION }); - NuGetPack ("./ZXing.Net.Mobile.Forms.nuspec", new NuGetPackSettings { Version = NUGET_VERSION }); -}); - -Task ("clean") - .Does (() => -{ - CleanDirectories ("./**/bin"); - CleanDirectories ("./**/obj"); -}); - -RunTarget (TARGET); - diff --git a/build.ps1 b/build.ps1 deleted file mode 100644 index e2b60f294..000000000 --- a/build.ps1 +++ /dev/null @@ -1,234 +0,0 @@ -########################################################################## -# This is the Cake bootstrapper script for PowerShell. -# This file was downloaded from https://github.com/cake-build/resources -# Feel free to change this file to fit your needs. -########################################################################## - -<# - -.SYNOPSIS -This is a Powershell script to bootstrap a Cake build. - -.DESCRIPTION -This Powershell script will download NuGet if missing, restore NuGet tools (including Cake) -and execute your Cake build script with the parameters you provide. - -.PARAMETER Script -The build script to execute. -.PARAMETER Target -The build script target to run. -.PARAMETER Configuration -The build configuration to use. -.PARAMETER Verbosity -Specifies the amount of information to be displayed. -.PARAMETER ShowDescription -Shows description about tasks. -.PARAMETER DryRun -Performs a dry run. -.PARAMETER Experimental -Uses the nightly builds of the Roslyn script engine. -.PARAMETER Mono -Uses the Mono Compiler rather than the Roslyn script engine. -.PARAMETER SkipToolPackageRestore -Skips restoring of packages. -.PARAMETER ScriptArgs -Remaining arguments are added here. - -.LINK -https://cakebuild.net - -#> - -[CmdletBinding()] -Param( - [string]$Script = "build.cake", - [string]$Target, - [string]$Configuration, - [ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")] - [string]$Verbosity, - [switch]$ShowDescription, - [Alias("WhatIf", "Noop")] - [switch]$DryRun, - [switch]$Experimental, - [switch]$Mono, - [switch]$SkipToolPackageRestore, - [Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)] - [string[]]$ScriptArgs -) - -[Reflection.Assembly]::LoadWithPartialName("System.Security") | Out-Null -function MD5HashFile([string] $filePath) -{ - if ([string]::IsNullOrEmpty($filePath) -or !(Test-Path $filePath -PathType Leaf)) - { - return $null - } - - [System.IO.Stream] $file = $null; - [System.Security.Cryptography.MD5] $md5 = $null; - try - { - $md5 = [System.Security.Cryptography.MD5]::Create() - $file = [System.IO.File]::OpenRead($filePath) - return [System.BitConverter]::ToString($md5.ComputeHash($file)) - } - finally - { - if ($file -ne $null) - { - $file.Dispose() - } - } -} - -function GetProxyEnabledWebClient -{ - $wc = New-Object System.Net.WebClient - $proxy = [System.Net.WebRequest]::GetSystemWebProxy() - $proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials - $wc.Proxy = $proxy - return $wc -} - -Write-Host "Preparing to run build script..." - -if(!$PSScriptRoot){ - $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent -} - -$TOOLS_DIR = Join-Path $PSScriptRoot "tools" -$ADDINS_DIR = Join-Path $TOOLS_DIR "Addins" -$MODULES_DIR = Join-Path $TOOLS_DIR "Modules" -$NUGET_EXE = Join-Path $TOOLS_DIR "nuget.exe" -$CAKE_EXE = Join-Path $TOOLS_DIR "Cake/Cake.exe" -$NUGET_URL = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" -$PACKAGES_CONFIG = Join-Path $TOOLS_DIR "packages.config" -$PACKAGES_CONFIG_MD5 = Join-Path $TOOLS_DIR "packages.config.md5sum" -$ADDINS_PACKAGES_CONFIG = Join-Path $ADDINS_DIR "packages.config" -$MODULES_PACKAGES_CONFIG = Join-Path $MODULES_DIR "packages.config" - -# Make sure tools folder exists -if ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) { - Write-Verbose -Message "Creating tools directory..." - New-Item -Path $TOOLS_DIR -Type directory | out-null -} - -# Make sure that packages.config exist. -if (!(Test-Path $PACKAGES_CONFIG)) { - Write-Verbose -Message "Downloading packages.config..." - try { - $wc = GetProxyEnabledWebClient - $wc.DownloadFile("https://raw.githubusercontent.com/cake-build/resources/master/packages.config", $PACKAGES_CONFIG) } catch { - Throw "Could not download packages.config." - } -} - -# Try find NuGet.exe in path if not exists -#if (!(Test-Path $NUGET_EXE)) { -# Write-Verbose -Message "Trying to find nuget.exe in PATH..." -# $existingPaths = $Env:Path -Split ';' | Where-Object { (![string]::IsNullOrEmpty($_)) -and (Test-Path $_ -PathType Container) } -# $NUGET_EXE_IN_PATH = Get-ChildItem -Path $existingPaths -Filter "nuget.exe" | Select -First 1 -# if ($NUGET_EXE_IN_PATH -ne $null -and (Test-Path $NUGET_EXE_IN_PATH.FullName)) { -# Write-Verbose -Message "Found in PATH at $($NUGET_EXE_IN_PATH.FullName)." -# $NUGET_EXE = $NUGET_EXE_IN_PATH.FullName -# } -#} - -# Try download NuGet.exe if not exists -if (!(Test-Path $NUGET_EXE)) { - Write-Verbose -Message "Downloading NuGet.exe..." - try { - $wc = GetProxyEnabledWebClient - $wc.DownloadFile($NUGET_URL, $NUGET_EXE) - } catch { - Throw "Could not download NuGet.exe." - } -} - -# Save nuget.exe path to environment to be available to child processed -$ENV:NUGET_EXE = $NUGET_EXE - -# Restore tools from NuGet? -if(-Not $SkipToolPackageRestore.IsPresent) { - Push-Location - Set-Location $TOOLS_DIR - - # Check for changes in packages.config and remove installed tools if true. - [string] $md5Hash = MD5HashFile($PACKAGES_CONFIG) - if((!(Test-Path $PACKAGES_CONFIG_MD5)) -Or - ($md5Hash -ne (Get-Content $PACKAGES_CONFIG_MD5 ))) { - Write-Verbose -Message "Missing or changed package.config hash..." - Remove-Item * -Recurse -Exclude packages.config,nuget.exe - } - - Write-Verbose -Message "Restoring tools from NuGet..." - $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$TOOLS_DIR`"" - - if ($LASTEXITCODE -ne 0) { - Throw "An error occured while restoring NuGet tools." - } - else - { - $md5Hash | Out-File $PACKAGES_CONFIG_MD5 -Encoding "ASCII" - } - Write-Verbose -Message ($NuGetOutput | out-string) - - Pop-Location -} - -# Restore addins from NuGet -if (Test-Path $ADDINS_PACKAGES_CONFIG) { - Push-Location - Set-Location $ADDINS_DIR - - Write-Verbose -Message "Restoring addins from NuGet..." - $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$ADDINS_DIR`"" - - if ($LASTEXITCODE -ne 0) { - Throw "An error occured while restoring NuGet addins." - } - - Write-Verbose -Message ($NuGetOutput | out-string) - - Pop-Location -} - -# Restore modules from NuGet -if (Test-Path $MODULES_PACKAGES_CONFIG) { - Push-Location - Set-Location $MODULES_DIR - - Write-Verbose -Message "Restoring modules from NuGet..." - $NuGetOutput = Invoke-Expression "&`"$NUGET_EXE`" install -ExcludeVersion -OutputDirectory `"$MODULES_DIR`"" - - if ($LASTEXITCODE -ne 0) { - Throw "An error occured while restoring NuGet modules." - } - - Write-Verbose -Message ($NuGetOutput | out-string) - - Pop-Location -} - -# Make sure that Cake has been installed. -if (!(Test-Path $CAKE_EXE)) { - Throw "Could not find Cake.exe at $CAKE_EXE" -} - - - -# Build Cake arguments -$cakeArguments = @("$Script"); -if ($Target) { $cakeArguments += "-target=$Target" } -if ($Configuration) { $cakeArguments += "-configuration=$Configuration" } -if ($Verbosity) { $cakeArguments += "-verbosity=$Verbosity" } -if ($ShowDescription) { $cakeArguments += "-showdescription" } -if ($DryRun) { $cakeArguments += "-dryrun" } -if ($Experimental) { $cakeArguments += "-experimental" } -if ($Mono) { $cakeArguments += "-mono" } -$cakeArguments += $ScriptArgs - -# Start Cake -Write-Host "Running build script..." -&$CAKE_EXE $cakeArguments -exit $LASTEXITCODE \ No newline at end of file diff --git a/build.sh b/build.sh deleted file mode 100644 index 5c4cbe429..000000000 --- a/build.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env bash - -########################################################################## -# This is the Cake bootstrapper script for Linux and OS X. -# This file was downloaded from https://github.com/cake-build/resources -# Feel free to change this file to fit your needs. -########################################################################## - -# Define directories. -SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) -TOOLS_DIR=$SCRIPT_DIR/tools -ADDINS_DIR=$TOOLS_DIR/Addins -MODULES_DIR=$TOOLS_DIR/Modules -NUGET_EXE=$TOOLS_DIR/nuget.exe -CAKE_EXE=$TOOLS_DIR/Cake/Cake.exe -PACKAGES_CONFIG=$TOOLS_DIR/packages.config -PACKAGES_CONFIG_MD5=$TOOLS_DIR/packages.config.md5sum -ADDINS_PACKAGES_CONFIG=$ADDINS_DIR/packages.config -MODULES_PACKAGES_CONFIG=$MODULES_DIR/packages.config - -# Define md5sum or md5 depending on Linux/OSX -MD5_EXE= -if [[ "$(uname -s)" == "Darwin" ]]; then - MD5_EXE="md5 -r" -else - MD5_EXE="md5sum" -fi - -# Define default arguments. -SCRIPT="build.cake" -CAKE_ARGUMENTS=() - -# Parse arguments. -for i in "$@"; do - case $1 in - -s|--script) SCRIPT="$2"; shift ;; - --) shift; CAKE_ARGUMENTS+=("$@"); break ;; - *) CAKE_ARGUMENTS+=("$1") ;; - esac - shift -done - -# Make sure the tools folder exist. -if [ ! -d "$TOOLS_DIR" ]; then - mkdir "$TOOLS_DIR" -fi - -# Make sure that packages.config exist. -if [ ! -f "$TOOLS_DIR/packages.config" ]; then - echo "Downloading packages.config..." - curl -Lsfo "$TOOLS_DIR/packages.config" https://cakebuild.net/download/bootstrapper/packages - if [ $? -ne 0 ]; then - echo "An error occured while downloading packages.config." - exit 1 - fi -fi - -# Download NuGet if it does not exist. -if [ ! -f "$NUGET_EXE" ]; then - echo "Downloading NuGet..." - curl -Lsfo "$NUGET_EXE" https://dist.nuget.org/win-x86-commandline/latest/nuget.exe - if [ $? -ne 0 ]; then - echo "An error occured while downloading nuget.exe." - exit 1 - fi -fi - -# Restore tools from NuGet. -pushd "$TOOLS_DIR" >/dev/null -if [ ! -f "$PACKAGES_CONFIG_MD5" ] || [ "$( cat "$PACKAGES_CONFIG_MD5" | sed 's/\r$//' )" != "$( $MD5_EXE "$PACKAGES_CONFIG" | awk '{ print $1 }' )" ]; then - find . -type d ! -name . | xargs rm -rf -fi - -mono "$NUGET_EXE" install -ExcludeVersion -if [ $? -ne 0 ]; then - echo "Could not restore NuGet tools." - exit 1 -fi - -$MD5_EXE "$PACKAGES_CONFIG" | awk '{ print $1 }' >| "$PACKAGES_CONFIG_MD5" - -popd >/dev/null - -# Restore addins from NuGet. -if [ -f "$ADDINS_PACKAGES_CONFIG" ]; then - pushd "$ADDINS_DIR" >/dev/null - - mono "$NUGET_EXE" install -ExcludeVersion - if [ $? -ne 0 ]; then - echo "Could not restore NuGet addins." - exit 1 - fi - - popd >/dev/null -fi - -# Restore modules from NuGet. -if [ -f "$MODULES_PACKAGES_CONFIG" ]; then - pushd "$MODULES_DIR" >/dev/null - - mono "$NUGET_EXE" install -ExcludeVersion - if [ $? -ne 0 ]; then - echo "Could not restore NuGet modules." - exit 1 - fi - - popd >/dev/null -fi - -# Make sure that Cake has been installed. -if [ ! -f "$CAKE_EXE" ]; then - echo "Could not find Cake.exe at '$CAKE_EXE'." - exit 1 -fi - -# Start Cake -exec mono "$CAKE_EXE" $SCRIPT "${CAKE_ARGUMENTS[@]}" \ No newline at end of file