add instructions link QR

This commit is contained in:
benbierens 2024-11-09 02:54:48 +01:00
parent 7b45a1171e
commit aa58a7aee4
No known key found for this signature in database
GPG Key ID: 877D2C2E09A22F3A
2 changed files with 4 additions and 2 deletions

View File

@ -19,6 +19,8 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Grid.Column="0" Name="Img" /> <Image Grid.Column="0" Name="Img" />
<StackPanel Grid.Column="1"> <StackPanel Grid.Column="1">
<TextBlock Text="Instructions:"/>
<Image Name="ImgInstructions" />
<TextBlock Text="Local CID:"/> <TextBlock Text="Local CID:"/>
<Image Name="ImgLocalCid" /> <Image Name="ImgLocalCid" />
<TextBlock Text="TestNet CID:"/> <TextBlock Text="TestNet CID:"/>

View File

@ -33,7 +33,6 @@ namespace DevconBoothImages
private async void Button_Click(object sender, RoutedEventArgs e) private async void Button_Click(object sender, RoutedEventArgs e)
{ {
// image // image
Log("Getting image..."); Log("Getting image...");
var file = await imageGenerator.Generate(); var file = await imageGenerator.Generate();
@ -60,7 +59,7 @@ namespace DevconBoothImages
using (QRCodeData qrCodeData = qrGenerator.CreateQrCode(text, QRCodeGenerator.ECCLevel.Default)) using (QRCodeData qrCodeData = qrGenerator.CreateQrCode(text, QRCodeGenerator.ECCLevel.Default))
using (PngByteQRCode qrCode = new PngByteQRCode(qrCodeData)) using (PngByteQRCode qrCode = new PngByteQRCode(qrCodeData))
{ {
byte[] qrCodeImage = qrCode.GetGraphic(12); byte[] qrCodeImage = qrCode.GetGraphic(7);
using (var ms = new MemoryStream(qrCodeImage)) using (var ms = new MemoryStream(qrCodeImage))
{ {
var img = Image.FromStream(ms); var img = Image.FromStream(ms);
@ -150,6 +149,7 @@ namespace DevconBoothImages
ImgLocalCid.Source = GenerateQr(currentLocalCid); ImgLocalCid.Source = GenerateQr(currentLocalCid);
ImgTestnetCid.Source = GenerateQr(currentPublicCid); ImgTestnetCid.Source = GenerateQr(currentPublicCid);
ImgInstructions.Source = GenerateQr("https://github.com/codex-storage/codex-testnet-starter/blob/master/SETUP_DEVCONNET.md");
} }
private void Log(string v) private void Log(string v)