Пример #1
0
 public bool DoesContainText(string text)
 {
     return(!string.IsNullOrEmpty(French) && French.IndexOf(text, StringComparison.CurrentCultureIgnoreCase) != -1 ||
            !string.IsNullOrEmpty(English) && English.IndexOf(text, StringComparison.CurrentCultureIgnoreCase) != -1 ||
            !string.IsNullOrEmpty(Portugese) && Portugese.IndexOf(text, StringComparison.CurrentCultureIgnoreCase) != -1 ||
            !string.IsNullOrEmpty(Russish) && Russish.IndexOf(text, StringComparison.CurrentCultureIgnoreCase) != -1 ||
            !string.IsNullOrEmpty(German) && German.IndexOf(text, StringComparison.CurrentCultureIgnoreCase) != -1 ||
            !string.IsNullOrEmpty(Japanish) && Japanish.IndexOf(text, StringComparison.CurrentCultureIgnoreCase) != -1 ||
            !string.IsNullOrEmpty(Dutsh) && Dutsh.IndexOf(text, StringComparison.CurrentCultureIgnoreCase) != -1 |
            !string.IsNullOrEmpty(Spanish) && Spanish.IndexOf(text, StringComparison.CurrentCultureIgnoreCase) != -1 ||
            !string.IsNullOrEmpty(Italian) && Italian.IndexOf(text, StringComparison.CurrentCultureIgnoreCase) != -1);
 }
Пример #2
0
        public bool DoesContainText(string text, Languages lang)
        {
            if (lang == Languages.All)
            {
                return(DoesContainText(text));
            }

            return((lang == Languages.French && !string.IsNullOrEmpty(French) && French.IndexOf(text, StringComparison.CurrentCultureIgnoreCase) != -1) ||
                   (lang == Languages.English && !string.IsNullOrEmpty(English) && English.IndexOf(text, StringComparison.CurrentCultureIgnoreCase) != -1) ||
                   (lang == Languages.Portugese && !string.IsNullOrEmpty(Portugese) && Portugese.IndexOf(text, StringComparison.CurrentCultureIgnoreCase) != -1) ||
                   (lang == Languages.Russish && !string.IsNullOrEmpty(Russish) && Russish.IndexOf(text, StringComparison.CurrentCultureIgnoreCase) != -1) ||
                   (lang == Languages.German && !string.IsNullOrEmpty(German) && German.IndexOf(text, StringComparison.CurrentCultureIgnoreCase) != -1) ||
                   (lang == Languages.Japanish && !string.IsNullOrEmpty(Japanish) && Japanish.IndexOf(text, StringComparison.CurrentCultureIgnoreCase) != -1) ||
                   (lang == Languages.Dutsh && !string.IsNullOrEmpty(Dutsh) && Dutsh.IndexOf(text, StringComparison.CurrentCultureIgnoreCase) != -1) ||
                   (lang == Languages.Spanish && !string.IsNullOrEmpty(Spanish) && Spanish.IndexOf(text, StringComparison.CurrentCultureIgnoreCase) != -1) ||
                   (lang == Languages.Italian && !string.IsNullOrEmpty(Italian) && Italian.IndexOf(text, StringComparison.CurrentCultureIgnoreCase) != -1));
        }