diff --git a/TJAPlayer3/Songs/CSong管理.cs b/TJAPlayer3/Songs/CSong管理.cs index 30f1f738..53acdd1f 100644 --- a/TJAPlayer3/Songs/CSong管理.cs +++ b/TJAPlayer3/Songs/CSong管理.cs @@ -1071,57 +1071,7 @@ namespace TJAPlayer3 private void t曲リストへ後処理を適用する( List ノードリスト, string parentName = "/", bool isGlobal = true ) { - /* - - #region [ If there is at least one song within the list add a random song node ] - - //----------------------------- - if (ノードリスト.Count > 0) - { - C曲リストノード itemRandom = new C曲リストノード(); - itemRandom.eノード種別 = C曲リストノード.Eノード種別.RANDOM; - - itemRandom.strタイトル = CLangManager.LangInstance.GetString(203) + " (" + parentName + ")"; ; - - itemRandom.nスコア数 = (int)Difficulty.Total; - itemRandom.r親ノード = ノードリスト[0].r親ノード; - - itemRandom.strBreadcrumbs = (itemRandom.r親ノード == null) ? - itemRandom.strタイトル : itemRandom.r親ノード.strBreadcrumbs + " > " + itemRandom.strタイトル; - - itemRandom.arスコア[0] = new Cスコア(); - - for (int i = 0; i < (int)Difficulty.Total; i++) - { - itemRandom.arスコア[0].譜面情報.タイトル = string.Format("< RANDOM SELECT Lv.{0} >", i + 1); - } - ノードリスト.Add(itemRandom); - - #region [ ログ出力 ] - //----------------------------- - if (TJAPlayer3.ConfigIni.bLog曲検索ログ出力) - { - StringBuilder sb = new StringBuilder(0x100); - sb.Append(string.Format("nID#{0:D3}", itemRandom.nID)); - if (itemRandom.r親ノード != null) - { - sb.Append(string.Format("(in#{0:D3}):", itemRandom.r親ノード.nID)); - } - else - { - sb.Append("(onRoot):"); - } - sb.Append(" RANDOM"); - Trace.TraceInformation(sb.ToString()); - } - //----------------------------- - #endregion - } - //----------------------------- - #endregion - - */ - + if (isGlobal) { var randomNode = CSongDict.tGenerateRandomButton(ノードリスト[0].r親ノード, parentName); @@ -1129,6 +1079,29 @@ namespace TJAPlayer3 } + + // Don't sort songs if the folder isn't global + // Call back reinsert back folders if sort called ? + if (isGlobal) + { + #region [ Sort nodes ] + //----------------------------- + if (TJAPlayer3.ConfigIni.nDefaultSongSort == 0) + { + t曲リストのソート1_絶対パス順(ノードリスト); + } + else if (TJAPlayer3.ConfigIni.nDefaultSongSort == 1) + { + t曲リストのソート9_ジャンル順(ノードリスト, E楽器パート.TAIKO, 1, 0); + } + else if (TJAPlayer3.ConfigIni.nDefaultSongSort == 2) + { + t曲リストのソート9_ジャンル順(ノードリスト, E楽器パート.TAIKO, 2, 0); + } + //----------------------------- + #endregion + } + // すべてのノードについて… foreach ( C曲リストノード c曲リストノード in ノードリスト ) { @@ -1137,86 +1110,30 @@ namespace TJAPlayer3 #region [ Append "Back" buttons to the included folders ] //----------------------------- if ( c曲リストノード.eノード種別 == C曲リストノード.Eノード種別.BOX ) - { - + { + + #region [ Sort child nodes ] + //----------------------------- + if (TJAPlayer3.ConfigIni.nDefaultSongSort == 0) + { + t曲リストのソート1_絶対パス順(c曲リストノード.list子リスト); + } + else if (TJAPlayer3.ConfigIni.nDefaultSongSort == 1) + { + t曲リストのソート9_ジャンル順(c曲リストノード.list子リスト, E楽器パート.TAIKO, 1, 0); + } + else if (TJAPlayer3.ConfigIni.nDefaultSongSort == 2) + { + t曲リストのソート9_ジャンル順(c曲リストノード.list子リスト, E楽器パート.TAIKO, 2, 0); + } + //----------------------------- + #endregion + + string newPath = parentName + c曲リストノード.strタイトル + "/"; CSongDict.tReinsertBackButtons(c曲リストノード, c曲リストノード.list子リスト, newPath, listStrBoxDefSkinSubfolderFullName); - /* - int 曲数 = c曲リストノード.list子リスト.Count; - for (int index = 0; index < (曲数 / 7) + 1; index++) - { - C曲リストノード itemBack = CSongDict.tGenerateBackButton(c曲リストノード, newPath, listStrBoxDefSkinSubfolderFullName); - - - - C曲リストノード itemBack = new C曲リストノード(); - itemBack.eノード種別 = C曲リストノード.Eノード種別.BACKBOX; - - - // とじる - itemBack.strタイトル = CLangManager.LangInstance.GetString(200) + " (" + newPath + ")"; - - itemBack.BackColor = ColorTranslator.FromHtml("#513009"); - itemBack.BoxColor = Color.White; - - itemBack.BgColor = c曲リストノード.BgColor; - itemBack.isChangedBgColor = c曲リストノード.isChangedBgColor; - itemBack.BgType = c曲リストノード.BgType; - itemBack.isChangedBgType = c曲リストノード.isChangedBgType; - - itemBack.strジャンル = c曲リストノード.strジャンル; - itemBack.nスコア数 = 1; - itemBack.r親ノード = c曲リストノード; - itemBack.strSkinPath = (c曲リストノード.r親ノード == null) ? - "" : c曲リストノード.r親ノード.strSkinPath; - - if (itemBack.strSkinPath != "" && !listStrBoxDefSkinSubfolderFullName.Contains(itemBack.strSkinPath)) - { - listStrBoxDefSkinSubfolderFullName.Add(itemBack.strSkinPath); - } - - itemBack.strBreadcrumbs = (itemBack.r親ノード == null) ? - itemBack.strタイトル : itemBack.r親ノード.strBreadcrumbs + " > " + itemBack.strタイトル; - - itemBack.arスコア[0] = new Cスコア(); - itemBack.arスコア[0].ファイル情報.フォルダの絶対パス = ""; - itemBack.arスコア[0].譜面情報.タイトル = itemBack.strタイトル; - itemBack.arスコア[0].譜面情報.コメント = - (CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "ja") ? - "BOX を出ます。" : - "Exit from the BOX."; - - - - c曲リストノード.list子リスト.Insert(Math.Min(index * (7 + 1), c曲リストノード.list子リスト.Count), itemBack); - - - - #region [ Log output ] - //----------------------------- - if (TJAPlayer3.ConfigIni.bLog曲検索ログ出力) - { - StringBuilder sb = new StringBuilder(0x100); - sb.Append(string.Format("nID#{0:D3}", itemBack.nID)); - if (itemBack.r親ノード != null) - { - sb.Append(string.Format("(in#{0:D3}):", itemBack.r親ノード.nID)); - } - else - { - sb.Append("(onRoot):"); - } - sb.Append(" BACKBOX"); - Trace.TraceInformation(sb.ToString()); - } - //----------------------------- - #endregion - } - - */ - // Process subfolders recussively t曲リストへ後処理を適用する(c曲リストノード.list子リスト, newPath, false); @@ -1248,31 +1165,8 @@ namespace TJAPlayer3 - } - - // Don't sort songs if the folder isn't global - // Call back reinsert back folders if sort called ? - if (isGlobal) - { - #region [ Sort nodes ] - //----------------------------- - if (TJAPlayer3.ConfigIni.nDefaultSongSort == 0) - { - t曲リストのソート1_絶対パス順(ノードリスト); - } - else if (TJAPlayer3.ConfigIni.nDefaultSongSort == 1) - { - t曲リストのソート9_ジャンル順(ノードリスト, E楽器パート.TAIKO, 1, 0); - } - else if (TJAPlayer3.ConfigIni.nDefaultSongSort == 2) - { - t曲リストのソート9_ジャンル順(ノードリスト, E楽器パート.TAIKO, 2, 0); - } - //----------------------------- - #endregion } - } //----------------- #endregion