void Advance(JudoEntry entry, bool isValid) { if (_advancer.CanAdvance(entry, isValid)) { var nextEntry = _advancer.Next(); if (nextEntry != null) { nextEntry.Focus(); } } }
void ValidatePart(JudoEntry entry, IValidator validator, CardPart cardPart) { var validationResponse = validator.Validate(entry.Text, _currentDiscoveredNetwork, _acceptedCardNetworks); ChangeValidParts(cardPart, validationResponse.IsValid); entry.Error = !validationResponse.IsValid && validationResponse.ShouldDisplayErrorMessage ? validationResponse.ErrorMessage : null; }
public bool CanAdvance(JudoEntry entry, bool isValid) { return entry.NativeIsFocused && isValid && (entry.Text ?? string.Empty).Length == entry.MaxLength; }
private bool IsMatch(JudoEntry entry) { return string.IsNullOrWhiteSpace(entry.Text) && entry.IsEnabled && entry.IsVisible; }
public void RegisterNext(JudoEntry entry) { _enties.Add(_enties.Count + 1, entry); }