public ScannerViewModel( CashQRCodeViewModel cashQRCodeVM, ScannerSettingsViewModel scannerSettingsVM, ScannerHelper scannerHelper, IPlayer player) : base() { CashQRCodeVM = cashQRCodeVM; ScannerSettingsVM = scannerSettingsVM; this.scannerHelper = scannerHelper; this.player = player; cancellationTS = new CancellationTokenSource(); SetSubscribe(); RunAnimationCommand = new AsyncCommand(RunAnimation); BackCommand = new AsyncCommand(GoToBack); SwitchTorchCommand = new Command(SwitchTorch); TurnTorchCommand = new Command <bool>(TurnTorch); SetOutlineCodeCommand = new Command(SetOutlineCode); InfoCommand = new AsyncCommand(ShowInfo); ScanCommand = new AsyncCommand <string>(Scan); ProcessScanResultCommand = new AsyncCommand <Result>(ProcessScanResult); ScannerSwitchCommand = new Command <bool>(ScannerSwitch); CancelScanningPhotoCommand = new Command(CancelScanningPhoto); }
public ManualScanPage(CashQRCodeViewModel cashQRCodeVM) { InitializeComponent(); fiscalNumberEntry.Completed += (sender, e) => fiscalDocumentEntry.Focus(); fiscalDocumentEntry.Completed += (sender, e) => fiscalSignDocumentEntry.Focus(); fiscalSignDocumentEntry.Completed += (sender, e) => dateTimeEntry.Focus(); cashQRCodeVM.CurrentPage = this; BindingContext = viewModel = cashQRCodeVM; }