Rename QRCodeWindowsUtils

This commit is contained in:
2dust 2025-10-31 17:50:28 +08:00
parent bf3703bca1
commit 38b2a7d2ca
5 changed files with 7 additions and 6 deletions

View file

@ -2,9 +2,9 @@ using System.Drawing;
using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace v2rayN;
namespace v2rayN.Common;
public class QRCodeUtils
public class QRCodeWindowsUtils
{
public static ImageSource? GetQRCode(string? strContent)
{
@ -14,7 +14,7 @@ public class QRCodeUtils
}
try
{
var qrCodeImage = ServiceLib.Common.QRCodeUtils.GenQRCode(strContent);
var qrCodeImage = QRCodeUtils.GenQRCode(strContent);
return qrCodeImage is null ? null : ByteToImage(qrCodeImage);
}
catch (Exception ex)

View file

@ -31,3 +31,4 @@ global using ServiceLib.Manager;
global using ServiceLib.Models;
global using ServiceLib.Resx;
global using ServiceLib.ViewModels;
global using v2rayN.Common;

View file

@ -328,7 +328,7 @@ public partial class MainWindow
if (Application.Current?.MainWindow is Window window)
{
var bytes = QRCodeUtils.CaptureScreen(window);
var bytes = QRCodeWindowsUtils.CaptureScreen(window);
await ViewModel?.ScanScreenResult(bytes);
}

View file

@ -170,7 +170,7 @@ public partial class ProfilesView
public async void ShareServer(string url)
{
var img = QRCodeUtils.GetQRCode(url);
var img = QRCodeWindowsUtils.GetQRCode(url);
var dialog = new QrcodeView()
{
imgQrcode = { Source = img },

View file

@ -64,7 +64,7 @@ public partial class SubSettingWindow
{
return;
}
var img = QRCodeUtils.GetQRCode(url);
var img = QRCodeWindowsUtils.GetQRCode(url);
var dialog = new QrcodeView()
{
imgQrcode = { Source = img },