Add Helper folder

This commit is contained in:
2dust 2025-08-17 16:26:13 +08:00
parent 5201dd5ad0
commit c9c1cd8cbb
8 changed files with 11 additions and 10 deletions

View file

@ -4,7 +4,7 @@ using ZXing.SkiaSharp;
namespace ServiceLib.Common;
public class QRCodeHelper
public class QRCodeUtils
{
public static byte[]? GenQRCode(string? url)
{

View file

@ -1,11 +1,12 @@
global using ServiceLib.Base;
global using ServiceLib.Base;
global using ServiceLib.Common;
global using ServiceLib.Enums;
global using ServiceLib.Handler;
global using ServiceLib.Helper;
global using ServiceLib.Handler.Fmt;
global using ServiceLib.Services;
global using ServiceLib.Services.Statistics;
global using ServiceLib.Services.CoreConfig;
global using ServiceLib.Models;
global using ServiceLib.Resx;
global using ServiceLib.Handler.SysProxy;
global using ServiceLib.Handler.SysProxy;

View file

@ -1,7 +1,7 @@
using System.Net;
using Downloader;
namespace ServiceLib.Common;
namespace ServiceLib.Helper;
public class DownloaderHelper
{

View file

@ -2,7 +2,7 @@ using System.Net.Http.Headers;
using System.Net.Mime;
using System.Text;
namespace ServiceLib.Common;
namespace ServiceLib.Helper;
/// <summary>
/// </summary>

View file

@ -1,7 +1,7 @@
using System.Collections;
using SQLite;
namespace ServiceLib.Common;
namespace ServiceLib.Helper;
public sealed class SQLiteHelper
{

View file

@ -420,7 +420,7 @@ public class MainWindowViewModel : MyReactiveObject
public async Task ScanScreenResult(byte[]? bytes)
{
var result = QRCodeHelper.ParseBarcode(bytes);
var result = QRCodeUtils.ParseBarcode(bytes);
await AddScanResultAsync(result);
}
@ -437,7 +437,7 @@ public class MainWindowViewModel : MyReactiveObject
return;
}
var result = QRCodeHelper.ParseBarcode(fileName);
var result = QRCodeUtils.ParseBarcode(fileName);
await AddScanResultAsync(result);
}

View file

@ -23,7 +23,7 @@ public partial class QrcodeView : UserControl
private Bitmap? GetQRCode(string? url)
{
var bytes = QRCodeHelper.GenQRCode(url);
var bytes = QRCodeUtils.GenQRCode(url);
return ByteToBitmap(bytes);
}

View file

@ -17,7 +17,7 @@ public class QRCodeHelper
}
try
{
var qrCodeImage = ServiceLib.Common.QRCodeHelper.GenQRCode(strContent);
var qrCodeImage = QRCodeUtils.GenQRCode(strContent);
return qrCodeImage is null ? null : ByteToImage(qrCodeImage);
}
catch