protected void FormatMessage(TitleBuilder title, BooruPost.Rating rated, string warning, int postNo) { string rating = ResolveRating(rated); title.SetFormat("{0}[{1}]", NormalCode, rating); title.Append(warning).AppendFormat("[ #{0} ]", postNo); }
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(']'); }
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); } }