public override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Create your fragment here Scanner = new BcoreScanner(Activity); Scanner.FoundBcore += OnFoundBcore; Adapter = new BcoreFoundListAdapter(Activity, ListFoundBcoreInfo); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); var toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.main_toolbar); SetSupportActionBar(toolbar); BcoreInfos = new List <BcoreDeviceInfo>(); Adapter = new BcoreFoundListAdapter(this, BcoreInfos); Scanner = new BcoreScanner(this); Scanner.FoundBcore += OnFoundBcore; ProgressScanning = FindViewById <ProgressBar>(Resource.Id.ProgressScanning); ButtonScan = FindViewById <Button>(Resource.Id.ButtonScan); ButtonScan.Click += (s, e) => { if (Scanner.IsScanning) { StopScan(); } else { StartScan(); } }; ListViewBcores = FindViewById <ListView>(Resource.Id.ListFoundBcore); ListViewBcores.Adapter = Adapter; ListViewBcores.ItemClick += OnClickedListItem; }