feat(ads/seo/release): v1.2.0 with live Google Ads, isolated ad profile, ads.txt, and SEO/AEO/GEO optimization
This commit is contained in:
parent
a88aafa1e5
commit
0e568f1f0a
975 changed files with 130593 additions and 16783 deletions
58
src/Paca.App/QrCodeDialog.xaml.cs
Normal file
58
src/Paca.App/QrCodeDialog.xaml.cs
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
using System.Windows.Media.Imaging;
|
||||
using QRCoder;
|
||||
|
||||
namespace Paca.App;
|
||||
|
||||
public partial class QrCodeDialog : Window
|
||||
{
|
||||
public string PageUrl { get; }
|
||||
public string PageTitle { get; }
|
||||
|
||||
public QrCodeDialog(string url, string title)
|
||||
{
|
||||
InitializeComponent();
|
||||
PageUrl = url;
|
||||
PageTitle = title;
|
||||
|
||||
PageTitleText.Text = string.IsNullOrWhiteSpace(title) ? url : title;
|
||||
UrlDisplayBox.Text = url;
|
||||
|
||||
GenerateQrImage(url);
|
||||
}
|
||||
|
||||
private void GenerateQrImage(string url)
|
||||
{
|
||||
try
|
||||
{
|
||||
using var generator = new QRCodeGenerator();
|
||||
using var data = generator.CreateQrCode(string.IsNullOrWhiteSpace(url) ? " " : url, QRCodeGenerator.ECCLevel.M);
|
||||
var qr = new QRCode(data);
|
||||
using var bmp = qr.GetGraphic(8);
|
||||
using var ms = new MemoryStream();
|
||||
bmp.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
|
||||
ms.Position = 0;
|
||||
var frame = BitmapFrame.Create(ms, BitmapCreateOptions.None, BitmapCacheOption.OnLoad);
|
||||
frame.Freeze();
|
||||
QrImage.Source = frame;
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void CopyUrlBtn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
Clipboard.SetText(PageUrl);
|
||||
CopyUrlBtn.Content = "복사됨 ✓";
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void DoneBtn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue