Exemplo n.º 1
0
        public override string ToString(FormatType format, object supplement = null)
        {
            bool   withoutConstant = SongGenreSplash == null;
            string splashAndDxData = $"{SongGenreSplash?.Be($"\n分类:{SongGenreSplash}")}" +
                                     $"{ToSplashRatingString()?.Be("\n难度:{0}", true)}" +
                                     $"{ToSplashConstantString()?.Be("\n定数:{0}", true)}" +
                                     $"{ToRatingString()?.Be("\n旧难度:{0}", true)}" +
                                     $"{ToConstantString()?.Be("\n旧定数:{0}", true)}";

            switch (format)
            {
            case FormatType.Brief:
                return($"{SongId}.{SongTitle}({SongType}) {(withoutConstant ? $"*[{ToSplashRatingString()}]" : $"[{ToSplashConstantString()}]")}");

            case FormatType.Detail:
                return($"{JacketUrl?.Be(new KouImage(JacketUrl, this).ToKouResourceString())}" +     //BUG 需要解决翻页可能会使得图片资源字符串裂开的问题
                       $"{SongId}.{SongTitle} [{SongType}]" +
                       splashAndDxData +
                       Version?.Be($"\n版本:{Version}") +
                       SongArtist?.Be($"\n曲师:{SongArtist}") +
                       SongBpm?.Be($"\nBPM:{SongBpm}") +
                       SongLength?.Be($"\n歌曲长度:{SongLength}") +
                       Remark?.Be($"\n注:{Remark}"));
            }
            return(null);
        }