Compare commits

...

2 commits

Author SHA1 Message Date
2dust
67494108ad up 7.15.7
Some checks are pending
release Linux / build (Release) (push) Waiting to run
release Linux / rpm (push) Blocked by required conditions
release macOS / build (Release) (push) Waiting to run
release Windows desktop (Avalonia UI) / build (Release) (push) Waiting to run
release Windows / build (Release) (push) Waiting to run
2025-10-31 19:05:57 +08:00
2dust
38b2a7d2ca Rename QRCodeWindowsUtils 2025-10-31 17:50:28 +08:00
6 changed files with 8 additions and 7 deletions

View file

@ -1,7 +1,7 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<Version>7.15.6</Version> <Version>7.15.7</Version>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>

View file

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

View file

@ -31,3 +31,4 @@ global using ServiceLib.Manager;
global using ServiceLib.Models; global using ServiceLib.Models;
global using ServiceLib.Resx; global using ServiceLib.Resx;
global using ServiceLib.ViewModels; 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) if (Application.Current?.MainWindow is Window window)
{ {
var bytes = QRCodeUtils.CaptureScreen(window); var bytes = QRCodeWindowsUtils.CaptureScreen(window);
await ViewModel?.ScanScreenResult(bytes); await ViewModel?.ScanScreenResult(bytes);
} }

View file

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

View file

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