コード例 #1
0
 private void WriteGroupFile(StreamWriter fw, GroupOfSongs grp, DirectorySongHolder dsh)
 {
     fw.Write(MakeTemplate(m_groupHeader, grp));
     foreach (SongData song in grp.Songs)
     {
         fw.Write(MakeTemplate(m_groupSongRepeat, song, dsh));
     }
     fw.Write(MakeTemplate(m_groupFooter, grp));
 }
コード例 #2
0
 private string MakeTemplate(string tpl, GroupOfSongs grp)
 {
     tpl = tpl.Replace("$[GROUPINDEX]", grp.Index.ToString());
     tpl = tpl.Replace("$[GROUP]", grp.Name);
     return tpl;
 }