mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-09 14:05:00 +03:00
Optimize and improve QR code display
This commit is contained in:
@@ -23,8 +23,16 @@ public partial class QrcodeView : UserControl
|
||||
|
||||
private Bitmap? GetQRCode(string? url)
|
||||
{
|
||||
var bytes = QRCodeUtils.GenQRCode(url);
|
||||
return ByteToBitmap(bytes);
|
||||
try
|
||||
{
|
||||
var bytes = QRCodeUtils.GenQRCode(url);
|
||||
return ByteToBitmap(bytes);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logging.SaveLog("GetQRCode", ex);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private Bitmap? ByteToBitmap(byte[]? bytes)
|
||||
|
||||
Reference in New Issue
Block a user