Skip to content

Commit

Permalink
add background color
Browse files Browse the repository at this point in the history
  • Loading branch information
PackJC committed Apr 15, 2024
1 parent d7ed495 commit f804732
Show file tree
Hide file tree
Showing 39 changed files with 64 additions and 15 deletions.
Binary file modified .vs/QRCodeMaker/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified .vs/QRCodeMaker/v17/.suo
Binary file not shown.
38 changes: 31 additions & 7 deletions Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 18 additions & 3 deletions Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ public partial class Form1 : Form

private readonly Version _version = Assembly.GetExecutingAssembly().GetName().Version;
private string currentVersion;
private string repoOwner = "packjc"; // Replace with your GitHub username
private string repoOwner = "PackJC"; // Replace with your GitHub username
private string repoName = "QRCodeMaker"; // Replace with your repository name
private string logo;
Color qrCodeColor = Color.Black; // Default color
Color qrCodeBackgroundColor = Color.White; // Default color

public Form1()
{
Expand Down Expand Up @@ -60,12 +61,12 @@ private void button1_Click(object sender, EventArgs e)
Bitmap logoImage = new Bitmap(logoPictureBox.Image);

// Generate QR code with logo. Adjust logo size ratio as needed.
qrCodeImage = qrCode.GetGraphic(20, qrCodeColor, Color.White, logoImage, 15);
qrCodeImage = qrCode.GetGraphic(20, qrCodeColor, qrCodeBackgroundColor, logoImage, 15);
}
else
{
// Generate QR code without a logo, but with custom color
qrCodeImage = qrCode.GetGraphic(20, qrCodeColor, Color.White, true);
qrCodeImage = qrCode.GetGraphic(20, qrCodeColor, qrCodeBackgroundColor, true);
}

// Ensure previous QR code image is disposed
Expand Down Expand Up @@ -209,5 +210,19 @@ private void clearLogoButton_Click(object sender, EventArgs e)
logoPictureBox.Image = null; // Remove the image from the PictureBox
}
}

private void btnChangeBackgroundColor_Click(object sender, EventArgs e)
{
ColorDialog cd = new ColorDialog();
cd.AllowFullOpen = true;
cd.Color = colorPanel.BackColor;
cd.FullOpen = true;
cd.AnyColor = true;
if (cd.ShowDialog() == DialogResult.OK)
{
backgroundColorPanel.BackColor = cd.Color;
qrCodeBackgroundColor = cd.Color;
}
}
}
}
2 changes: 1 addition & 1 deletion Properties/PublishProfiles/FolderProfile1.pubxml.user
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<History>True|2024-04-15T17:49:36.4227688Z;False|2024-04-15T13:48:58.1132333-04:00;True|2024-04-15T13:46:55.2870737-04:00;</History>
<History>True|2024-04-15T19:17:50.2306996Z;True|2024-04-15T14:57:03.6975593-04:00;True|2024-04-15T13:49:36.4227688-04:00;False|2024-04-15T13:48:58.1132333-04:00;True|2024-04-15T13:46:55.2870737-04:00;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
Binary file modified bin/Debug/net6.0-windows10.0.22621.0/QRCodeMaker.dll
Binary file not shown.
Binary file modified bin/Debug/net6.0-windows10.0.22621.0/QRCodeMaker.pdb
Binary file not shown.
Binary file modified bin/Release/net6.0-windows10.0.22621.0/QRCodeMaker.dll
Binary file not shown.
Binary file modified bin/Release/net6.0-windows10.0.22621.0/QRCodeMaker.exe
Binary file not shown.
Binary file modified bin/Release/net6.0-windows10.0.22621.0/QRCodeMaker.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified bin/Release/net6.0-windows10.0.22621.0/win-x64/QRCodeMaker.pdb
Binary file not shown.
Binary file not shown.
Binary file modified obj/Debug/net6.0-windows10.0.22621.0/QRCodeMaker.dll
Binary file not shown.
Binary file modified obj/Debug/net6.0-windows10.0.22621.0/QRCodeMaker.pdb
Binary file not shown.
Binary file modified obj/Debug/net6.0-windows10.0.22621.0/ref/QRCodeMaker.dll
Binary file not shown.
Binary file modified obj/Debug/net6.0-windows10.0.22621.0/refint/QRCodeMaker.dll
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,18 @@
using System;
using System.Reflection;

[assembly: System.Reflection.AssemblyCompanyAttribute("QRCodeMaker")]
[assembly: System.Reflection.AssemblyCompanyAttribute("Great Smoky Software")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
[assembly: System.Reflection.AssemblyCopyrightAttribute("Johnny Pack © 2024")]
[assembly: System.Reflection.AssemblyDescriptionAttribute(@"A Windows application designed for QR code generation offers users a convenient and interactive interface to create customized QR codes directly from their desktop. The application's core functionality centers around generating QR codes that encode various types of information, such as URLs, text messages, contact information, or any other string data the user wishes to convert into a QR code format.
")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("QRCodeMaker")]
[assembly: System.Reflection.AssemblyTitleAttribute("QRCodeMaker")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://github.com/PackJC/QRCodeMaker")]
[assembly: System.Resources.NeutralResourcesLanguageAttribute("en")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows10.0.22621.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows10.0.22621.0")]

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ba32ca5f5179c4374cb25e974d8fd5bbbd31e2f1
170c4a7df60e9feac234fdfd3873edd8a2426fa2
Binary file not shown.
Binary file modified obj/Release/net6.0-windows10.0.22621.0/QRCodeMaker.dll
Binary file not shown.
Binary file modified obj/Release/net6.0-windows10.0.22621.0/QRCodeMaker.pdb
Binary file not shown.
Binary file modified obj/Release/net6.0-windows10.0.22621.0/apphost.exe
Binary file not shown.
Binary file modified obj/Release/net6.0-windows10.0.22621.0/ref/QRCodeMaker.dll
Binary file not shown.
Binary file modified obj/Release/net6.0-windows10.0.22621.0/refint/QRCodeMaker.dll
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,18 @@
using System;
using System.Reflection;

[assembly: System.Reflection.AssemblyCompanyAttribute("QRCodeMaker")]
[assembly: System.Reflection.AssemblyCompanyAttribute("Great Smoky Software")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
[assembly: System.Reflection.AssemblyCopyrightAttribute("Johnny Pack © 2024")]
[assembly: System.Reflection.AssemblyDescriptionAttribute(@"A Windows application designed for QR code generation offers users a convenient and interactive interface to create customized QR codes directly from their desktop. The application's core functionality centers around generating QR codes that encode various types of information, such as URLs, text messages, contact information, or any other string data the user wishes to convert into a QR code format.
")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("QRCodeMaker")]
[assembly: System.Reflection.AssemblyTitleAttribute("QRCodeMaker")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://github.com/PackJC/QRCodeMaker")]
[assembly: System.Resources.NeutralResourcesLanguageAttribute("en")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows10.0.22621.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows10.0.22621.0")]

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ba32ca5f5179c4374cb25e974d8fd5bbbd31e2f1
170c4a7df60e9feac234fdfd3873edd8a2426fa2
Binary file not shown.
Binary file not shown.
Binary file modified obj/Release/net6.0-windows10.0.22621.0/win-x64/QRCodeMaker.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit f804732

Please sign in to comment.