Skip to content

Commit 4720e53

Browse files
committed
Separated XamlQRCode into QRCoder.Xaml
1 parent 75e0db1 commit 4720e53

File tree

6 files changed

+151
-2
lines changed

6 files changed

+151
-2
lines changed
16.5 KB
Loading
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
## About
2+
3+
QRCoder is a simple library, written in C#.NET, which enables you to create QR codes. It hasn't any dependencies to other libraries and is available as .NET Framework and .NET Core PCL version on NuGet.
4+
5+
***
6+
7+
## Documentation
8+
9+
👉 *Your first place to go should be our wiki. Here you can find a detailed documentation of the QRCoder and its functions.*
10+
* [**QRCode Wiki**](https://github.com/codebude/QRCoder/wiki)
11+
* [Creator's blog (english)](http://en.code-bude.net/2013/10/17/qrcoder-an-open-source-qr-code-generator-implementation-in-csharp/)
12+
* [Creator's blog (german)](http://code-bude.net/2013/10/17/qrcoder-eine-open-source-qr-code-implementierung-in-csharp/)
13+
14+
### Release Notes
15+
The release notes for the current and all past releases can be read here: [📄 Release Notes](https://github.com/codebude/QRCoder/wiki/Release-notes)
16+
17+
## Usage / Quick start
18+
19+
You only need five lines of code, to generate and view your first QR code.
20+
21+
```csharp
22+
QRCodeGenerator qrGenerator = new QRCodeGenerator();
23+
QRCodeData qrCodeData = qrGenerator.CreateQrCode("The text which should be encoded.", QRCodeGenerator.ECCLevel.Q);
24+
QRCode qrCode = new QRCode(qrCodeData);
25+
Bitmap qrCodeImage = qrCode.GetGraphic(20);
26+
```
27+
28+
### Optional parameters and overloads
29+
30+
The GetGraphics-method has some more overloads. The first two enable you to set the color of the QR code graphic. One uses Color-class-types, the other HTML hex color notation.
31+
32+
```csharp
33+
//Set color by using Color-class types
34+
Bitmap qrCodeImage = qrCode.GetGraphic(20, Color.DarkRed, Color.PaleGreen, true);
35+
36+
//Set color by using HTML hex color notation
37+
Bitmap qrCodeImage = qrCode.GetGraphic(20, "#000ff0", "#0ff000");
38+
```
39+
40+
The other overload enables you to render a logo/image in the center of the QR code.
41+
42+
```csharp
43+
Bitmap qrCodeImage = qrCode.GetGraphic(20, Color.Black, Color.White, (Bitmap)Bitmap.FromFile("C:\\myimage.png"));
44+
```
45+
46+
There are a plenty of other options. So feel free to read more on that in our wiki: [Wiki: How to use QRCoder](https://github.com/codebude/QRCoder/wiki/How-to-use-QRCoder)
47+
48+
## Help & Issues
49+
50+
If you think you have a bug or have new ideas/feature requests, then feel free to open a new issues: https://github.com/codebude/QRCoder/issues
51+
In case you have a question about using the library (and couldn't find an answer in our wiki), feel free to open a new question/discussion: https://github.com/codebude/QRCoder/discussions
52+
53+
54+
## Legal information and credits
55+
56+
QRCoder is a project by [Raffael Herrmann](https://raffaelherrmann.de) and was first released in 10/2013. It's licensed under the [MIT license](https://github.com/codebude/QRCoder/blob/master/LICENSE.txt).
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// Allgemeine Informationen über eine Assembly werden über die folgenden
6+
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
7+
// die mit einer Assembly verknüpft sind.
8+
[assembly: AssemblyTitle("QRCoder")]
9+
[assembly: AssemblyDescription("QRCoder is a simple library, written in C#.NET, which enables you to create QR Codes. It's licensed under the MIT-license.")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("www.code-bude.net")]
12+
[assembly: AssemblyProduct("QRCoder")]
13+
[assembly: AssemblyCopyright("Copyright © www.code-bude.net / Raffael Herrmann. All rights reserved.")]
14+
[assembly: AssemblyTrademark("written by Raffael Herrmann")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
18+
// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
19+
// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
20+
[assembly: ComVisible(true)]
21+
22+
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
23+
[assembly: Guid("e668b98b-83bb-4e60-b33c-4fd5ed9c0156")]
24+
25+
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
26+
//
27+
// Hauptversion
28+
// Nebenversion
29+
// Buildnummer
30+
// Revision
31+
//
32+
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
33+
// übernehmen, indem Sie "*" eingeben:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.4.3.0")]
36+
[assembly: AssemblyFileVersion("1.4.3.0")]

QRCoder.Xaml/QRCoder.Xaml.csproj

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFrameworks>net35;net40;net5.0-windows;net6.0-windows</TargetFrameworks>
5+
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
6+
<UseWindowsForms Condition="'$(TargetFramework)' == 'net5.0-windows' or '$(TargetFramework)' == 'net6.0-windows'">true</UseWindowsForms>
7+
<UseWPF Condition="'$(TargetFramework)' == 'net5.0-windows' or '$(TargetFramework)' == 'net6.0-windows'">true</UseWPF>
8+
<DefineConstants Condition="'$(TargetFramework)' == 'net5.0-windows'">$(DefineConstants);NET5_0_WINDOWS</DefineConstants>
9+
<CheckEolTargetFramework>false</CheckEolTargetFramework>
10+
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
11+
</PropertyGroup>
12+
13+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
14+
<NoWarn />
15+
</PropertyGroup>
16+
17+
<PropertyGroup>
18+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
19+
<PackageId>QRCoder.Xaml</PackageId>
20+
<Version>1.4.3</Version>
21+
<Authors>Raffael Herrmann</Authors>
22+
<PackageOwners>Raffael Herrmann</PackageOwners>
23+
<AssemblyName>QRCoder.Xaml</AssemblyName>
24+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
25+
<PackageProjectUrl>https://github.com/codebude/QRCoder.Xaml/</PackageProjectUrl>
26+
<PackageIcon>nuget-icon-xaml.png</PackageIcon>
27+
<PackageReadmeFile>nuget-readme-xaml.md</PackageReadmeFile>
28+
<PackageTags>c# csharp qr QRCoder.Xaml qrcode qr-generator qr-code-generator</PackageTags>
29+
<RepositoryUrl>https://github.com/codebude/QRCoder.Xaml.git</RepositoryUrl>
30+
<RepositoryType>git</RepositoryType>
31+
<Description>QRCoder.Xaml is the XamlQRCode-extension for the popular QRCoder .NET library.</Description>
32+
</PropertyGroup>
33+
34+
<ItemGroup>
35+
<None Include="Assets\nuget-icon-xaml.png" Pack="true" PackagePath="\" />
36+
<None Include="Assets\nuget-readme-xaml.md" Pack="true" PackagePath="\" />
37+
</ItemGroup>
38+
39+
<ItemGroup Condition=" '$(TargetFramework)' == 'net35' or '$(TargetFramework)' == 'net40' ">
40+
<Reference Include="PresentationCore" />
41+
<Reference Include="PresentationFramework" />
42+
<Reference Include="WindowsBase" />
43+
</ItemGroup>
44+
45+
<ItemGroup>
46+
<ProjectReference Include="..\QRCoder\QRCoder.csproj" />
47+
</ItemGroup>
48+
49+
<PropertyGroup>
50+
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net35'">$(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\Client</FrameworkPathOverride>
51+
<AutomaticallyUseReferenceAssemblyPackages Condition=" '$(TargetFramework)' == 'net35' ">false</AutomaticallyUseReferenceAssemblyPackages>
52+
<SignAssembly>true</SignAssembly>
53+
<AssemblyOriginatorKeyFile>QRCoder.XamlStrongName.snk</AssemblyOriginatorKeyFile>
54+
<DelaySign>false</DelaySign>
55+
</PropertyGroup>
56+
57+
</Project>
596 Bytes
Binary file not shown.

QRCoder/XamlQRCode.cs renamed to QRCoder.Xaml/XamlQRCode.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#if NETFRAMEWORK || NET5_0_WINDOWS
1+
#if NETFRAMEWORK || NET5_0_WINDOWS || NET6_0_WINDOWS
22
using System;
33
using System.Windows;
44
using System.Windows.Media;
55
using static QRCoder.QRCodeGenerator;
66

7-
namespace QRCoder
7+
namespace QRCoder.Xaml
88
{
99
public class XamlQRCode : AbstractQRCode, IDisposable
1010
{

0 commit comments

Comments
 (0)