Exemple #1
0
        /// <summary>
        /// Returns the <see cref="GrapeVariety"/> value which represents '<paramref name="info"/>' -or- GrapeVariety.None if unable to convert.
        /// </summary>
        public static GrapeVariety GetFromWineGrapeInfo(WineGrapeInfo info)
        {
            if (info.Level == 0)
            {
                return(GrapeVariety.CabernetSauvignon);
            }
            else if (info.Level == 1)
            {
                return(GrapeVariety.Chardonnay);
            }
            else if (info.Level == 2)
            {
                return(GrapeVariety.CheninBlanc);
            }
            else if (info.Level == 3)
            {
                return(GrapeVariety.Merlot);
            }
            else if (info.Level == 4)
            {
                return(GrapeVariety.PinotNoir);
            }
            else if (info.Level == 5)
            {
                return(GrapeVariety.Riesling);
            }
            else if (info.Level == 6)
            {
                return(GrapeVariety.Sangiovese);
            }
            else if (info.Level == 7)
            {
                return(GrapeVariety.SauvignonBlanc);
            }
            else if (info.Level == 8)
            {
                return(GrapeVariety.Shiraz);
            }
            else if (info.Level == 9)
            {
                return(GrapeVariety.Viognier);
            }
            else if (info.Level == 10)
            {
                return(GrapeVariety.Zinfandel);
            }

            return(GrapeVariety.None);
        }
		public static GrapeVariety GetFromWineGrapeInfo( WineGrapeInfo info )
		{
			if ( info.Level == 0 ) return GrapeVariety.CabernetSauvignon;
			else if ( info.Level == 1 ) return GrapeVariety.Chardonnay;
			else if ( info.Level == 2 ) return GrapeVariety.CheninBlanc;
			else if ( info.Level == 3 ) return GrapeVariety.Merlot;
			else if ( info.Level == 4 ) return GrapeVariety.PinotNoir;
			else if ( info.Level == 5 ) return GrapeVariety.Riesling;
			else if ( info.Level == 6 ) return GrapeVariety.Sangiovese;
			else if ( info.Level == 7 ) return GrapeVariety.SauvignonBlanc;
			else if ( info.Level == 8 ) return GrapeVariety.Shiraz;
			else if ( info.Level == 9 ) return GrapeVariety.Viognier;
			else if ( info.Level == 10 ) return GrapeVariety.Zinfandel;
			else if ( info.Level == 11 ) return GrapeVariety.Apple;
			else if ( info.Level == 12 ) return GrapeVariety.Apricot;
			//else if ( info.Level == 13 ) return GrapeVariety.Cherry;
			else if ( info.Level == 13 ) return GrapeVariety.Mango;
			else if ( info.Level == 14 ) return GrapeVariety.Orange;
			else if ( info.Level == 15 ) return GrapeVariety.Pear;
			else if ( info.Level == 16 ) return GrapeVariety.Peach;
			//else if ( info.Level == 18 ) return GrapeVariety.Blackberry;
			else if ( info.Level == 18 ) return GrapeVariety.BlackRaspberry;
			//else if ( info.Level == 20 ) return GrapeVariety.Blueberry;
			//else if ( info.Level == 21 ) return GrapeVariety.Cranberry;
			else if ( info.Level == 19 ) return GrapeVariety.RedRaspberry;
			else if ( info.Level == 20 ) return GrapeVariety.Strawberry;
			else if ( info.Level == 21 ) return GrapeVariety.Watermelon;
			else if ( info.Level == 22 ) return GrapeVariety.Rice;
			//else if ( info.Level == 26 ) return GrapeVariety.Dandelion;
			return GrapeVariety.None;
		}
        /// <summary>
        /// Returns the <see cref="GrapeVariety"/> value which represents '<paramref name="info"/>' -or- GrapeVariety.None if unable to convert.
        /// </summary>
        public static GrapeVariety GetFromWineGrapeInfo( WineGrapeInfo info )
        {
            if ( info.Level == 0 )
                return GrapeVariety.CabernetSauvignon;
            else if ( info.Level == 1 )
                return GrapeVariety.Chardonnay;
            else if ( info.Level == 2 )
                return GrapeVariety.CheninBlanc;
            else if ( info.Level == 3 )
                return GrapeVariety.Merlot;
            else if ( info.Level == 4 )
                return GrapeVariety.PinotNoir;
            else if ( info.Level == 5 )
                return GrapeVariety.Riesling;
            else if ( info.Level == 6 )
                return GrapeVariety.Sangiovese;
            else if ( info.Level == 7 )
                return GrapeVariety.SauvignonBlanc;
            else if ( info.Level == 8 )
                return GrapeVariety.Shiraz;
            else if ( info.Level == 9 )
                return GrapeVariety.Viognier;
            else if ( info.Level == 10 )
                return GrapeVariety.Zinfandel;

            return GrapeVariety.None;
        }
Exemple #4
0
 public static GrapeVariety GetFromWineGrapeInfo(WineGrapeInfo info)
 {
     if (info.Level == 0)
     {
         return(GrapeVariety.CabernetSauvignon);
     }
     else if (info.Level == 1)
     {
         return(GrapeVariety.Chardonnay);
     }
     else if (info.Level == 2)
     {
         return(GrapeVariety.CheninBlanc);
     }
     else if (info.Level == 3)
     {
         return(GrapeVariety.Merlot);
     }
     else if (info.Level == 4)
     {
         return(GrapeVariety.PinotNoir);
     }
     else if (info.Level == 5)
     {
         return(GrapeVariety.Riesling);
     }
     else if (info.Level == 6)
     {
         return(GrapeVariety.Sangiovese);
     }
     else if (info.Level == 7)
     {
         return(GrapeVariety.SauvignonBlanc);
     }
     else if (info.Level == 8)
     {
         return(GrapeVariety.Shiraz);
     }
     else if (info.Level == 9)
     {
         return(GrapeVariety.Viognier);
     }
     else if (info.Level == 10)
     {
         return(GrapeVariety.Zinfandel);
     }
     else if (info.Level == 11)
     {
         return(GrapeVariety.Apple);
     }
     else if (info.Level == 12)
     {
         return(GrapeVariety.Apricot);
     }
     else if (info.Level == 13)
     {
         return(GrapeVariety.Cherry);
     }
     else if (info.Level == 14)
     {
         return(GrapeVariety.Mango);
     }
     else if (info.Level == 15)
     {
         return(GrapeVariety.Orange);
     }
     else if (info.Level == 16)
     {
         return(GrapeVariety.Pear);
     }
     else if (info.Level == 17)
     {
         return(GrapeVariety.Peach);
     }
     else if (info.Level == 18)
     {
         return(GrapeVariety.Blackberry);
     }
     else if (info.Level == 19)
     {
         return(GrapeVariety.BlackRaspberry);
     }
     else if (info.Level == 20)
     {
         return(GrapeVariety.Blueberry);
     }
     else if (info.Level == 21)
     {
         return(GrapeVariety.Cranberry);
     }
     else if (info.Level == 22)
     {
         return(GrapeVariety.RedRaspberry);
     }
     else if (info.Level == 23)
     {
         return(GrapeVariety.Strawberry);
     }
     else if (info.Level == 24)
     {
         return(GrapeVariety.Watermelon);
     }
     else if (info.Level == 25)
     {
         return(GrapeVariety.Rice);
     }
     else if (info.Level == 26)
     {
         return(GrapeVariety.Dandelion);
     }
     return(GrapeVariety.None);
 }