private static void PageReload() { Page4.GetReplacesView.ItemsSource = ViewItems.GetReplacesList(Replace.GetReplaces); blockIn = null; blockOut = null; PageAddInBlock.Text = "Сканировать установленный блок"; PageAddOutBlock.Text = "Сканировать снятый блок"; Label.Text = "Замена"; PageAddInBlock.IsEnabled = true; PageAddOutBlock.IsEnabled = true; var r_childs = new List <View>() { GetLayout.Children[1], GetLayout.Children[2], GetLayout.Children[3] }; GetLayout.Children.Clear(); foreach (View r in r_childs) { GetLayout.Children.Add(r); } }
public async Task GetQRCodeAsync(bool RepairOrCheck) { var app = Forms.Context as Activity; MobileBarcodeScanner.Initialize(app.Application); var scanner = new MobileBarcodeScanner(); var result = await scanner.Scan(); if (result != null) { string[] block = result.Text.Split(','); Items.CreateItem(block[1], block[2], block[0], RepairOrCheck); Console.WriteLine("Scanned Barcode: " + result.Text); Page1.GetListView.ItemsSource = ViewItems.GetViewItemsList(Items.GetItems); Page4.GetListView.ItemsSource = ViewItems.GetViewItemsList(Items.GetItems); } }