mirror of
https://github.com/2dust/v2rayN.git
synced 2025-08-23 03:16:53 +00:00
Add Helper folder
This commit is contained in:
parent
5201dd5ad0
commit
c9c1cd8cbb
8 changed files with 11 additions and 10 deletions
|
@ -4,7 +4,7 @@ using ZXing.SkiaSharp;
|
||||||
|
|
||||||
namespace ServiceLib.Common;
|
namespace ServiceLib.Common;
|
||||||
|
|
||||||
public class QRCodeHelper
|
public class QRCodeUtils
|
||||||
{
|
{
|
||||||
public static byte[]? GenQRCode(string? url)
|
public static byte[]? GenQRCode(string? url)
|
||||||
{
|
{
|
|
@ -1,11 +1,12 @@
|
||||||
global using ServiceLib.Base;
|
global using ServiceLib.Base;
|
||||||
global using ServiceLib.Common;
|
global using ServiceLib.Common;
|
||||||
global using ServiceLib.Enums;
|
global using ServiceLib.Enums;
|
||||||
global using ServiceLib.Handler;
|
global using ServiceLib.Handler;
|
||||||
|
global using ServiceLib.Helper;
|
||||||
global using ServiceLib.Handler.Fmt;
|
global using ServiceLib.Handler.Fmt;
|
||||||
global using ServiceLib.Services;
|
global using ServiceLib.Services;
|
||||||
global using ServiceLib.Services.Statistics;
|
global using ServiceLib.Services.Statistics;
|
||||||
global using ServiceLib.Services.CoreConfig;
|
global using ServiceLib.Services.CoreConfig;
|
||||||
global using ServiceLib.Models;
|
global using ServiceLib.Models;
|
||||||
global using ServiceLib.Resx;
|
global using ServiceLib.Resx;
|
||||||
global using ServiceLib.Handler.SysProxy;
|
global using ServiceLib.Handler.SysProxy;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using Downloader;
|
using Downloader;
|
||||||
|
|
||||||
namespace ServiceLib.Common;
|
namespace ServiceLib.Helper;
|
||||||
|
|
||||||
public class DownloaderHelper
|
public class DownloaderHelper
|
||||||
{
|
{
|
|
@ -2,7 +2,7 @@ using System.Net.Http.Headers;
|
||||||
using System.Net.Mime;
|
using System.Net.Mime;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace ServiceLib.Common;
|
namespace ServiceLib.Helper;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// </summary>
|
/// </summary>
|
|
@ -1,7 +1,7 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace ServiceLib.Common;
|
namespace ServiceLib.Helper;
|
||||||
|
|
||||||
public sealed class SQLiteHelper
|
public sealed class SQLiteHelper
|
||||||
{
|
{
|
|
@ -420,7 +420,7 @@ public class MainWindowViewModel : MyReactiveObject
|
||||||
|
|
||||||
public async Task ScanScreenResult(byte[]? bytes)
|
public async Task ScanScreenResult(byte[]? bytes)
|
||||||
{
|
{
|
||||||
var result = QRCodeHelper.ParseBarcode(bytes);
|
var result = QRCodeUtils.ParseBarcode(bytes);
|
||||||
await AddScanResultAsync(result);
|
await AddScanResultAsync(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -437,7 +437,7 @@ public class MainWindowViewModel : MyReactiveObject
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var result = QRCodeHelper.ParseBarcode(fileName);
|
var result = QRCodeUtils.ParseBarcode(fileName);
|
||||||
await AddScanResultAsync(result);
|
await AddScanResultAsync(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ public partial class QrcodeView : UserControl
|
||||||
|
|
||||||
private Bitmap? GetQRCode(string? url)
|
private Bitmap? GetQRCode(string? url)
|
||||||
{
|
{
|
||||||
var bytes = QRCodeHelper.GenQRCode(url);
|
var bytes = QRCodeUtils.GenQRCode(url);
|
||||||
return ByteToBitmap(bytes);
|
return ByteToBitmap(bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ public class QRCodeHelper
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var qrCodeImage = ServiceLib.Common.QRCodeHelper.GenQRCode(strContent);
|
var qrCodeImage = QRCodeUtils.GenQRCode(strContent);
|
||||||
return qrCodeImage is null ? null : ByteToImage(qrCodeImage);
|
return qrCodeImage is null ? null : ByteToImage(qrCodeImage);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
|
|
Loading…
Reference in a new issue