public PinSelectViewModel() { StartPINCommand = new RelayCommand(DoPINSelect, param => this.canExecute); RefreshCommand = new RelayCommand(DoRefresh, param => this.canExecute); try { _token = StartupProperties.URL.ToString(); } catch (Exception ex) { _token = ex.Message; } PINPadSearch search = new PINPadSearch(); var devices = search.SearchForConnectedPINPads(); if (devices.Count() > 0) { PINPads = devices; } else { PINPads = new IPINPad[0]; } }
public void DoRefresh(object obj) { PINPadSearch search = new PINPadSearch(); var devices = search.SearchForConnectedPINPads(); if (devices.Count() > 0) { PINPads = devices; SelectedPINPad = devices[0]; } else { PINPads = new IPINPad[0]; } }
public PINSelectLogic(IPINOperations pinOperations, IPINPad pinPad) { _pinOperations = pinOperations; _pinPad = pinPad; }