diff --git a/DBObj/ArtistManager.cs b/DBObj/ArtistManager.cs index 7013842..8b126dd 100644 --- a/DBObj/ArtistManager.cs +++ b/DBObj/ArtistManager.cs @@ -87,14 +87,6 @@ namespace DBObj } } - private void PrintAllArtists() - { - Console.WriteLine("All Artists:"); - foreach (var artist in AllArtists) - { - Console.WriteLine(artist.ToString()); - } - } public List GetArtistsByCategoryAndStrokeCountRange(string category, int minStrokes, int maxStrokes) { diff --git a/OverlayFormObj/OverlayForm.cs b/OverlayFormObj/OverlayForm.cs index 6202265..3bcdbef 100644 --- a/OverlayFormObj/OverlayForm.cs +++ b/OverlayFormObj/OverlayForm.cs @@ -745,7 +745,7 @@ private static void SongDisplayTimer_Elapsed(object sender, EventArgs e) public void DisplaySticker(string stickerId) { - Console.WriteLine("Attempting to display sticker."); + //Console.WriteLine("Attempting to display sticker."); this.Invoke((MethodInvoker)delegate { Console.WriteLine("Form Width: " + this.Width); diff --git a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.GuoYu.cs b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.GuoYu.cs index 46048ee..21cdd51 100644 --- a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.GuoYu.cs +++ b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.GuoYu.cs @@ -11,9 +11,11 @@ namespace DualScreenDemo groupRiYuButton.BackgroundImage = groupRiYuNormalBackground; groupHanYuButton.BackgroundImage = groupHanYuNormalBackground; - guoYuSongs = allSongs.Where(song => song.Category == "國語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團")) + /*guoYuSongs = allSongs.Where(song => song.Category == "國語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團")) .OrderByDescending(song => song.Plays) - .ToList(); + .ToList();*/ + String query = "SELECT * FROM SongLibrary WHERE `語別` = '國語' AND (`歌星A分類` = '團' OR `歌星B分類` = '團') ORDER BY `點播次數` DESC"; + var guoYuSongs = SearchSongs_Mysql(query); currentPage = 0; currentSongList = guoYuSongs; totalPages = (int)Math.Ceiling((double)guoYuSongs.Count / itemsPerPage); diff --git a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.HanYu.cs b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.HanYu.cs index 07a04a3..cfb6612 100644 --- a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.HanYu.cs +++ b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.HanYu.cs @@ -11,9 +11,11 @@ namespace DualScreenDemo groupRiYuButton.BackgroundImage = groupRiYuNormalBackground; groupHanYuButton.BackgroundImage = groupHanYuActiveBackground; - hanYuSongs = allSongs.Where(song => song.Category == "韓語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團")) + /*hanYuSongs = allSongs.Where(song => song.Category == "韓語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團")) .OrderByDescending(song => song.Plays) - .ToList(); + .ToList();*/ + String query = "SELECT * FROM SongLibrary WHERE `語別` = '韓語' AND (`歌星A分類` = '團' OR `歌星B分類` = '團') ORDER BY `點播次數` DESC"; + var hanYuSongs = SearchSongs_Mysql(query); currentPage = 0; currentSongList = hanYuSongs; totalPages = (int)Math.Ceiling((double)hanYuSongs.Count / itemsPerPage); diff --git a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.RiYu.cs b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.RiYu.cs index 915945e..583a941 100644 --- a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.RiYu.cs +++ b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.RiYu.cs @@ -11,9 +11,11 @@ namespace DualScreenDemo groupRiYuButton.BackgroundImage = groupRiYuActiveBackground; groupHanYuButton.BackgroundImage = groupHanYuNormalBackground; - riYuSongs = allSongs.Where(song => song.Category == "日語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團")) + /*riYuSongs = allSongs.Where(song => song.Category == "日語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團")) .OrderByDescending(song => song.Plays) - .ToList(); + .ToList();*/ + String query = "SELECT * FROM SongLibrary WHERE `語別` = '日語' AND (`歌星A分類` = '團' OR `歌星B分類` = '團') ORDER BY `點播次數` DESC"; + var riYuSongs = SearchSongs_Mysql(query); currentPage = 0; currentSongList = riYuSongs; totalPages = (int)Math.Ceiling((double)riYuSongs.Count / itemsPerPage); diff --git a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.TaiYu.cs b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.TaiYu.cs index 9d0d38f..69e9982 100644 --- a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.TaiYu.cs +++ b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.TaiYu.cs @@ -11,9 +11,11 @@ namespace DualScreenDemo groupRiYuButton.BackgroundImage = groupRiYuNormalBackground; groupHanYuButton.BackgroundImage = groupHanYuNormalBackground; - taiYuSongs = allSongs.Where(song => song.Category == "台語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團")) + /*taiYuSongs = allSongs.Where(song => song.Category == "台語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團")) .OrderByDescending(song => song.Plays) - .ToList(); + .ToList();*/ + String query = "SELECT * FROM SongLibrary WHERE `語別` = '台語' AND (`歌星A分類` = '團' OR `歌星B分類` = '團') ORDER BY `點播次數` DESC"; + var taiYuSongs = SearchSongs_Mysql(query); currentPage = 0; currentSongList = taiYuSongs; totalPages = (int)Math.Ceiling((double)taiYuSongs.Count / itemsPerPage); diff --git a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.YingYu.cs b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.YingYu.cs index 051f2a9..ffffadb 100644 --- a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.YingYu.cs +++ b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.YingYu.cs @@ -11,9 +11,11 @@ namespace DualScreenDemo groupRiYuButton.BackgroundImage = groupRiYuNormalBackground; groupHanYuButton.BackgroundImage = groupHanYuNormalBackground; - yingWenSongs = allSongs.Where(song => song.Category == "英文" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團")) + /*yingWenSongs = allSongs.Where(song => song.Category == "英文" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團")) .OrderByDescending(song => song.Plays) - .ToList(); + .ToList();*/ + String query = "SELECT * FROM SongLibrary WHERE `語別` = '英文' AND (`歌星A分類` = '團' OR `歌星B分類` = '團') ORDER BY `點播次數` DESC"; + var yingWenSongs = SearchSongs_Mysql(query); currentPage = 0; currentSongList = yingWenSongs; totalPages = (int)Math.Ceiling((double)yingWenSongs.Count / itemsPerPage); diff --git a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.YueYu.cs b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.YueYu.cs index ca344c2..6e0eff4 100644 --- a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.YueYu.cs +++ b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.YueYu.cs @@ -11,9 +11,11 @@ namespace DualScreenDemo groupRiYuButton.BackgroundImage = groupRiYuNormalBackground; groupHanYuButton.BackgroundImage = groupHanYuNormalBackground; - yueYuSongs = allSongs.Where(song => song.Category == "粵語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團")) + /*yueYuSongs = allSongs.Where(song => song.Category == "粵語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團")) .OrderByDescending(song => song.Plays) - .ToList(); + .ToList();*/ + String query = "SELECT * FROM SongLibrary WHERE `語別` = '粵語' AND (`歌星A分類` = '團' OR `歌星B分類` = '團') ORDER BY `點播次數` DESC"; + var yueYuSongs = SearchSongs_Mysql(query); currentPage = 0; currentSongList = yueYuSongs; totalPages = (int)Math.Ceiling((double)yueYuSongs.Count / itemsPerPage); diff --git a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.cs b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.cs index 8ffffda..a0937bf 100644 --- a/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.cs +++ b/PrimaryFormParts/GroupSearch/PrimaryForm.GroupSearch.cs @@ -128,9 +128,11 @@ namespace DualScreenDemo groupRiYuButton.BackgroundImage = groupRiYuNormalBackground; groupHanYuButton.BackgroundImage = groupHanYuNormalBackground; - guoYuSongs = allSongs.Where(song => song.Category == "國語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團")) + /*guoYuSongs = allSongs.Where(song => song.Category == "國語" && (song.ArtistACategory == "團" || song.ArtistBCategory == "團")) .OrderByDescending(song => song.Plays) - .ToList(); + .ToList();*/ + String query = "SELECT * FROM SongLibrary WHERE `語別` = '國語' AND (`歌星A分類` = '團' OR `歌星B分類` = '團') ORDER BY `點播次數` DESC"; + var guoYuSongs = SearchSongs_Mysql(query); currentPage = 0; currentSongList = guoYuSongs; totalPages = (int)Math.Ceiling((double)guoYuSongs.Count / itemsPerPage); diff --git a/PrimaryFormParts/PrimaryForm.cs b/PrimaryFormParts/PrimaryForm.cs index d4759f8..6fa8150 100644 --- a/PrimaryFormParts/PrimaryForm.cs +++ b/PrimaryFormParts/PrimaryForm.cs @@ -183,11 +183,6 @@ namespace DualScreenDemo public List currentArtistList; public List publicSongList; private List guoYuSongs; - private List taiYuSongs; - private List yueYuSongs; - private List yingWenSongs; - private List riYuSongs; - private List hanYuSongs; private List guoYuSongs2; private List taiYuSongs2; private List yueYuSongs2; diff --git a/VideoPlayerForm.cs b/VideoPlayerForm.cs index c14bf87..76659ed 100644 --- a/VideoPlayerForm.cs +++ b/VideoPlayerForm.cs @@ -361,7 +361,7 @@ namespace DualScreenDemo { // 获取 CLSID 对应的类型 Type filterType = Type.GetTypeFromCLSID(clsid); - Console.WriteLine($"Attempting to create filter of type: {filterType.FullName}"); + //Console.WriteLine($"Attempting to create filter of type: {filterType.FullName}"); // 创建实例 object filterObject = Activator.CreateInstance(filterType);