From efcffde735fa65ae34bae0bcc86313b74ed0e36c Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 20 五月 2024 13:47:38 +0800
Subject: [PATCH] 优化离线数据
---
HDL-ON_Android/Scan.cs | 41 ++---------------------------------------
1 files changed, 2 insertions(+), 39 deletions(-)
diff --git a/HDL-ON_Android/Scan.cs b/HDL-ON_Android/Scan.cs
index f4f5de5..ee51da6 100644
--- a/HDL-ON_Android/Scan.cs
+++ b/HDL-ON_Android/Scan.cs
@@ -36,15 +36,6 @@
public void OpenScan(Action<string> action)
{
resultAction = action;
- //string cancel = "鍙栨秷";
- //string flashText = "";
- //string titleText = "浜岀淮鐮佹壂鎻�";
- //if (Language.CurrentLanguage != "Chinese")
- //{
- // cancel = "Cancel";
- // flashText = "";
- // titleText = "Scan";
- //}
((BaseActivity)Shared.Application.Activity).SetCamera(async (obj) =>
{
@@ -58,37 +49,7 @@
HDL_ON_Android.ScanActivity.InitDdd(this);
- //MobileBarcodeScanner.Initialize(Shared.Application.Activity.Application);
- //var mZXingCustomScanView = new ZXingCustomScanView(Shared.Application.Activity.Application);
- //mZXingCustomScanView.cancelTextView.Text = cancel;
- //mZXingCustomScanView.flashTextView.Text = flashText;
- //mZXingCustomScanView.titleTextView.Text = titleText;
- //mZXingCustomScanView.SetMinimumWidth( 1800);
- //var bOn = false;
- //scanner = new ZXing.Mobile.MobileBarcodeScanner()
- //{
- // UseCustomOverlay = true,
- // CustomOverlay = mZXingCustomScanView
- //};
- ////scanner.CustomOverlay.width
- //mZXingCustomScanView.OnCancel += () =>
- //{
-
- // scanner?.Cancel();
- //};
-
- //mZXingCustomScanView.OnTorch += () =>
- //{
- // bOn = !bOn;
- // scanner?.Torch(bOn);
- //};
}
-
- //var result = await scanner.Scan();
- //if (result != null)
- // action?.Invoke(result.Text);
- //else
- // action?.Invoke(null);
}
else
{
@@ -122,6 +83,8 @@
public static byte[] BytesFromText(string text, int width = 300, int height = 300)
{
+ if (text == "") return null;
+
var barcodeWriter = new ZXing.Mobile.BarcodeWriter
{
Format = ZXing.BarcodeFormat.QR_CODE,
--
Gitblit v1.8.0