【发布时间】:2017-03-03 15:09:56
【问题描述】:
我在我的 Windows 10 通用应用程序中使用 Zxing.Net.Mobile 包。我使用默认叠加层,这在我看来非常好。现在我想在我的应用程序中添加 Flash/Torch 功能。我只发现解决方案定义了一个新的自定义覆盖。不能在默认叠加层中激活 Torch 按钮吗?我找到了一个scanner.FlashButtonText 定义,所以我认为一个flashbutton 应该以某种方式是可激活的,我只是不知道这个参数的名称。有人可以帮我弄这个吗?谢谢。
我的代码如下所示:
var options = new MobileBarcodeScanningOptions
{
AutoRotate = false,
TryHarder = true,
PossibleFormats = new List<ZXing.BarcodeFormat>
{
ZXing.BarcodeFormat.EAN_8, ZXing.BarcodeFormat.EAN_13, ZXing.BarcodeFormat.UPC_A, ZXing.BarcodeFormat.UPC_E
}
};
var scanner = new MobileBarcodeScanner(this.Dispatcher);
scanner.UseCustomOverlay = false;
scanner.RootFrame = MyFrame;
scanner.TopText = "Halte die Kamera vor den Barcode";
scanner.BottomText = "Die Kamera scannt den Barcode automatisch";
scanner.FlashButtonText = "activate Torch";
var result = await scanner.Scan(options);
【问题讨论】:
标签: win-universal-app zxing torch flashlight