Skip to content

Commit 36c748d

Browse files
committed
Fixed templates and NuGet readmes
1 parent 7f18ef7 commit 36c748d

File tree

3 files changed

+30
-42
lines changed

3 files changed

+30
-42
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ Thanks for submitting a pull request! Please provide enough information so that
44
A similar PR may already be submitted!
55
Please search among the Pull request before creating one: https://github.com/codebude/QRCoder/pulls?utf8=%E2%9C%93&q=
66
7-
For more information, see the `CONTRIBUTING` guide.
7+
For more information, see the `CONTRIBUTING` guide.-->
88

99

10-
**Summary**
11-
10+
## Summary
1211
<!-- Summarize your pull request in a couple of words -->
1312

1413
This PR fixes/implements the following **bugs/features**:
@@ -20,16 +19,12 @@ This PR fixes/implements the following **bugs/features**:
2019
* [ ] Breaking changes
2120

2221
<!-- You can skip this if you're fixing a typo or other minor things -->
23-
24-
What existing problem does the pull request solve?
25-
22+
### What existing problem does the pull request solve?**
2623
<!-- Example: When "Adding a function to do X", explain why it is necessary to have a way to do X. -->
2724

28-
**Test plan**
29-
30-
Demonstrate that your code is solid. If possible add a short test case/test steps.
31-
32-
**Closing issues**
25+
## Test plan
26+
<!-- Demonstrate that your code is solid. If possible add a short test case/test steps. -->
3327

28+
## Closing issues
3429
<!-- Put `closes #XXXX` (XXXX=issue number) in your comment to auto-close the issue that your PR fixes (if such). -->
3530
Fixes #

QRCoder.Xaml/Assets/nuget-readme-xaml.md

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
## About
1+
## About
22

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.
3+
QRCoder.Xaml is an extension that provides the `XamlQRCode`-renderer for the popular [QRCoder.NET library](https://www.nuget.org/packages/QRCoder/). It allows you to render QRCodes as `DrawingImage`-objects for usage in WPF/XAML-based projects.
4+
5+
For usage information see the demo code below. For more general information check the [QRCoder-wiki](https://github.com/codebude/QRCoder/wiki).
46

57
***
68

79
## Documentation
810

911
👉 *Your first place to go should be our wiki. Here you can find a detailed documentation of the QRCoder and its functions.*
1012
* [**QRCode Wiki**](https://github.com/codebude/QRCoder/wiki)
13+
* [**QRCode Wiki > XamlQRCode**](https://github.com/codebude/QRCoder/wiki/Advanced-usage---QR-Code-renderers#28-xamlqrcode-renderer-in-detail)
1114
* [Creator's blog (english)](http://en.code-bude.net/2013/10/17/qrcoder-an-open-source-qr-code-generator-implementation-in-csharp/)
1215
* [Creator's blog (german)](http://code-bude.net/2013/10/17/qrcoder-eine-open-source-qr-code-implementierung-in-csharp/)
1316

@@ -16,38 +19,25 @@ The release notes for the current and all past releases can be read here: [📄
1619

1720
## Usage / Quick start
1821

19-
You only need five lines of code, to generate and view your first QR code.
22+
You only need four lines of code, to generate and view your first QR code.
2023

2124
```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);
25+
using (QRCodeGenerator qrGenerator = new QRCodeGenerator())
26+
using (QRCodeData qrCodeData = qrGenerator.CreateQrCode("The text which should be encoded.", eccLevel))
27+
using (XamlQRCode qrCode = new XamlQRCode(qrCodeData))
28+
{
29+
DrawingImage qrCodeAsXaml = qrCode.GetGraphic(20);
30+
}
2631
```
2732

2833
### Optional parameters and overloads
2934

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-
4635
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)
4736

4837
## Help & Issues
4938

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
39+
If you think you have found a bug or have new ideas or feature requests, then feel free to open a new issue: https://github.com/codebude/QRCoder/issues
40+
5141
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
5242

5343

QRCoder/Assets/nuget-readme.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## About
1+
## About
22

33
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.
44

@@ -16,13 +16,15 @@ The release notes for the current and all past releases can be read here: [📄
1616

1717
## Usage / Quick start
1818

19-
You only need five lines of code, to generate and view your first QR code.
19+
You only need four lines of code, to generate and view your first QR code.
2020

2121
```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);
22+
using (QRCodeGenerator qrGenerator = new QRCodeGenerator())
23+
using (QRCodeData qrCodeData = qrGenerator.CreateQrCode("The text which should be encoded.", QRCodeGenerator.ECCLevel.Q))
24+
using (QRCode qrCode = new QRCode(qrCodeData))
25+
{
26+
Bitmap qrCodeImage = qrCode.GetGraphic(20);
27+
}
2628
```
2729

2830
### Optional parameters and overloads
@@ -47,7 +49,8 @@ There are a plenty of other options. So feel free to read more on that in our wi
4749

4850
## Help & Issues
4951

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
52+
If you think you have found a bug or have new ideas or feature requests, then feel free to open a new issue: https://github.com/codebude/QRCoder/issues
53+
5154
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
5255

5356

0 commit comments

Comments
 (0)