Exemple #1
0
        static void FormatDanboInfo(TitleBuilder title, string characters, string copyrights, string artists)
        {
            title.Append('[');
            // If we have characters and copyrights, use them both. If we just have either characters or copyrights
            // use the one we have.
            title.Append(characters);
            if (!string.IsNullOrEmpty(copyrights))
            {
                title.AppendFormat("({0})", copyrights);
            }

            // Use the artists tags if we have them.
            if (!string.IsNullOrEmpty(artists))
            {
                title.Append("drawn by").Append(artists);
            }

            title.Append(']');
        }
Exemple #2
0
        static void FormatBinaryInfo(TitleBuilder title, string content, MediaProperties media, long length)
        {
            if (media.Dimensions.Width > 0 && media.Dimensions.Height > 0)
            {
                title.SetFormat("[ {0}: {1}x{2} ]", content, media.Dimensions.Width, media.Dimensions.Height);
                title.AppendTime(media.Duration);

                if (media.HasAudio)
                {
                    title.Append('♫');
                }

                title.AppendSize(length);
            }
            else
            {
                title.SetFormat("[ {0} ]", content).AppendSize(length);
            }
        }
Exemple #3
0
        protected void FormatMessage(TitleBuilder title, BooruPost.Rating rated, string warning)
        {
            string rating = ResolveRating(rated);

            title.SetFormat("{0}[{1}]", NormalCode, rating).Append(warning);
        }