Пример #1
0
        public override BlankPizza GetPizza()
        {
            BlankPizza newPizza = pizza;

            pizza = new Italian();
            return(newPizza);
        }
Пример #2
0
        public override AbstractPizza Create()
        {
            AbstractPizza result = pizza;

            pizza = new Italian();
            return(result);
        }
Пример #3
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);
 }
Пример #4
0
 /// <summary>
 /// Clears all string lists within this container.
 /// </summary>
 public void Clear()
 {
     English.Clear();
     Japanese.Clear();
     German.Clear();
     French.Clear();
     Spanish.Clear();
     Italian.Clear();
     Korean.Clear();
     Chinese.Clear();
     Portuguese.Clear();
 }
Пример #5
0
 public bool Contains(string str, StringComparison comparisonType = StringComparison.InvariantCultureIgnoreCase)
 {
     if (English.Equals(str, comparisonType) ||
         French.Equals(str, comparisonType) ||
         German.Equals(str, comparisonType) ||
         Italian.Equals(str, comparisonType) ||
         Japanese.Equals(str, comparisonType) ||
         Korean.Equals(str, comparisonType) ||
         Spanish.Equals(str, comparisonType))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Пример #6
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));
        }
Пример #7
0
 internal void LanguagePacksReadFromCache(Halo2.CacheFile c)
 {
     if (!English.IsLoaded)
     {
         English.ReadFromCache(c);
     }
     if (!Japanese.IsLoaded)
     {
         Japanese.ReadFromCache(c);
     }
     if (!German.IsLoaded)
     {
         German.ReadFromCache(c);
     }
     if (!French.IsLoaded)
     {
         French.ReadFromCache(c);
     }
     if (!Spanish.IsLoaded)
     {
         Spanish.ReadFromCache(c);
     }
     if (!Italian.IsLoaded)
     {
         Italian.ReadFromCache(c);
     }
     if (!Korean.IsLoaded)
     {
         Korean.ReadFromCache(c);
     }
     if (!Chinese.IsLoaded)
     {
         Chinese.ReadFromCache(c);
     }
     if (!Portuguese.IsLoaded)
     {
         Portuguese.ReadFromCache(c);
     }
 }
Пример #8
0
 public ItalianBuilder()
 {
     pizza = new Italian();
 }