using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Xamarin.Forms;
using Xamarin.Forms.Xaml;

namespace XamarinMSSQL.Views
{
	[XamlCompilation(XamlCompilationOptions.Compile)]
	public partial class BarcodePage : ContentPage
	{
		public BarcodePage()
		{
			InitializeComponent();
		}

		private void ZXingScannerView_OnScanResult(ZXing.Result result)
		{
			Device.BeginInvokeOnMainThread(() =>
			{
				scanResultText.Text = $"[{DateTime.FromFileTimeUtc(result.Timestamp)}] {result.Text} (type: {result.BarcodeFormat})";
			});
		}
	}
}