mirror of
https://github.com/2dust/v2rayN.git
synced 2025-12-01 04:03:00 +00:00
Compare commits
2 commits
bf3703bca1
...
67494108ad
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
67494108ad | ||
|
|
38b2a7d2ca |
6 changed files with 8 additions and 7 deletions
|
|
@ -1,7 +1,7 @@
|
|||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>7.15.6</Version>
|
||||
<Version>7.15.7</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
@ -31,3 +31,4 @@ global using ServiceLib.Manager;
|
|||
global using ServiceLib.Models;
|
||||
global using ServiceLib.Resx;
|
||||
global using ServiceLib.ViewModels;
|
||||
global using v2rayN.Common;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
|
|
|||
Loading…
Reference in a new issue