public ScannerPage() { InitializeComponent(); var dialogService = new DialogService((title, msg, cancel) => this.DisplayAlert(title, msg, cancel)); BindingContext = new ScannerViewModel(dialogService); }
public ScannerView(Core.Scanner.ScanType scanType, AdditionalService additionalService = null) { InitializeComponent(); BindingContext = new ScannerViewModel(scanType, additionalService) { Navigation = Navigation }; }
public ScannerPage(ScannerViewModel scannerVM) { InitializeComponent(); scannerVM.CurrentPage = this; scannerVM.CashQRCodeVM.CurrentPage = this; scannerVM.TorchImage = ImageSource.FromResource("Scanner.Resources.Images.Scanner.torch_off.png"); scannerVM.SetOutlineCodeCommand.Execute(null); BindingContext = viewModel = scannerVM; }
public ScannerPage() { BindingContext = new ScannerViewModel(); Content = new StackLayout { HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.FillAndExpand, Orientation = StackOrientation.Vertical, Children = { new Button { Text = "Scan", HorizontalOptions = LayoutOptions.Center, VerticalOptions = LayoutOptions.Center }.Bind(Button.CommandProperty, nameof(ScannerViewModel.ScanCommand)) } }; }
public void FUI_Button_Should_be_disable() { //arrange var scanner = new ScannerViewModel(); scanner.Text = "this is test"; scanner.buttonScan = false; btnTest.EnabledBindTo <ScannerViewModel>(m => m.buttonScan); btnTest.TextBindTo <ScannerViewModel>(m => m.Text); //act btnTest.Load <ScannerViewModel>(scanner); //assert btnTest.Satisfy(c => c.Enabled == false && c.Text == "this is test" ); }
public ScannerPage(IChikwamaNavService navService, NewWalletController controller) { Title = "QRCode Scanner"; this.controller = controller; this.navService = navService; InitializeComponent(); BindingContext = new ScannerViewModel(navService, controller); scannerView.Options = new MobileBarcodeScanningOptions() { UseFrontCameraIfAvailable = false, //update later to come from settings PossibleFormats = new List <BarcodeFormat> { BarcodeFormat.QR_CODE }, TryHarder = true, AutoRotate = false, TryInverted = true, DelayBetweenContinuousScans = 2000 }; }
public void FUI_get_Status_from_Button() { //arrange var scanner = new ScannerViewModel(); btnTest.EnabledBindTo <ScannerViewModel>(m => m.buttonScan); //act btnTest.Enabled = false; scanner.Get <ScannerViewModel>(); //assert scanner.buttonScan .Should().Be.EqualTo(false); //act btnTest.Enabled = true; scanner.Get <ScannerViewModel>(); //assert scanner.buttonScan .Should().Be.EqualTo(true); }
public ScannerView() { InitializeComponent(); DataContext = new ScannerViewModel(); }
public ScannerView() { InitializeComponent(); BindingContext = new ScannerViewModel(this.Navigation); }
public ScannerMgm() { InitializeComponent(); sacnnervm = new ScannerViewModel(); DataContext = sacnnervm; }
public OrderScannerPage() { InitializeComponent(); BindingContext = scannerViewModel = new ScannerViewModel(); }
public ScannedOrder() { InitializeComponent(); BindingContext = new ScannerViewModel(); }