private void OnFoundBcore(object sender, BcoreFoundEventArgs e) { if (ListFoundBcoreInfo.Any(i => i.Equals(e.Info))) { return; } Activity.RunOnUiThread(() => { ListFoundBcoreInfo.Add(e.Info); Adapter.NotifyDataSetChanged(); }); }
private void StartScan() { if (Scanner.IsScanning) { return; } Activity.RunOnUiThread(() => { ListFoundBcoreInfo.Clear(); Adapter.NotifyDataSetChanged(); ScanButton.Text = GetText(Resource.String.BtnScanStop); ScanningProgressBar.Visibility = ViewStates.Visible; StartButton.Enabled = false; }); Scanner.StartScan(); ScanTimeoutHandler = new Handler(); ScanTimeoutHandler.PostDelayed(OnTimeoutScan, ScanTimeoutLength); }