Skip to content

Commit 25e1294

Browse files
committed
Merge from TFS remote branch
2 parents 2087874 + b05c554 commit 25e1294

File tree

8 files changed

+102
-44
lines changed

8 files changed

+102
-44
lines changed

Clients/ASP.NetCoreDemo/Helper/BarcodeTagHelper.cs

+9-9
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
using Microsoft.AspNetCore.Razor.TagHelpers;
2121

2222
using ZXing;
23-
using ZXing.QrCode;
23+
using ZXing.Common;
2424

2525
namespace ASP.NetCoreDemo.Helper
2626
{
@@ -42,16 +42,16 @@ public override void Process(TagHelperContext context, TagHelperOutput output)
4242

4343
var alt = context.AllAttributes["alt"]?.Value.ToString();
4444
var width =
45-
Convert.ToInt32(context.AllAttributes["width"] == null
46-
? "500"
45+
Convert.ToInt32(String.IsNullOrEmpty(context.AllAttributes["width"]?.Value.ToString())
46+
? "1"
4747
: context.AllAttributes["width"].Value.ToString());
4848
var height =
49-
Convert.ToInt32(context.AllAttributes["height"] == null
50-
? "500"
49+
Convert.ToInt32(String.IsNullOrEmpty(context.AllAttributes["height"]?.Value.ToString())
50+
? "1"
5151
: context.AllAttributes["height"].Value.ToString());
5252
var margin =
53-
Convert.ToInt32(context.AllAttributes["margin"] == null
54-
? "5"
53+
Convert.ToInt32(String.IsNullOrEmpty(context.AllAttributes["margin"]?.Value.ToString())
54+
? "0"
5555
: context.AllAttributes["margin"].Value.ToString());
5656
var barcodeformat = BarcodeFormat.QR_CODE;
5757
var outputformat = OutputFormat.PNG;
@@ -88,7 +88,7 @@ private void GeneratePng(TagHelperOutput output, string content, BarcodeFormat b
8888
var qrWriter = new ZXing.BarcodeWriterPixelData
8989
{
9090
Format = barcodeformat,
91-
Options = new QrCodeEncodingOptions { Height = height, Width = width, Margin = margin }
91+
Options = new EncodingOptions { Height = height, Width = width, Margin = margin }
9292
};
9393

9494

@@ -131,7 +131,7 @@ private void GenerateSvg(TagHelperOutput output, string content, BarcodeFormat b
131131
var qrWriter = new ZXing.BarcodeWriterSvg
132132
{
133133
Format = barcodeformat,
134-
Options = new QrCodeEncodingOptions { Height = height, Width = width, Margin = margin }
134+
Options = new EncodingOptions { Height = height, Width = width, Margin = margin }
135135
};
136136

137137

Clients/ASP.NetCoreDemo/Views/Home/Encode.cshtml

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<div class="form-group">
1212
<div class="col-md-10">
1313
<p>Content:</p>
14-
<input type="text" name="content" />
14+
<input type="text" name="content" value="@ViewData["BarcodeContent"]" required />
1515
</div>
1616
<div class="col-md-10">
1717
<p>Type:</p>
@@ -23,15 +23,15 @@
2323
</div>
2424
<div class="col-md-10">
2525
<p>Width:</p>
26-
<input type="text" name="width" value="500" />
26+
<input type="text" name="width" value="@ViewData["BarcodeWidth"]" />
2727
</div>
2828
<div class="col-md-10">
2929
<p>Height:</p>
30-
<input type="text" name="height" value="500" />
30+
<input type="text" name="height" value="@ViewData["BarcodeHeight"]" />
3131
</div>
3232
<div class="col-md-10">
3333
<p>Margin:</p>
34-
<input type="text" name="margin" value="5" />
34+
<input type="text" name="margin" value="@ViewData["BarcodeMargin"]" />
3535
</div>
3636
</div>
3737
<div class="form-group">
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
3+
<metadata>
4+
<version>0.16.0</version>
5+
<authors>Michael Jahn</authors>
6+
<owners>Michael Jahn</owners>
7+
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
8+
<projectUrl>https://github.com/micjahn/ZXing.Net/</projectUrl>
9+
<iconUrl>https://raw.githubusercontent.com/micjahn/ZXing.Net/master/Icons/logo.jpg</iconUrl>
10+
<id>ZXing.Net.Bindings.Kinect.V1</id>
11+
<title>ZXing.Net.Bindings.Kinect.V1</title>
12+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
13+
<description>ZXing.Net Bindings for Kinect V1 - use Kinect with ZXing.Net for barcode reading</description>
14+
<summary>ZXing.Net Bindings for Kinect V1</summary>
15+
<releaseNotes></releaseNotes>
16+
<tags>ZXing Kinect</tags>
17+
<dependencies>
18+
<group targetFramework="net40">
19+
<dependency id="ZXing.Net" version="0.16.0.0" exclude="Build,Analyzers" />
20+
</group>
21+
</dependencies>
22+
</metadata>
23+
<files>
24+
<file src="..\..\..\Build\Release\Bindings\kinect\V1\zxing.kinect.dll" target="lib\net40\zxing.kinect.dll" />
25+
<file src="..\..\..\Build\Release\Bindings\kinect\V1\zxing.kinect.pdb" target="lib\net40\zxing.kinect.pdb" />
26+
<file src="..\..\..\Build\Release\Bindings\kinect\V1\zxing.kinect.xml" target="lib\net40\zxing.kinect.xml" />
27+
</files>
28+
</package>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
3+
<metadata>
4+
<version>0.16.0</version>
5+
<authors>Michael Jahn</authors>
6+
<owners>Michael Jahn</owners>
7+
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
8+
<projectUrl>https://github.com/micjahn/ZXing.Net/</projectUrl>
9+
<iconUrl>https://raw.githubusercontent.com/micjahn/ZXing.Net/master/Icons/logo.jpg</iconUrl>
10+
<id>ZXing.Net.Bindings.Kinect.V2</id>
11+
<title>ZXing.Net.Bindings.Kinect.V2</title>
12+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
13+
<description>ZXing.Net Bindings for Kinect V2 - use Kinect with ZXing.Net for barcode reading</description>
14+
<summary>ZXing.Net Bindings for Kinect V2</summary>
15+
<releaseNotes></releaseNotes>
16+
<tags>ZXing Kinect</tags>
17+
<dependencies>
18+
<group targetFramework="net45">
19+
<dependency id="ZXing.Net" version="0.16.0.0" exclude="Build,Analyzers" />
20+
</group>
21+
</dependencies>
22+
</metadata>
23+
<files>
24+
<file src="..\..\..\Build\Release\Bindings\kinect\V2\zxing.kinect.dll" target="lib\net45\zxing.kinect.dll" />
25+
<file src="..\..\..\Build\Release\Bindings\kinect\V2\zxing.kinect.pdb" target="lib\net45\zxing.kinect.pdb" />
26+
<file src="..\..\..\Build\Release\Bindings\kinect\V2\zxing.kinect.xml" target="lib\net45\zxing.kinect.xml" />
27+
</files>
28+
</package>

build_deployment.cmd

+9-7
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ IF NOT EXIST "%BINARY_DIR%\wp7.1\zxing.wp7.1.dll" GOTO BINARY_WP71_NOT_FOUND
4040
IF NOT EXIST "%BINARY_DIR%\wp8.0\zxing.wp8.0.dll" GOTO BINARY_WP80_NOT_FOUND
4141
IF NOT EXIST "%BINARY_DIR%\monodroid\zxing.monoandroid.dll" GOTO BINARY_MONODROID_NOT_FOUND
4242
IF NOT EXIST "%BINARY_DIR%\winmd\zxing.winmd" GOTO BINARY_WINRTCOMPONENTS_NOT_FOUND
43-
IF NOT EXIST "%CURRENT_DIR%\Source\lib\netstandard\bin\Release\netstandard1.0\zxing.dll" GOTO BINARY_NETSTANDARD10_NOT_FOUND
44-
IF NOT EXIST "%CURRENT_DIR%\Source\lib\netstandard\bin\Release\netstandard1.1\zxing.dll" GOTO BINARY_NETSTANDARD11_NOT_FOUND
45-
IF NOT EXIST "%CURRENT_DIR%\Source\lib\netstandard\bin\Release\netstandard1.3\zxing.dll" GOTO BINARY_NETSTANDARD13_NOT_FOUND
43+
IF NOT EXIST "%CURRENT_DIR%\Source\lib\ZXing.Net\bin\Release\netstandard1.0\zxing.dll" GOTO BINARY_NETSTANDARD10_NOT_FOUND
44+
IF NOT EXIST "%CURRENT_DIR%\Source\lib\ZXing.Net\bin\Release\netstandard1.1\zxing.dll" GOTO BINARY_NETSTANDARD11_NOT_FOUND
45+
IF NOT EXIST "%CURRENT_DIR%\Source\lib\ZXing.Net\bin\Release\netstandard1.3\zxing.dll" GOTO BINARY_NETSTANDARD13_NOT_FOUND
4646
IF NOT EXIST "%CURRENT_DIR%\Source\Bindings\ZXing.CoreCompat.System.Drawing\bin\Release\netstandard1.3\zxing.corecompat.system.drawing.dll" GOTO BINARY_CORECOMPAT_NOT_FOUND
4747
IF NOT EXIST "%CURRENT_DIR%\Source\Bindings\ZXing.ImageSharp\bin\Release\netstandard1.1\zxing.imagesharp.dll" GOTO BINARY_IMAGESHARP_NOT_FOUND
4848
IF NOT EXIST "%BINARY_DIR%\Bindings\kinect\V1\zxing.kinect.dll" GOTO BINARY_KINECT_V1_NOT_FOUND
@@ -164,6 +164,8 @@ MKDIR "%SVN_EXPORT_DIR%\WinMD\Source\lib" >NUL: 2>&1
164164
MKDIR "%SVN_EXPORT_DIR%\WinMD\Clients" >NUL: 2>&1
165165

166166
"%SVN_TOOL%" export --force "%SVN_URL%/Source/lib" "%SVN_EXPORT_DIR%\Base\Source\lib"
167+
"%SVN_TOOL%" export --force "%SVN_URL%/Source/Bindings" "%SVN_EXPORT_DIR%\Base\Source\Bindings"
168+
"%SVN_TOOL%" export --force "%SVN_URL%/Source/interop" "%SVN_EXPORT_DIR%\Base\Source\interop"
167169
"%SVN_TOOL%" export --force "%SVN_URL%/Source/test/src" "%SVN_EXPORT_DIR%\Base\Source\test\src"
168170
"%SVN_TOOL%" export --force "%SVN_URL%/Clients" "%SVN_EXPORT_DIR%\Base\Clients"
169171
"%SVN_TOOL%" export --force "%SVN_URL%/3rdparty/AForge" "%SVN_EXPORT_DIR%\Base\3rdparty\AForge"
@@ -190,7 +192,7 @@ MKDIR "%SVN_EXPORT_DIR%\WinMD\Clients" >NUL: 2>&1
190192
"%SVN_TOOL%" export --force "%SVN_URL_WINMD%/zxing.vs2012.sln" "%SVN_EXPORT_DIR%\WinMD"
191193

192194
CD "%SVN_EXPORT_DIR%"
193-
"%ZIP_TOOL%" a -tzip -mx9 -r "%FILENAME_SOURCE%" Base\Source\lib\*.* Base\Source\test\src\*.* Base\Clients\*.* Base\3rdparty\*.* Base\Key\*.* Base\zxing.sln Base\zxing.ce.sln Base\zxing.vs2012.sln Base\zxing.vs2015.sln Base\zxing.monoandroid.sln Base\zxing.monotouch.sln Base\zxing.nunit Base\THANKS Base\COPYING WinMD\Source\lib\*.* WinMD\Clients\*.* WinMD\Key\*.* WinMD\zxing.vs2012.sln
195+
"%ZIP_TOOL%" a -tzip -mx9 -r "%FILENAME_SOURCE%" Base\Source\lib\*.* Base\Source\Bindings\*.* Base\Source\interop\*.* Base\Source\test\src\*.* Base\Clients\*.* Base\3rdparty\*.* Base\Key\*.* Base\zxing.sln Base\zxing.ce.sln Base\zxing.vs2012.sln Base\zxing.vs2015.sln Base\zxing.monoandroid.sln Base\zxing.monotouch.sln Base\zxing.nunit Base\THANKS Base\COPYING WinMD\Source\lib\*.* WinMD\Clients\*.* WinMD\Key\*.* WinMD\zxing.vs2012.sln
194196
CD "%CURRENT_DIR%"
195197

196198
RMDIR /S /Q "%SVN_EXPORT_DIR%" >NUL: 2>&1
@@ -396,21 +398,21 @@ GOTO END
396398

397399
:BINARY_NETSTANDARD10_NOT_FOUND
398400
ECHO The .Net Standard 1.0 binaries
399-
ECHO %CURRENT_DIR%\Source\lib\netstandard\bin\Release\netstandard1.0\...
401+
ECHO %CURRENT_DIR%\Source\lib\ZXing.Net\bin\Release\netstandard1.0\...
400402
ECHO weren't found.
401403
ECHO.
402404
GOTO END
403405

404406
:BINARY_NETSTANDARD11_NOT_FOUND
405407
ECHO The .Net Standard 1.1 binaries
406-
ECHO %CURRENT_DIR%\Source\lib\netstandard\bin\Release\netstandard1.1\...
408+
ECHO %CURRENT_DIR%\Source\lib\ZXing.Net\bin\Release\netstandard1.1\...
407409
ECHO weren't found.
408410
ECHO.
409411
GOTO END
410412

411413
:BINARY_NETSTANDARD13_NOT_FOUND
412414
ECHO The .Net Standard 1.3 binaries
413-
ECHO %CURRENT_DIR%\Source\lib\netstandard\bin\Release\netstandard1.3\...
415+
ECHO %CURRENT_DIR%\Source\lib\ZXing.Net\bin\Release\netstandard1.3\...
414416
ECHO weren't found.
415417
ECHO.
416418
GOTO END

nuget-pack.cmd

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ SET OUTDIR=Build\Deployment
44
mkdir %OUTDIR%
55

66
3rdParty\nuget\nuget pack zxing.nuspec -outputdirectory %OUTDIR%
7-
3rdParty\nuget\nuget pack Source\adapters\ZXing.CoreCompat.System.Drawing\project.nuspec -outputdirectory %OUTDIR%
8-
3rdParty\nuget\nuget pack Source\adapters\ZXing.ImageSharp\project.nuspec -outputdirectory %OUTDIR%
9-
3rdParty\nuget\nuget pack Source\adapters\ZXing.Magick\project.nuspec -outputdirectory %OUTDIR%
10-
3rdParty\nuget\nuget pack Source\adapters\ZXing.OpenCV\project.nuspec -outputdirectory %OUTDIR%
11-
3rdParty\nuget\nuget pack Source\adapters\ZXing.SkiaSharp\project.nuspec -outputdirectory %OUTDIR%
12-
3rdParty\nuget\nuget pack Source\adapters\ZXing.Kinect\project.V1.nuspec -outputdirectory %OUTDIR%
13-
3rdParty\nuget\nuget pack Source\adapters\ZXing.Kinect\project.V2.nuspec -outputdirectory %OUTDIR%
7+
3rdParty\nuget\nuget pack Source\Bindings\ZXing.CoreCompat.System.Drawing\project.nuspec -outputdirectory %OUTDIR%
8+
3rdParty\nuget\nuget pack Source\Bindings\ZXing.ImageSharp\project.nuspec -outputdirectory %OUTDIR%
9+
3rdParty\nuget\nuget pack Source\Bindings\ZXing.Magick\project.nuspec -outputdirectory %OUTDIR%
10+
3rdParty\nuget\nuget pack Source\Bindings\ZXing.OpenCV\project.nuspec -outputdirectory %OUTDIR%
11+
3rdParty\nuget\nuget pack Source\Bindings\ZXing.SkiaSharp\project.nuspec -outputdirectory %OUTDIR%
12+
3rdParty\nuget\nuget pack Source\Bindings\ZXing.Kinect\project.V1.nuspec -outputdirectory %OUTDIR%
13+
3rdParty\nuget\nuget pack Source\Bindings\ZXing.Kinect\project.V2.nuspec -outputdirectory %OUTDIR%

nuget-push.cmd

+8-8
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ SET VERSION=0.16.0
66
echo Next step - uploading all nuget packages to nuget.org...
77
pause
88

9-
3rdParty\nuget\nuget push Build\Deployment\%ID%.%VERSION%.nupkg
10-
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.CoreCompat.System.Drawing.%VERSION%-beta.nupkg
11-
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.ImageSharp.%VERSION%-beta.nupkg
12-
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.Kinect.V1.%VERSION%.nupkg
13-
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.Kinect.V2.%VERSION%.nupkg
14-
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.Magick.%VERSION%.nupkg
15-
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.OpenCV.%VERSION%.nupkg
16-
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.SkiaSharp.%VERSION%.nupkg
9+
3rdParty\nuget\nuget push Build\Deployment\%ID%.%VERSION%.nupkg -Source https://www.nuget.org/api/v2/package
10+
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.CoreCompat.System.Drawing.%VERSION%-beta.nupkg -Source https://www.nuget.org/api/v2/package
11+
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.ImageSharp.%VERSION%-beta.nupkg -Source https://www.nuget.org/api/v2/package
12+
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.Kinect.V1.%VERSION%.nupkg -Source https://www.nuget.org/api/v2/package
13+
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.Kinect.V2.%VERSION%.nupkg -Source https://www.nuget.org/api/v2/package
14+
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.Magick.%VERSION%.nupkg -Source https://www.nuget.org/api/v2/package
15+
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.OpenCV.%VERSION%.nupkg -Source https://www.nuget.org/api/v2/package
16+
3rdParty\nuget\nuget push Build\Deployment\%ID%.Bindings.SkiaSharp.%VERSION%.nupkg -Source https://www.nuget.org/api/v2/package

zxing.nuspec

+9-9
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,14 @@ It is now compatible with .Net 2.0, .Net 3.5, .Net 4.0, .Net 4.5, .Net 4.6, .Net
122122
<file src="Build\Release\uwp\zxing.pdb" target="lib\uap10\zxing.pdb" />
123123
<file src="Build\Release\uwp\zxing.xml" target="lib\uap10\zxing.xml" />
124124
<file src="Build\Release\uwp\zxing.pri" target="lib\uap10\zxing.pri" />
125-
<file src="Build\Release\netstandard1.0\zxing.dll" target="lib\netstandard1.0\zxing.dll" />
126-
<file src="Build\Release\netstandard1.0\zxing.pdb" target="lib\netstandard1.0\zxing.pdb" />
127-
<file src="Build\Release\netstandard1.0\zxing.xml" target="lib\netstandard1.0\zxing.xml" />
128-
<file src="Build\Release\netstandard1.1\zxing.dll" target="lib\netstandard1.1\zxing.dll" />
129-
<file src="Build\Release\netstandard1.1\zxing.pdb" target="lib\netstandard1.1\zxing.pdb" />
130-
<file src="Build\Release\netstandard1.1\zxing.xml" target="lib\netstandard1.1\zxing.xml" />
131-
<file src="Build\Release\netstandard1.3\zxing.dll" target="lib\netstandard1.3\zxing.dll" />
132-
<file src="Build\Release\netstandard1.3\zxing.pdb" target="lib\netstandard1.3\zxing.pdb" />
133-
<file src="Build\Release\netstandard1.3\zxing.xml" target="lib\netstandard1.3\zxing.xml" />
125+
<file src="Build\Release\netstandard\1.0\zxing.dll" target="lib\netstandard1.0\zxing.dll" />
126+
<file src="Build\Release\netstandard\1.0\zxing.pdb" target="lib\netstandard1.0\zxing.pdb" />
127+
<file src="Build\Release\netstandard\1.0\zxing.xml" target="lib\netstandard1.0\zxing.xml" />
128+
<file src="Build\Release\netstandard\1.1\zxing.dll" target="lib\netstandard1.1\zxing.dll" />
129+
<file src="Build\Release\netstandard\1.1\zxing.pdb" target="lib\netstandard1.1\zxing.pdb" />
130+
<file src="Build\Release\netstandard\1.1\zxing.xml" target="lib\netstandard1.1\zxing.xml" />
131+
<file src="Build\Release\netstandard\1.3\zxing.dll" target="lib\netstandard1.3\zxing.dll" />
132+
<file src="Build\Release\netstandard\1.3\zxing.pdb" target="lib\netstandard1.3\zxing.pdb" />
133+
<file src="Build\Release\netstandard\1.3\zxing.xml" target="lib\netstandard1.3\zxing.xml" />
134134
</files>
135135
</package>

0 commit comments

Comments
 (0)