Esempio n. 1
0
        private static Color GetColorFromRating(BooruSharp.Search.Post.Rating rating)
        {
            switch (rating)
            {
            case BooruSharp.Search.Post.Rating.Explicit:
                return(Color.Red);

            case BooruSharp.Search.Post.Rating.Questionable:
                return(new Color(255, 255, 0));

            case BooruSharp.Search.Post.Rating.Safe:
                return(Color.Green);

            default:
                throw new NotImplementedException();
            }
        }
Esempio n. 2
0
        private string getDescription(int?score, BooruSharp.Search.Post.Rating rating, string[] tags)
        {
            string returnValue = "";

            returnValue += "Rating: " + rating.ToString() + "\n";
            if (score != null)
            {
                returnValue += "Score: " + score + "\n";
            }

            returnValue += "\nTags:\n";
            foreach (string tag in tags)
            {
                returnValue += "`" + tag + "`" + " ";
            }
            return(returnValue);
        }