Beispiel #1
0
        public void OnHelp(FingerprintAuthenticationHelp help, string nativeHelpText)
        {
            if (_helpText == null)
            {
                return;
            }

            var text = Configuration.HelpTexts.GetText(help, nativeHelpText);

            if (!string.IsNullOrEmpty(text))
            {
                _helpText.Text       = text;
                _helpText.Visibility = ViewStates.Visible;
            }
        }
        public static string GetText(this AuthenticationHelpTexts texts, FingerprintAuthenticationHelp help,
                                     string nativeText)
        {
            switch (help)
            {
            case FingerprintAuthenticationHelp.MovedTooFast when !string.IsNullOrEmpty(texts.MovedTooFast):
                return(texts.MovedTooFast);

            case FingerprintAuthenticationHelp.MovedTooSlow when !string.IsNullOrEmpty(texts.MovedTooSlow):
                return(texts.MovedTooSlow);

            case FingerprintAuthenticationHelp.Partial when !string.IsNullOrEmpty(texts.Partial):
                return(texts.Partial);

            case FingerprintAuthenticationHelp.Insufficient when !string.IsNullOrEmpty(texts.Insufficient):
                return(texts.Insufficient);

            case FingerprintAuthenticationHelp.Dirty when !string.IsNullOrEmpty(texts.Dirty):
                return(texts.Dirty);
            }

            return(nativeText);
        }
 public void OnHelp(FingerprintAuthenticationHelp help, string nativeHelpText)
 {
 }