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); }
public override string ToString(FormatType format, object supplement = null) { switch (format) { case FormatType.Brief: return($"{SongId}.{SongTitle} [{ChartRatingClass} {ChartRating}({ChartConstant})]"); case FormatType.Detail: //获取所有歌曲别名 string allAnotherName = ""; foreach (var item in PluginArcaeaSong2anothername.Where(x => x.SongId == SongId)) { allAnotherName += item.AnotherName.AnotherName + ","; } allAnotherName = allAnotherName.TrimEnd(','); if (allAnotherName.IsNullOrWhiteSpace()) { allAnotherName = null; } return($"{SongId}.{SongTitle} [{ChartRatingClass} {ChartConstant}]\n" + allAnotherName?.Be($"别名:{allAnotherName}\n") + SongArtist?.Be($"曲师:{SongArtist}\n") + JacketDesigner?.Be($"画师:{JacketDesigner}\n") + SongBpm?.Be($"BPM:{SongBpm}\n") + SongLength?.Be($"歌曲长度:{SongLength}\n") + SongPack?.Be($"曲包:{SongPack}\n") + ChartDesigner?.Be($"谱师:{ChartDesigner}\n") + ChartAllNotes?.Be($"note总数:{ChartAllNotes}\n地键:{ChartFloorNotes}\n天键:{ChartSkyNotes}\n蛇:{ChartArcNotes}\n长条:{ChartHoldNotes}")); } return(null); }
public override string ToString(FormatType format, object supplement = null) { string constantDesc = GetBriefConstant(); string designerDesc = GetBriefChartDesigner(); string allNotesDesc = GetBriefAllNotes(); switch (format) { case FormatType.Brief: return($"{SongId}.{SongTitle}{constantDesc?.Be($" [{constantDesc}]")}"); case FormatType.Detail: return($"{JacketUrl?.Be(new KouImage(JacketUrl, this).ToKouResourceString())}" + $"{SongId}.{SongTitle}\n" + constantDesc?.Be($"定数:{constantDesc}\n") + Aliases?.Be($"别名:{Aliases.Select(p => p.Alias).ToStringJoin(',')}\n") + SongArtist?.Be($"曲师:{SongArtist}\n") + designerDesc?.Be($"谱师:{designerDesc}\n") + JacketDesigner?.Be($"画师:{JacketDesigner}\n") + SongBpm?.Be($"BPM:{SongBpm}\n") + SongLength?.Be($"歌曲长度:{SongLength}\n") + SongPack?.Be($"曲包:{SongPack.GetKouEnumFirstName().ToTitleCase()}\n") + allNotesDesc?.Be($"总键数:{allNotesDesc}\n")); } return(null); }
public Song(string artistName, string songName, int minute, int second) { ArtistName = artistName; SongName = songName; if ((minute == 14 && second > 59)) { throw new ArgumentException("Invalid song length."); } SongLength = new SongLength(minute, second); }
/// <summary> /// 自动格式化歌曲信息 /// </summary> /// <param name="song"></param> /// <param name="format"></param> /// <returns></returns> public string AutoFormatSong(PluginArcaeaSong song) { if (song == null) { return(null); } string info = $"{song.SongTitle} [{song.ChartRatingClass} {song.ChartConstant}]\n" + (SongArtist.IsNullOrWhiteSpace() ? null : song.SongArtist?.Be($"曲师:{song.SongArtist}\n")) + (JacketDesigner.IsNullOrWhiteSpace() ? null : song.JacketDesigner?.Be($"画师:{song.JacketDesigner}\n")) + (SongBPM.IsNullOrWhiteSpace() ? null : song.SongBpm?.Be($"BPM:{song.SongBpm}\n")) + (SongLength.IsNullOrWhiteSpace() ? null : song.SongLength?.Be($"歌曲长度:{ song.SongLength}\n")) + //(song.Song_pack?.Be($"曲包:{song.Song_pack}\n")) + (ChartDesigner.IsNullOrWhiteSpace() ? null : song.ChartDesigner?.Be($"谱师:{song.ChartDesigner}\n")) + (NotesCount.IsNullOrWhiteSpace() ? null : song.ChartAllNotes?.Be($"note总数:{song.ChartAllNotes}\n")); return(info.ToString().Trim()); }