Esempio n. 1
0
        // Returns a path to the image associated with term is term is a valid word,
        // otherwise returns empty string ("")
        public string FetchImagePath(string term)
        {
            string basePath = "../../../word_images/";

            if (Animals.Contains(term))
            {
                return(basePath + "animals/" + term + ".jpg");
            }
            else if (Body_parts.Contains(term))
            {
                return(basePath + "body_parts/" + term + ".jpg");
            }
            else if (Fruit_vegetables.Contains(term))
            {
                return(basePath + "fruit_vegetables/" + term + ".jpg");
            }
            else if (Artificial.Contains(term))
            {
                return(basePath + "artificial/" + term + ".jpg");
            }
            else if (Natural_world.Contains(term))
            {
                return(basePath + "nature/" + term + ".jpg");
            }
            else if (Occupations.Contains(term))
            {
                return(basePath + "occupations/" + term + ".jpg");
            }
            return("");
        }