Compare commits

..

No commits in common. "67494108ad147a85639329643add400907d5a873" and "bf3703bca1fb9dac6bfbe8c55c6b349668343fcd" have entirely different histories.

6 changed files with 7 additions and 8 deletions

View file

@ -1,7 +1,7 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<Version>7.15.7</Version> <Version>7.15.6</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.Common; namespace v2rayN;
public class QRCodeWindowsUtils public class QRCodeUtils
{ {
public static ImageSource? GetQRCode(string? strContent) public static ImageSource? GetQRCode(string? strContent)
{ {
@ -14,7 +14,7 @@ public class QRCodeWindowsUtils
} }
try try
{ {
var qrCodeImage = QRCodeUtils.GenQRCode(strContent); var qrCodeImage = ServiceLib.Common.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,4 +31,3 @@ 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 = QRCodeWindowsUtils.CaptureScreen(window); var bytes = QRCodeUtils.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 = QRCodeWindowsUtils.GetQRCode(url); var img = QRCodeUtils.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 = QRCodeWindowsUtils.GetQRCode(url); var img = QRCodeUtils.GetQRCode(url);
var dialog = new QrcodeView() var dialog = new QrcodeView()
{ {
imgQrcode = { Source = img }, imgQrcode = { Source = img },